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: Monday, May 5, 2008 - 12:01 am

>>> So it's basically dm calling into blk_unplug() all the time, which

When should dm/md set the plugged flag? It has several disks (or more 
dm/md layers), some of them may be plugged, some not --- furthermore, the 
disk queues are shared by other devices --- there may be more devices on 
different partitions.

So the question: when do you want dm/md to set the plugged bit? Do you 
really want to plug the queue at the top layer and merge requests there?


I changed generic_unplug_device from:
spin_lock()
if (plugged bit is set) unplug...;
spin_unlock()

to:
if (plugged bit is set)
{
spin_lock()
if (plugged bit is set) unplug...;
spin_unlock()
}

--- I don't see anything wrong with it. At least, the change is so trivial 
that we can be sure that it won't have negative effect on performance.

What you propose is complete rewrite of dm/md plugging mechanism to plug 
the queue and merge requests at upper layer --- the questions are:

- what exactly you are proposing? (plugging at upper layer? lower layer? 
both layers? don't plug and just somehow propagate the plugged bit?)
- why are you proposing that?

Note that for some dm targets it would be benefical to join the requests 
at upper layer (dm-linear, raid1), for others (raid0, dm-snapshots) it 
damages performance (you merge the requests before passing them to raid0 
and you chop them again to smaller pieces in raid0).

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