lkml.org 
[lkml]   [2011]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/13] block: make ioc get/put interface more conventional and fix race on alloction
Hello,

On Wed, Oct 26, 2011 at 12:01:01PM -0400, Vivek Goyal wrote:
> We really don't need to create a new io context here if it is not present.
> cgroup_changed is set so that reference to old sync cfqq is dropped and
> a new one is assigned when new IO comes in. Given the fact that io context
> is not even present for the task being attached, there is no way there
> is associated cic and associated cfqq. So no need to set changed_cgroup=1.
>
> Will it make sense to pass in additional parameter to get_task_io_context()
> so that it takes a reference if ioc exists otherwise returns NULL. Or may
> be another variant of get_task_io_context() function.
>
> This is a minor issue though. Will just avoid creating iocontext memory
> for task if one is not using CFQ in the system.

Yeah, something like GFP_NOALLOC would have been nice for cases like
this. That said, adding another param or API for this doesn't sound
too hot to me. It's an extremely marginal optimization. Let's just
let it be.

> > +extern char __blk_test_mode[2];
> > +#define blk_test_mode (__blk_test_mode[0])
> > +
>
> Looks like leftover of your testing code.

Heh... what does that doing there? :) Will update the patch & git
tree.

Thanks.

--
tejun


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