On Wednesday 05 May 2010 21:59:05 Alan Cox wrote:Ok, that simplifies things, at least we can call tty->ops->wait_until_sent(tty, timeout) while holding the BTM then, even with the next patch that makes it non-recursive. These, and most of the others in this patch call tty_wait_until_sent() from their close() function. That contains the lines if (wait_event_interruptible_timeout(tty->write_wait, !tty_chars_in_buffer(tty), timeout) >= 0) { Part of what my patch does is to give up the BTM when already holding it, to mimic the BKL behavior. If you can confirm that this wait_event never blocks indefinitely or has to wait for the BTM from another function, that could just be removed. Otherwise, it probably needs to become something ugly like if (tty_chars_in_buffer(tty)) { if (tty_locked()) { tty_unlock(); wait = wait_event_interruptible_timeout(tty->write_wait, !tty_chars_in_buffer(tty), timeout) >= 0); tty_lock(); } else { wait = wait_event_interruptible_timeout(tty->write_wait, !tty_chars_in_buffer(tty), timeout) >= 0); } if (wait && tty->ops->wait_until_sent) tty->ops->wait_until_sent(tty, timeout); } I already had to introduce a few of these constructs to make the BTM non-recursive, but I'd prefer to keep the number as low as possible for obvious reasons. Fine with me. While I technically own a 16-port specialix card somewhere in my parents' basement, I'm not exactly interested in maintaining the driver. Arnd --
| Greg KH | Og dreams of kernels |
| Jens Axboe | [PATCH 31/33] Fusion: sg chaining support |
| Arnd Bergmann | Re: finding your own dead "CONFIG_" variables |
| Mark Brown | [PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset |
| Tony Breeds | [LGUEST] Look in object dir for .config |
git: | |
| Brian Downing | Re: Git in a Nutshell guide |
| John Benes | Re: master has some toys |
| Matthias Lederhofer | [PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree |
| Alexander Sulfrian | [RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set |
| Junio C Hamano | Re: Rss produced by git is not valid xml? |
| Linux Kernel Mailing List | iSeries: fix section mismatch in iseries_veth |
| Linux Kernel Mailing List | ixbge: remove TX lock and redo TX accounting. |
| Linux Kernel Mailing List | ixgbe: fix several counter register errata |
| Linux Kernel Mailing List | b43: fix build with CONFIG_SSB_PCIHOST=n |
| Linux Kernel Mailing List | 9p: block-based virtio client |
