Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul E. McKenney
Date: Thursday, May 29, 2008 - 2:17 am

On Thu, May 29, 2008 at 08:42:02AM +0200, Jens Axboe wrote:

Looks better!  I do have one scenario that seems troublesome, but
it should be easy to fix, see below.  (Assuming it really is a
problem, that is...)

						Thanx, Paul


Suppose that at this point some other CPU does the last complete().
They have set ioc_gone to NULL, so everything is fine.  But suppose
that in the meantime, some other CPU sets up a cfq and then starts
tearing it down.  Then ioc_gone would be non-NULL, and we would cause
this new teardown to end prematurely.

If this is a real problem, one way to get around it is to have a
generation number.  We capture this before doing the elv_ioc_count_dec()
(alas, with a memory barrier between the capture and the elv_ioc_count_dec()),
and then check it under the lock.  If it has changed, we know someone else
has already done the awakening for us.  Increment the generation number
in the same place that ioc_gone is set to NULL.

Seem reasonable?

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.25-$sha1: RIP call_for_each_cic+0x25/0x50, Alexey Dobriyan, (Sun Apr 27, 3:55 pm)
Re: 2.6.25-$sha1: RIP call_for_each_cic+0x25/0x50, Andrew Morton, (Mon Apr 28, 5:01 am)
Re: 2.6.25-$sha1: RIP call_for_each_cic+0x25/0x50, Jens Axboe, (Mon Apr 28, 5:04 am)
Re: 2.6.25-$sha1: RIP call_for_each_cic+0x25/0x50, Alexey Dobriyan, (Mon Apr 28, 12:55 pm)
Re: 2.6.25-$sha1: RIP call_for_each_cic+0x25/0x50, Alexey Dobriyan, (Mon Apr 28, 11:21 pm)
Re: 2.6.25-$sha1: RIP call_for_each_cic+0x25/0x50, Jens Axboe, (Tue Apr 29, 2:06 am)
Re: 2.6.25-$sha1: RIP call_for_each_cic+0x25/0x50, Alexey Dobriyan, (Wed Apr 30, 3:12 pm)
Re: 2.6.25-$sha1: RIP call_for_each_cic+0x25/0x50, Jens Axboe, (Sun May 4, 12:08 pm)
Re: 2.6.25-$sha1: RIP call_for_each_cic+0x25/0x50, Jens Axboe, (Sun May 4, 12:25 pm)
Re: 2.6.25-$sha1: RIP call_for_each_cic+0x25/0x50, Alexey Dobriyan, (Sun May 4, 1:15 pm)
Re: 2.6.25-$sha1: RIP call_for_each_cic+0x25/0x50, Alexey Dobriyan, (Sun May 4, 2:17 pm)
2.6.25-$sha1: RIP __call_for_each_cic+0x20/0x50, Alexey Dobriyan, (Sat May 10, 3:37 am)
2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Alexey Dobriyan, (Mon May 26, 10:27 pm)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Jens Axboe, (Tue May 27, 6:35 am)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Paul E. McKenney, (Tue May 27, 8:18 am)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Jens Axboe, (Wed May 28, 3:07 am)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Paul E. McKenney, (Wed May 28, 3:30 am)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Fabio Checconi, (Wed May 28, 4:52 am)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Jens Axboe, (Wed May 28, 4:58 am)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Jens Axboe, (Wed May 28, 5:44 am)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Paul E. McKenney, (Wed May 28, 6:20 am)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Paul E. McKenney, (Wed May 28, 9:38 pm)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Jens Axboe, (Wed May 28, 11:26 pm)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Jens Axboe, (Wed May 28, 11:42 pm)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Paul E. McKenney, (Thu May 29, 2:17 am)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Jens Axboe, (Thu May 29, 3:13 am)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Paul E. McKenney, (Thu May 29, 4:25 am)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Jens Axboe, (Thu May 29, 4:44 am)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Paul E. McKenney, (Thu May 29, 5:11 am)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Jens Axboe, (Thu May 29, 5:13 am)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Paul E. McKenney, (Fri May 30, 4:04 am)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Paul E. McKenney, (Fri May 30, 6:16 am)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Alexey Dobriyan, (Fri May 30, 11:34 am)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Paul E. McKenney, (Tue Jun 3, 8:31 pm)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Linus Torvalds, (Wed Jun 4, 11:32 am)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Paul E. McKenney, (Wed Jun 4, 9:23 pm)
Re: 2.6.26-rc4: RIP __call_for_each_cic+0x20/0x50, Paul E. McKenney, (Fri Jun 6, 7:49 am)