• Waiman Long's avatar
    cpuset: Use descriptive text when reading/writing cpuset.sched.partition · bb5b553c
    Waiman Long authored
    Currently, cpuset.sched.partition returns the values, 0, 1 or -1 on
    read. A person who is not familiar with the partition code may not
    understand what they mean.
    
    In order to make cpuset.sched.partition more user-friendly, it will
    now display the following descriptive text on read:
    
      "root" - A partition root (top cpuset of a partition)
      "member" - A non-root member of a partition
      "root invalid" - An invalid partition root
    
    Note that there is at least one partition in the whole cgroup hierarchy.
    The top cpuset is the root of that partition.  The rests are either a
    root if it starts a new partition or a member of a partition.
    
    The cpuset.sched.partition file will now also accept "root" and
    "member" besides 1 and 0 as valid input values. The "root invalid"
    value is internal only and cannot be written to the file.
    Suggested-by: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarWaiman Long <longman@redhat.com>
    Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    bb5b553c
cpuset.c 98.4 KB