• T
    blkcg: implement interface for the unified hierarchy · 2ee867dc
    Tejun Heo 提交于
    blkcg interface grew to be the biggest of all controllers and
    unfortunately most inconsistent too.  The interface files are
    inconsistent with a number of cloes duplicates.  Some files have
    recursive variants while others don't.  There's distinction between
    normal and leaf weights which isn't intuitive and there are a lot of
    stat knobs which don't make much sense outside of debugging and expose
    too much implementation details to userland.
    
    In the unified hierarchy, everything is always hierarchical and
    internal nodes can't have tasks rendering the two structural issues
    twisting the current interface.  The interface has to be updated in a
    significant anyway and this is a good chance to revamp it as a whole.
    This patch implements blkcg interface for the unified hierarchy.
    
    * (from a previous patch) blkcg is identified by "io" instead of
      "blkio" on the unified hierarchy.  Given that the whole interface is
      updated anyway, the rename shouldn't carry noticeable conversion
      overhead.
    
    * The original interface consisted of 27 files is replaced with the
      following three files.
    
      blkio.stat	: per-blkcg stats
      blkio.weight	: per-cgroup and per-cgroup-queue weight settings
      blkio.max	: per-cgroup-queue bps and iops max limits
    
    Documentation/cgroups/unified-hierarchy.txt updated accordingly.
    
    v2: blkcg_policy->dfl_cftypes wasn't removed on
        blkcg_policy_unregister() corrupting the cftypes list.  Fixed.
    Signed-off-by: NTejun Heo <tj@kernel.org>
    Signed-off-by: NJens Axboe <axboe@fb.com>
    2ee867dc
blk-cgroup.c 35.1 KB