Messages in this thread | | | Date | Thu, 27 Oct 2011 11:39:01 -0400 | From | Vivek Goyal <> | Subject | Re: [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
| |