lkml.org 
[lkml]   [2011]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/13] block, cfq: misc updates to cfq_io_context
On Tue, Oct 25, 2011 at 06:48:32PM -0700, Tejun Heo wrote:
> Make the following changes to prepare for ioc/cic management cleanup.
>
> * Add cic->q so that ioc can determine the associated queue without
> querying cfq. This will eventually replace ->key.

Not sure what's the advantage of storing cic->q instead of cic->cfqd.
In blk-ioc code getting to cic's queue becomes easier but then reaching
to cfqd in cfq code becomes much longer.

static inline struct cfq_data *cic_to_cfqd(struct cfq_io_context *cic)
{
return cic->q->elevator->elevator_data;
}

May be storing cic->cfqd is not a bad idea.

For blk-ioc.

cic_queue = cic->cfqd->queue;

And for CFQ

cic_cfqd = cic->cfqd;

None of the paths is too long for either code. It is a very minor point
though.

Thanks
Vivek


\
 
 \ /
  Last update: 2011-10-27 17:41    [W:0.166 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site