diff options
author | Tejun Heo <tj@kernel.org> | 2012-04-01 23:38:44 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-04-01 23:38:44 +0200 |
commit | 3381cb8d2ef1523dbaeec99161d766c25f1e52d6 (patch) | |
tree | b5592ee2a0f84e694282c947611971eb7735622d /block/blk-cgroup.h | |
parent | blkcg: move blkio_group_stats_cpu and friends to blk-throttle.c (diff) | |
download | linux-3381cb8d2ef1523dbaeec99161d766c25f1e52d6.tar.xz linux-3381cb8d2ef1523dbaeec99161d766c25f1e52d6.zip |
blkcg: move blkio_group_conf->weight to cfq
blkio_group_conf->weight is owned by cfq and has no reason to be
defined in blkcg core. Replace it with cfq_group->dev_weight and let
conf setting functions directly set it. If dev_weight is zero, the
cfqg doesn't have device specific weight configured.
Also, rename BLKIO_WEIGHT_* constants to CFQ_WEIGHT_* and rename
blkio_cgroup->weight to blkio_cgroup->cfq_weight. We eventually want
per-policy storage in blkio_cgroup but just mark the ownership of the
field for now.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r-- | block/blk-cgroup.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index e368dd00b8cf..386db2974a08 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h @@ -29,6 +29,11 @@ enum blkio_policy_id { #ifdef CONFIG_BLK_CGROUP +/* CFQ specific, out here for blkcg->cfq_weight */ +#define CFQ_WEIGHT_MIN 10 +#define CFQ_WEIGHT_MAX 1000 +#define CFQ_WEIGHT_DEFAULT 500 + /* cft->private [un]packing for stat printing */ #define BLKCG_STAT_PRIV(pol, off) (((unsigned)(pol) << 16) | (off)) #define BLKCG_STAT_POL(prv) ((unsigned)(prv) >> 16) @@ -46,12 +51,14 @@ enum blkg_rwstat_type { struct blkio_cgroup { struct cgroup_subsys_state css; - unsigned int weight; spinlock_t lock; struct hlist_head blkg_list; /* for policies to test whether associated blkcg has changed */ uint64_t id; + + /* TODO: per-policy storage in blkio_cgroup */ + unsigned int cfq_weight; /* belongs to cfq */ }; struct blkg_stat { @@ -65,7 +72,6 @@ struct blkg_rwstat { }; struct blkio_group_conf { - unsigned int weight; u64 iops[2]; u64 bps[2]; }; @@ -355,10 +361,6 @@ static inline void blkg_put(struct blkio_group *blkg) { } #endif -#define BLKIO_WEIGHT_MIN 10 -#define BLKIO_WEIGHT_MAX 1000 -#define BLKIO_WEIGHT_DEFAULT 500 - #ifdef CONFIG_BLK_CGROUP extern struct blkio_cgroup blkio_root_cgroup; extern struct blkio_cgroup *cgroup_to_blkio_cgroup(struct cgroup *cgroup); |