login
Header Space

 
 

Re: [PATCH] Optimize lock in queue unplugging

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jens Axboe <jens.axboe@...>
Cc: Mike Anderson <andmike@...>, <linux-kernel@...>, Alasdair Graeme Kergon <agk@...>
Date: Wednesday, April 30, 2008 - 9:54 am

On Wed, 30 Apr 2008, Jens Axboe wrote:


This doesn't seem correct to me. The difference between blk_unplug and 
generic_unplug_device is that blk_unplug is called on every type of device 
and generic_unplug_device (pointed to by q->unplug_fn) is a method that is 
called on low-level disk devices.

dm and md redefine q->unplug_fn to point to their own method. On dm and 
md, blk_unplug is called, but generic_unplug_device is not.

So if you have this setup
dm-linear(unplugged) -> disk(plugged)

then, with your patch, a call to blk_unplug(dm-linear) will not unplug the 
disk. With my patch, a call to blk_unplug(dm-linear) will unplug the disk 
--- it calls q->unplug_fn that points to dm_unplug_all, that calls 
blk_unplug again on the disk and that calls generic_unplug_device on disk 
queue.

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

Messages in current thread:
[PATCH] Optimize lock in queue unplugging, Mikulas Patocka, (Tue Apr 29, 3:12 pm)
Re: [PATCH] Optimize lock in queue unplugging, Jens Axboe, (Tue Apr 29, 3:25 pm)
Re: [PATCH] Optimize lock in queue unplugging, Mike Anderson, (Tue Apr 29, 4:29 pm)
Re: [PATCH] Optimize lock in queue unplugging, Jens Axboe, (Wed Apr 30, 3:14 am)
Re: [PATCH] Optimize lock in queue unplugging, Mikulas Patocka, (Wed Apr 30, 9:54 am)
Re: [PATCH] Optimize lock in queue unplugging, Jens Axboe, (Sun May 4, 3:11 pm)
Re: [PATCH] Optimize lock in queue unplugging, Mikulas Patocka, (Mon May 5, 12:01 am)
Re: [PATCH] Optimize lock in queue unplugging, Jens Axboe, (Wed May 7, 3:45 am)
Re: [PATCH] Optimize lock in queue unplugging, Alasdair G Kergon, (Wed Apr 30, 6:38 am)
Re: [PATCH] Optimize lock in queue unplugging, Mikulas Patocka, (Tue Apr 29, 4:02 pm)
Re: [PATCH] Optimize lock in queue unplugging, Jens Axboe, (Tue Apr 29, 4:05 pm)
speck-geostationary