[lkml]   [2001]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: scheduling with io_lock held in 2.4.6
"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

> 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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:57    [W:0.035 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site