Re: mtx_lock_do_what_i_mean()




On Aug 25, 2009, at 11:35 PM, Bruce Evans wrote:

On Tue, 25 Aug 2009, Marcel Moolenaar wrote:

On Aug 25, 2009, at 12:30 AM, Ed Schouten wrote:

* Marcel Moolenaar <xcllnt@xxxxxxx> wrote:
I would approach the problem differently: decouple printf() in the
kernel from anything to which we have a TTY attached. Instead, look
at printf() as a means to write to the message buffer only. Echoing
things that go into the message buffer to the console becomes 1)
optional (yay!), and 2) something you can do by going through the TTY
layer (use a kthread or use a process [syslog]).
Yeah. That would be a lot better, but that means you still need to have
a lot of code to make it work properly w.r.t. kernel panics:

The debugger doesn't call printf(). It calls db_printf(). We
already have everything in place to decouple the debugger
from the problem and I would definitely not pull it in. The
debugger is a problem all by itself...

Everything is in place to remove 0.1% of the coupling. Debugger i/o
still normally goes to the same device as user and kernel i/o, so it
is strongly coupled.

That's a non sequitur. Sharing travel destinations does
not mean that you travel together, for example.

The fact that currently the console is used by both does
not mean there's coupling. In fact, the debugger goes
through the low-level console interface, whereas printf()
gets redirected eventually to go through the TTY layer.
Having printf() not even write to the console does not
mean that the debugger cannot keep using the low-level
console interfaces...

--
Marcel Moolenaar
xcllnt@xxxxxxx



_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: [PATCH] detour TTY driver - now ttyprintk
    ... I hope that this TTY driver is ok for merging. ... against 2.6.34 kernel version. ... It is possible to store "console" messages ...
    (Linux-Kernel)
  • Cant access tty problems (initramfs)
    ... I'm getting the infamous "Can't access tty; ... message when I try to invoke the ash shell during my initial bootup. ... My kernel is 2.6.21.1 and I'm using busybox 1.5.0. ... If I don't define a console however, I get a kernel panic from ...
    (Debian-User)
  • Re: Remote Control a terminal or the console.
    ... The install script installs a kernel module and links a new kernel. ... You can create cron jobs that direct output to console tty's that don't have getty's running on them, and then you can dv to that tty from anywhere. ...
    (comp.unix.sco.misc)
  • Re: Christmas list for the kernel
    ... >> The basic difference between a pty and tty is that a pty connects to a ... >> ssh) on the other end, while a tty connects to the kernel doing all the ... > I forgot about the kernel vs user space termination issue. ... > console implementation. ...
    (Linux-Kernel)
  • miibus, ed0, and the realpath security advisory
    ... dmesg and kernel config below. ... miibus0: <MII bus> on dc0 ... sc0: <System console> on isa0 ... # The `bpf' pseudo-device enables the Berkeley Packet Filter. ...
    (freebsd-questions)