History

blkcg: implement per-queue policy activation

All blkcg policies were assumed to be enabled on all request_queues. Due to various implementation obstacles, during the recent blkcg core updates, this was temporarily implemented as shooting down all !root blkgs on elevator switch and policy [de]registration combined with half-broken in-place root blkg updates. In addition to being buggy and racy, this meant losing all blkcg configurations across those events. Now that blkcg is cleaned up enough, this patch replaces the temporary implementation with proper per-queue policy activation. Each blkcg policy should call the new blkcg_[de]activate_policy() to enable and disable the policy on a specific queue. blkcg_activate_policy() allocates and installs policy data for the policy for all existing blkgs. blkcg_deactivate_policy() does the reverse. If a policy is not enabled for a given queue, blkg printing / config functions skip the respective blkg for the queue. blkcg_activate_policy() also takes care of root blkg creation, and cfq_init_queue() and blk_throtl_init() are updated accordingly. This replaces blkcg_bypass_{start|end}() and update_root_blkg_pd() unnecessary. Dropped. v2: cfq_init_queue() was returning uninitialized @ret on root_group alloc failure if !CONFIG_CFQ_GROUP_IOSCHED. Fixed.

Tejun Heo committed 14 years ago

Commit a2b16931 parent 03d8e116 files · +201 −134Browse files

Showing the changes to include/linux/blkdev.h (1 of 6 files). Show all

Unified · Split

include/linux/blkdev.h+1−0
@@ -370,6 +370,7 @@ struct request_queue { · 369 unmodified lines
370 370
371 struct list_head icq_list;371 struct list_head icq_list;
372#ifdef CONFIG_BLK_CGROUP372#ifdef CONFIG_BLK_CGROUP
373 DECLARE_BITMAP (blkcg_pols, BLKCG_MAX_POLS);
373 struct blkio_group *root_blkg;374 struct blkio_group *root_blkg;
374 struct list_head blkg_list;375 struct list_head blkg_list;
375#endif376#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t