aboutsummaryrefslogtreecommitdiff
path: root/CREDITS
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-03-05 13:15:14 -0800
committerJens Axboe <axboe@kernel.dk>2012-03-06 21:27:23 +0100
commit0381411e4b1a52cee134eb73750e5e3cc1155d09 (patch)
tree32aa1d0b8a2ca8277e60e8b78dd731d193440924 /CREDITS
parent923adde1be1df57cebd80c563058e503376645e8 (diff)
blkcg: let blkcg core handle policy private data allocation
Currently, blkg's are embedded in private data blkcg policy private data structure and thus allocated and freed by policies. This leads to duplicate codes in policies, hinders implementing common part in blkcg core with strong semantics, and forces duplicate blkg's for the same cgroup-q association. This patch introduces struct blkg_policy_data which is a separate data structure chained from blkg. Policies specifies the amount of private data it needs in its blkio_policy_type->pdata_size and blkcg core takes care of allocating them along with blkg which can be accessed using blkg_to_pdata(). blkg can be determined from pdata using pdata_to_blkg(). blkio_alloc_group_fn() method is accordingly updated to blkio_init_group_fn(). For consistency, tg_of_blkg() and cfqg_of_blkg() are replaced with blkg_to_tg() and blkg_to_cfqg() respectively, and functions to map in the reverse direction are added. Except that policy specific data now lives in a separate data structure from blkg, this patch doesn't introduce any functional difference. This will be used to unify blkg's for different policies. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'CREDITS')
0 files changed, 0 insertions, 0 deletions