lkml.org 
[lkml]   [2011]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] blk-throttle: Take blkcg->lock while traversing blkcg->policy_list
On Thu, Oct 20, 2011 at 02:11:40PM -0700, Tejun Heo wrote:
> Hello,
>
> On Thu, Oct 20, 2011 at 05:08:26PM -0400, Vivek Goyal wrote:
> > blkcg->policy_list is protected by blkcg->lock. Its not rcu protected
> > list. So even for readers, they need to take blkcg->lock. There are
> > few functions which were reading the list without taking lock. Fix it.
> >
> > Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
>
> Acked-by: Tejun Heo <tj@kernel.org>
>
> And yeap, some of rcu usages in cfq/iocg seem either incorrect or
> unnecessary. Trying to clean up that now too.

Cool. I am waiting for the patches as I am curious to know what's incorrect
or unnecessary.

I noticed above two problems while trying to figure out how can we cleanup
the device rules when devices goes away. One place could be.

blk_throtl_exit() {
blkiocg_del_blkio_group() {
delete_any_policy_nodes_associated_with_this device;
}
}

The only problem with this approach is that it will cleanup per device
weight rules also at elevator_exit() time which is not same as device
removal and one might device to bring CFQ back on device and we will
need the rules again.

cfq_exit_queue()
cfq_release_cfq_groups
cfq_blkiocg_del_blkio_group()
blkiocg_del_blkio_group()

Thanks
Vivek


\
 
 \ /
  Last update: 2011-10-20 23:23    [W:0.055 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site