From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vivek Goyal Subject: Re: [PATCH 12/24] cfq-iosched: implement cfq_group->nr_active and ->children_weight Date: Tue, 8 Jan 2013 10:51:14 -0500 Message-ID: <20130108155114.GC29635@redhat.com> References: <1356726946-26037-1-git-send-email-tj@kernel.org> <1356726946-26037-13-git-send-email-tj@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1356726946-26037-13-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Tejun Heo Cc: axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org, ctalbott-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, rni-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Fri, Dec 28, 2012 at 12:35:34PM -0800, Tejun Heo wrote: > To prepare for blkcg hierarchy support, add cfqg->nr_active and > ->children_weight. cfqg->nr_active counts the number of active cfqgs > at the cfqg's level and ->children_weight is sum of weights of those > cfqgs. The level covers itself (cfqg->leaf_weight) and immediate > children. > > The two values are updated when a cfqg enters and leaves the group > service tree. Unless the hierarchy is very deep, the added overhead > should be negligible. > > Currently, the parent is determined using cfqg_flat_parent() which > makes the root cfqg the parent of all other cfqgs. This is to make > the transition to hierarchy-aware scheduling gradual. Scheduling > logic will be converted to use cfqg->children_weight without actually > changing the behavior. When everything is ready, > blkcg_weight_parent() will be replaced with proper parent function. > > This patch doesn't introduce any behavior chagne. > > v2: s/cfqg->level_weight/cfqg->children_weight/ as per Vivek. > > Signed-off-by: Tejun Heo > Cc: Vivek Goyal Looks good to me. Acked-by: Vivek Goyal Vivek