Re: [GIT PATCH] TTY patches for 2.6.36

From: Andy Whitcroft
Date: Tue Aug 10 2010 - 03:32:04 EST


On Mon, Aug 09, 2010 at 08:24:53PM +0100, Alan Cox wrote:
> > With the new locking the BTM is held in place of the BKL, which
> > effectivly means throughout open and close processing, which
> > effectively means _all_ TTY open/closes are serialised throughout
> > regardless of the length of the shutdown processing. The EIO appears
> > to be no longer returnable.

Arnd, thanks for your clear explanation. I see now you have actually
addressed the long waits in the main.

> The specific case of waiting for queues to empty could be a slow one and
> probably wants to addressed nicely. The other causes like memory
> allocator waits are probably actually better the new way. What exactly is
> an application supposed to do when it gets a -EIO on open, how does it
> decide when to try again, when does it retry, how many aps get it right ?

I know to my cost they break. For me, console_sem is one where we
commonly trigger this behaviour (before these changes), so affecting bog
standard VTs.

> In fact I don't think its unreasonable to treat an open without O_NDELAY
> that blocks on a close flushing output from buffers as correct - unless
> there is some specific POSIX reason why we cannot.
>
> I'd venture we'd effective fix/hide/cover over a huge range of extremely
> obscure and near untestable app failure cases/bugs by doing this.

Yes that is very likely. That the longer waits are picked out and
release BTM seems a completely sane approach and covers my query
completely.

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