diff options
author | Tejun Heo <tj@kernel.org> | 2015-08-18 23:55:09 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-08-19 00:49:16 +0200 |
commit | 4c55f4f9ad3001ac1fefdd8d8ca7641d18558e23 (patch) | |
tree | 66be4a0f4881ba200b7e31e9f0efac8912ab0f21 /include | |
parent | blkcg: remove unnecessary blkcg_root handling from css_alloc/free paths (diff) | |
download | linux-4c55f4f9ad3001ac1fefdd8d8ca7641d18558e23.tar.xz linux-4c55f4f9ad3001ac1fefdd8d8ca7641d18558e23.zip |
blkcg: restructure blkg_policy_data allocation in blkcg_activate_policy()
When a policy gets activated, it needs to allocate and install its
policy data on all existing blkg's (blkcg_gq's). Because blkg
iteration is protected by a spinlock, it currently counts the total
number of blkg's in the system, allocates the matching number of
policy data on a list and installs them during a single iteration.
This can be simplified by using speculative GFP_NOWAIT allocations
while iterating and falling back to a preallocated policy data on
failure. If the preallocated one has already been consumed, it
releases the lock, preallocate with GFP_KERNEL and then restarts the
iteration. This can be a bit more expensive than before but policy
activation is a very cold path and shouldn't matter.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/blk-cgroup.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h index 9711fc277c02..db822880242a 100644 --- a/include/linux/blk-cgroup.h +++ b/include/linux/blk-cgroup.h @@ -80,9 +80,6 @@ struct blkg_policy_data { /* the blkg and policy id this per-policy data belongs to */ struct blkcg_gq *blkg; int plid; - - /* used during policy activation */ - struct list_head alloc_node; }; /* |