• Tejun Heo's avatar
    cgroup: don't guarantee cgroup.procs is sorted if sane_behavior · afb2bc14
    Tejun Heo authored
    For some reason, tasks and cgroup.procs guarantee that the result is
    sorted.  This is the only reason this whole pidlist logic is necessary
    instead of just iterating through sorted member tasks.  We can't do
    anything about the existing interface but at least ensure that such
    expectation doesn't exist for the new interface so that pidlist logic
    may be removed in the distant future.
    
    This patch scrambles the sort order if sane_behavior so that the
    output is usually not sorted in the new interface.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatarLi Zefan <lizefan@huawei.com>
    afb2bc14
cgroup.c 149 KB