aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-07-09 10:08:08 -0400
committerTejun Heo <tj@kernel.org>2014-07-09 10:08:08 -0400
commitaa6ec29bee8692ce232132f1a1ea2a1f9196610e (patch)
tree6edb7f3fa4a3ac01ab03d874918a8c45e0b55e40 /block
parentc1d5d42efdb3e0470c1cfd2fcb50bc3eae813283 (diff)
cgroup: remove sane_behavior support on non-default hierarchies
sane_behavior has been used as a development vehicle for the default unified hierarchy. Now that the default hierarchy is in place, the flag became redundant and confusing as its usage is allowed on all hierarchies. There are gonna be either the default hierarchy or legacy ones. Let's make that clear by removing sane_behavior support on non-default hierarchies. This patch replaces cgroup_sane_behavior() with cgroup_on_dfl(). The comment on top of CGRP_ROOT_SANE_BEHAVIOR is moved to on top of cgroup_on_dfl() with sane_behavior specific part dropped. On the default and legacy hierarchies w/o sane_behavior, this shouldn't cause any behavior differences. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Vivek Goyal <vgoyal@redhat.com> Acked-by: Li Zefan <lizefan@huawei.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.cz>
Diffstat (limited to 'block')
-rw-r--r--block/blk-throttle.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 3fdb21a390c1..9273d0969ebd 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -412,13 +412,13 @@ static void throtl_pd_init(struct blkcg_gq *blkg)
412 int rw; 412 int rw;
413 413
414 /* 414 /*
415 * If sane_hierarchy is enabled, we switch to properly hierarchical 415 * If on the default hierarchy, we switch to properly hierarchical
416 * behavior where limits on a given throtl_grp are applied to the 416 * behavior where limits on a given throtl_grp are applied to the
417 * whole subtree rather than just the group itself. e.g. If 16M 417 * whole subtree rather than just the group itself. e.g. If 16M
418 * read_bps limit is set on the root group, the whole system can't 418 * read_bps limit is set on the root group, the whole system can't
419 * exceed 16M for the device. 419 * exceed 16M for the device.
420 * 420 *
421 * If sane_hierarchy is not enabled, the broken flat hierarchy 421 * If not on the default hierarchy, the broken flat hierarchy
422 * behavior is retained where all throtl_grps are treated as if 422 * behavior is retained where all throtl_grps are treated as if
423 * they're all separate root groups right below throtl_data. 423 * they're all separate root groups right below throtl_data.
424 * Limits of a group don't interact with limits of other groups 424 * Limits of a group don't interact with limits of other groups
@@ -426,7 +426,7 @@ static void throtl_pd_init(struct blkcg_gq *blkg)
426 */ 426 */
427 parent_sq = &td->service_queue; 427 parent_sq = &td->service_queue;
428 428
429 if (cgroup_sane_behavior(blkg->blkcg->css.cgroup) && blkg->parent) 429 if (cgroup_on_dfl(blkg->blkcg->css.cgroup) && blkg->parent)
430 parent_sq = &blkg_to_tg(blkg->parent)->service_queue; 430 parent_sq = &blkg_to_tg(blkg->parent)->service_queue;
431 431
432 throtl_service_queue_init(&tg->service_queue, parent_sq); 432 throtl_service_queue_init(&tg->service_queue, parent_sq);