Re: Linux-2.2.2-pre2..

Linus Torvalds (torvalds@transmeta.com)
Sun, 7 Feb 1999 12:03:37 -0800 (PST)


On Sun, 7 Feb 1999, Andrea Arcangeli wrote:
>
> Now I am forcing the kernel to run as in the case it wasn't racing.
> Basically now when a master pty hangup it will put its do_tty_hangup
> request in the new tq_tty_hangup task queue. Then when the _last_ slave
> will hangup too the do_tty_hangup() of the master will run a bit before
> releasing the tty struct memory.
>
> I left the run_task_queue(&tq_scheduler) because I seen many tty lowlevel
> drivers that are using it (just to be safe before removing the struct
> under their eyes).

This has the problem that it can delay the actual hangup indefinitely, ie
until after somebody releases the tty anyway. So you won't race, but you
also won't actually ever handle hangup events correctly (the particular
crashme test-case that has been discussed in this context doesn't care,
but a lot of other cases _do_ care that hangup events happen "quickly"
(they don't have to happen immediately, they just have to happen in a
reasonably timely fashion).

Anyway, for the pty case this is a non-issue, because it really should be
done synchronously anyway, but for other events it should be enough to
just move the run_task_queue() in the scheduler to the top of the
function.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/