diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-04 13:11:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-04 13:11:28 -0400 |
commit | 47dfe4037e37b2843055ea3feccf1c335ea23a9c (patch) | |
tree | 818e8da41b62e6e801d88feaccfb45ad60ed5968 /block | |
parent | f2a84170ede80e4b80f636e3700ef4d4d5dc7d33 (diff) | |
parent | a13812683f1118ee4deed88d8d9bc2c268358b2e (diff) |
Merge branch 'for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup changes from Tejun Heo:
"Mostly changes to get the v2 interface ready. The core features are
mostly ready now and I think it's reasonable to expect to drop the
devel mask in one or two devel cycles at least for a subset of
controllers.
- cgroup added a controller dependency mechanism so that block cgroup
can depend on memory cgroup. This will be used to finally support
IO provisioning on the writeback traffic, which is currently being
implemented.
- The v2 interface now uses a separate table so that the interface
files for the new interface are explicitly declared in one place.
Each controller will explicitly review and add the files for the
new interface.
- cpuset is getting ready for the hierarchical behavior which is in
the similar style with other controllers so that an ancestor's
configuration change doesn't change the descendants' configurations
irreversibly and processes aren't silently migrated when a CPU or
node goes down.
All the changes are to the new interface and no behavior changed for
the multiple hierarchies"
* 'for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (29 commits)
cpuset: fix the WARN_ON() in update_nodemasks_hier()
cgroup: initialize cgrp_dfl_root_inhibit_ss_mask from !->dfl_files test
cgroup: make CFTYPE_ONLY_ON_DFL and CFTYPE_NO_ internal to cgroup core
cgroup: distinguish the default and legacy hierarchies when handling cftypes
cgroup: replace cgroup_add_cftypes() with cgroup_add_legacy_cftypes()
cgroup: rename cgroup_subsys->base_cftypes to ->legacy_cftypes
cgroup: split cgroup_base_files[] into cgroup_{dfl|legacy}_base_files[]
cpuset: export effective masks to userspace
cpuset: allow writing offlined masks to cpuset.cpus/mems
cpuset: enable onlined cpu/node in effective masks
cpuset: refactor cpuset_hotplug_update_tasks()
cpuset: make cs->{cpus, mems}_allowed as user-configured masks
cpuset: apply cs->effective_{cpus,mems}
cpuset: initialize top_cpuset's configured masks at mount
cpuset: use effective cpumask to build sched domains
cpuset: inherit ancestor's masks if effective_{cpus, mems} becomes empty
cpuset: update cs->effective_{cpus, mems} when config changes
cpuset: update cpuset->effective_{cpus,mems} at hotplug
cpuset: add cs->effective_cpus and cs->effective_mems
cgroup: clean up sane_behavior handling
...
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-cgroup.c | 13 | ||||
-rw-r--r-- | block/blk-throttle.c | 6 |
2 files changed, 14 insertions, 5 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 28d227c5ca77..e17da947f6bd 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -928,7 +928,15 @@ struct cgroup_subsys blkio_cgrp_subsys = { | |||
928 | .css_offline = blkcg_css_offline, | 928 | .css_offline = blkcg_css_offline, |
929 | .css_free = blkcg_css_free, | 929 | .css_free = blkcg_css_free, |
930 | .can_attach = blkcg_can_attach, | 930 | .can_attach = blkcg_can_attach, |
931 | .base_cftypes = blkcg_files, | 931 | .legacy_cftypes = blkcg_files, |
932 | #ifdef CONFIG_MEMCG | ||
933 | /* | ||
934 | * This ensures that, if available, memcg is automatically enabled | ||
935 | * together on the default hierarchy so that the owner cgroup can | ||
936 | * be retrieved from writeback pages. | ||
937 | */ | ||
938 | .depends_on = 1 << memory_cgrp_id, | ||
939 | #endif | ||
932 | }; | 940 | }; |
933 | EXPORT_SYMBOL_GPL(blkio_cgrp_subsys); | 941 | EXPORT_SYMBOL_GPL(blkio_cgrp_subsys); |
934 | 942 | ||
@@ -1120,7 +1128,8 @@ int blkcg_policy_register(struct blkcg_policy *pol) | |||
1120 | 1128 | ||
1121 | /* everything is in place, add intf files for the new policy */ | 1129 | /* everything is in place, add intf files for the new policy */ |
1122 | if (pol->cftypes) | 1130 | if (pol->cftypes) |
1123 | WARN_ON(cgroup_add_cftypes(&blkio_cgrp_subsys, pol->cftypes)); | 1131 | WARN_ON(cgroup_add_legacy_cftypes(&blkio_cgrp_subsys, |
1132 | pol->cftypes)); | ||
1124 | ret = 0; | 1133 | ret = 0; |
1125 | out_unlock: | 1134 | out_unlock: |
1126 | mutex_unlock(&blkcg_pol_mutex); | 1135 | mutex_unlock(&blkcg_pol_mutex); |
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); |