lkml.org 
[lkml]   [2011]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/2] block: skip elevator data initialization for flush requests
Hello,

On Wed, Feb 02, 2011 at 05:55:49PM -0500, Mike Snitzer wrote:
> @@ -808,9 +808,14 @@ static struct request *get_request(struc
> rl->count[is_sync]++;
> rl->starved[is_sync] = 0;
>
> - priv = !test_bit(QUEUE_FLAG_ELVSWITCH, &q->queue_flags);
> - if (priv)
> - rl->elvpriv++;
> + /*
> + * Only initialize elevator data if REQ_SORTED is set.
> + */
> + if (rw_flags & REQ_SORTED) {
> + priv = !test_bit(QUEUE_FLAG_ELVSWITCH, &q->queue_flags);
> + if (priv)
> + rl->elvpriv++;
> + }

This isn't enough. Now the allocated requests would have REQ_SORTED
set before going into elevator. You probably want to filter out
REQ_SORTED to elv_may_queue() too.

Also, it would be great if you update the comment on top of
get_request() to explain what @rw_flags does.

Thank you.

--
tejun


\
 
 \ /
  Last update: 2011-02-03 10:31    [W:0.097 / U:2.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site