[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111020212021.GA2841@redhat.com>
Date: Thu, 20 Oct 2011 17:20:21 -0400
From: Vivek Goyal <vgoyal@...hat.com>
To: Tejun Heo <tj@...nel.org>
Cc: linux-kernel@...r.kernel.org, jaxboe@...ionio.com
Subject: Re: [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@...hat.com>
>
> Acked-by: Tejun Heo <tj@...nel.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists