lkml.org 
[lkml]   [2008]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Block: Prevent busy looping
On Wed, Apr 16 2008, Elias Oltmanns wrote:
> blk_run_queue() as well as blk_start_queue() plug the device on reentry
> and schedule blk_unplug_work() right afterwards. However,
> blk_plug_device() takes care of that already and makes sure that there is
> a short delay before blk_unplug_work() is scheduled. This is important
> to prevent busy looping and possibly system lockups as observed here:
> <http://permalink.gmane.org/gmane.linux.ide/28351>.

If you call blk_start_queue() and blk_run_queue(), you better mean it.
There should be no delay. The only reason it does blk_plug_device() is
so that the work queue function will actually do some work. In the newer
kernels we just do:

set_bit(QUEUE_FLAG_PLUGGED, &q->queue_flags);
kblockd_schedule_work(q, &q->unplug_work);

instead, which is much better.

--
Jens Axboe



\
 
 \ /
  Last update: 2008-04-16 18:35    [W:3.347 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site