Messages in this thread | | | From | "Peter T. Breuer" <> | Subject | Re: scheduling with io_lock held in 2.4.6 | Date | Sat, 18 Aug 2001 21:27:09 +0200 (CEST) |
| |
"A month of sundays ago Andrew Morton wrote:" > "Peter T. Breuer" wrote: > > I've been plagued for a month by smp lockups in my block driver > > that I eventually deduced were due to somebody else scheduling while > > holding the io_request_lock spinlock.
> > Aug 17 01:41:00 xilofon kernel: Scheduling with io lock held in process 0 > > Aug 17 01:41:01 xilofon last message repeated 87 times > > Aug 17 01:41:01 xilofon kernel: Scheduling with io lock held in process 1141
> Replace the printk with a BUG(), feed the result into ksymooops. > Or use show_trace(0). > > But if you're running SMP, scheduling with a lock held > is quite legal - it'll be held by another CPU. In that case
Err, yes, I had initially made that mistake, but was fortunately running on a single cpu machine. I fixed the test to check that the spinlock was taken on the same cpu as we are now scheduling on and the test still triggers.
> you'll need to record which CPU holds the lock.
My initial conclusion, based on recording file and line numbers every time the spinlock is taken, is that end_that_request_last from ll_rw_blk.c sometimes schedules under the io_request_lock.
I am still investigating, in the hope of pinning it down more exactly. If anyone recognizes what goes on, please tell me.
Peter - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |