login
Header Space

 
 

Re: [PATCH] Optimize lock in queue unplugging

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jens Axboe <jens.axboe@...>
Cc: <linux-kernel@...>, Mike Anderson <andmike@...>, Alasdair Graeme Kergon <agk@...>
Date: Tuesday, April 29, 2008 - 4:02 pm

On Tue, 29 Apr 2008, Jens Axboe wrote:


unplug is called on any wait_on_buffer (and similar calls) 
__wait_on_buffer -> sync_buffer -> blk_run_address_space -> 
blk_run_backing_dev -> bdi->unplug_io_fn(bdi, page);

(I'm not sure that this was the IBM's case, I'm just guessing - this is 
the most obvious example where unplug is called repeatedly)


There is not any test that the queue is plugged and there shouldn't be. If 
you have this situation

dm-linear(unplugged) -> physical-disk(plugged)

then uplung should be called on dm-linear (that will call dm-unplug method 
dm_unplug_all and that will unplug the disk). If you add the test of 
plugged queue to the upper layer, you mess this situation with stacked 
drivers completely.

The test for already plugged queue should be at the lowest physical device 
driver, not in upper layers.

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