Repository navigation
Commit afb2bc1
committed
cgroup: don't guarantee cgroup.procs is sorted if sane_behavior
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: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>1 parent 0450236 commit afb2bc1
2 files changed
Lines changed: 49 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
278 | 281 | | |
279 | 282 | | |
280 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3564 | 3564 | | |
3565 | 3565 | | |
3566 | 3566 | | |
| 3567 | + | |
| 3568 | + | |
| 3569 | + | |
| 3570 | + | |
| 3571 | + | |
| 3572 | + | |
| 3573 | + | |
| 3574 | + | |
| 3575 | + | |
| 3576 | + | |
| 3577 | + | |
| 3578 | + | |
| 3579 | + | |
| 3580 | + | |
| 3581 | + | |
| 3582 | + | |
| 3583 | + | |
| 3584 | + | |
| 3585 | + | |
| 3586 | + | |
| 3587 | + | |
| 3588 | + | |
| 3589 | + | |
| 3590 | + | |
| 3591 | + | |
| 3592 | + | |
| 3593 | + | |
| 3594 | + | |
| 3595 | + | |
| 3596 | + | |
| 3597 | + | |
| 3598 | + | |
| 3599 | + | |
3567 | 3600 | | |
3568 | 3601 | | |
3569 | 3602 | | |
3570 | 3603 | | |
3571 | 3604 | | |
| 3605 | + | |
| 3606 | + | |
| 3607 | + | |
| 3608 | + | |
| 3609 | + | |
3572 | 3610 | | |
3573 | 3611 | | |
3574 | 3612 | | |
| |||
3656 | 3694 | | |
3657 | 3695 | | |
3658 | 3696 | | |
3659 | | - | |
| 3697 | + | |
| 3698 | + | |
| 3699 | + | |
| 3700 | + | |
3660 | 3701 | | |
3661 | 3702 | | |
3662 | 3703 | | |
| |||
3777 | 3818 | | |
3778 | 3819 | | |
3779 | 3820 | | |
3780 | | - | |
| 3821 | + | |
3781 | 3822 | | |
3782 | 3823 | | |
3783 | | - | |
| 3824 | + | |
3784 | 3825 | | |
3785 | 3826 | | |
3786 | 3827 | | |
| |||
3791 | 3832 | | |
3792 | 3833 | | |
3793 | 3834 | | |
3794 | | - | |
| 3835 | + | |
3795 | 3836 | | |
3796 | 3837 | | |
3797 | 3838 | | |
| |||
3820 | 3861 | | |
3821 | 3862 | | |
3822 | 3863 | | |
3823 | | - | |
| 3864 | + | |
3824 | 3865 | | |
3825 | 3866 | | |
3826 | 3867 | | |
| |||
0 commit comments