Prev: Failing to read drive: "Very big device. Trying to use READ CAPACITY(16)"
Next: question about CONFIG_BASE_SMALL
From: Benjamin Herrenschmidt on 4 Aug 2010 04:40 On Wed, 2010-08-04 at 00:59 -0700, Dmitry Torokhov wrote: > Noone is using tty argument so let's get rid of it. While talking about sysrq... I noticed that serial drivers call sysrq with the uart lock held. I've seen deadlocks caused by that, for example, when entering the debugger, it waits forever for a CPU which is itself waiting on the UART lock. I have a patch to drop the lock in serial_core.h, I'll post that tomorrow hopefully, just checking if there's any objection there ? The serial drivers might need to be audited a bit to make sure they cope with the lock being dropped and re-acquired around the sysrq call. Cheers, Ben. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Alan Cox on 4 Aug 2010 05:00 > I have a patch to drop the lock in serial_core.h, I'll post that > tomorrow hopefully, just checking if there's any objection there ? The Fundamentally - no. However the impact it has on a lot of the drivers will be significant and you'll be submitting a huge patch pile to fix up all the locking assumptions (for one it means port->tty might change across any call that ends up in sysrq) > serial drivers might need to be audited a bit to make sure they cope > with the lock being dropped and re-acquired around the sysrq call. Architecturally I think it would make more sense to add a new sysrq helper which merely sets a flag, and check that flag at the end of the IRQ when dropping the lock anyway. Otherwise it'll be a huge amount of work to even build test all those consoles. Alan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Benjamin Herrenschmidt on 4 Aug 2010 22:10
On Wed, 2010-08-04 at 07:03 -0500, Jason Wessel wrote: > The usb serial has the same kind of problem with all sorts of locks. > I > had resorted to using a tasklet or workqueue to get the sysrq to > execute > just outside the usb serial driver context. This work never made it > upstream because it was part of another series, but the reference is: > http://lkml.org/lkml/2010/3/9/17 > > For the standard serial you might be able to get away with dropping > the > lock for the sysrq. > > Did you have a particular way to trigger the problem or was it just > completely random, because I don't know that I have observed this > behavior with the typical 8250 driver. Yes, I do actually :-) A 64-way machine and a bunch of processes flooding the console will do it just fine :-) Cheers, Ben. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |