diff options
author | Tejun Heo <tj@kernel.org> | 2012-03-05 13:15:28 -0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-03-06 21:27:24 +0100 |
commit | 4f85cb96d9d2fbbb7160db855a6beee1baced5e5 (patch) | |
tree | 5472bba04490da05fa6ca8f780431b37bd7375cb /block/blk-cgroup.h | |
parent | 852c788f8365062c8a383c5a93f7f7289977cb50 (diff) | |
download | kernel_goldelico_gta04-4f85cb96d9d2fbbb7160db855a6beee1baced5e5.zip kernel_goldelico_gta04-4f85cb96d9d2fbbb7160db855a6beee1baced5e5.tar.gz kernel_goldelico_gta04-4f85cb96d9d2fbbb7160db855a6beee1baced5e5.tar.bz2 |
block: make block cgroup policies follow bio task association
Implement bio_blkio_cgroup() which returns the blkcg associated with
the bio if exists or %current's blkcg, and use it in blk-throttle and
cfq-iosched propio. This makes both cgroup policies honor task
association for the bio instead of always assuming %current.
As nobody is using bio_set_task() yet, this doesn't introduce any
behavior change.
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 'block/blk-cgroup.h')
-rw-r--r-- | block/blk-cgroup.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index 66eaefe..98cd8533 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h @@ -379,7 +379,7 @@ static inline void blkiocg_set_start_empty_time(struct blkio_group *blkg, #ifdef CONFIG_BLK_CGROUP extern struct blkio_cgroup blkio_root_cgroup; extern struct blkio_cgroup *cgroup_to_blkio_cgroup(struct cgroup *cgroup); -extern struct blkio_cgroup *task_blkio_cgroup(struct task_struct *tsk); +extern struct blkio_cgroup *bio_blkio_cgroup(struct bio *bio); extern struct blkio_group *blkg_lookup(struct blkio_cgroup *blkcg, struct request_queue *q); struct blkio_group *blkg_lookup_create(struct blkio_cgroup *blkcg, @@ -413,7 +413,7 @@ struct cgroup; static inline struct blkio_cgroup * cgroup_to_blkio_cgroup(struct cgroup *cgroup) { return NULL; } static inline struct blkio_cgroup * -task_blkio_cgroup(struct task_struct *tsk) { return NULL; } +bio_blkio_cgroup(struct bio *bio) { return NULL; } static inline struct blkio_group *blkg_lookup(struct blkio_cgroup *blkcg, void *key) { return NULL; } |