]> Git Repo - linux.git/commit
sched/fair: Ensure that the CFS parent is added after unthrottling
authorRik van Riel <[email protected]>
Mon, 21 Jun 2021 17:43:30 +0000 (19:43 +0200)
committerIngo Molnar <[email protected]>
Tue, 22 Jun 2021 12:06:57 +0000 (14:06 +0200)
commitfdaba61ef8a268d4136d0a113d153f7a89eb9984
treed2fd026e595d2b5eabbe15aadd3dc6382f55d240
parenta96bfed64c8986d6404e553f18203cae1f5ac7e6
sched/fair: Ensure that the CFS parent is added after unthrottling

Ensure that a CFS parent will be in the list whenever one of its children is also
in the list.

A warning on rq->tmp_alone_branch != &rq->leaf_cfs_rq_list has been
reported while running LTP test cfs_bandwidth01.

Odin Ugedal found the root cause:

$ tree /sys/fs/cgroup/ltp/ -d --charset=ascii
/sys/fs/cgroup/ltp/
|-- drain
`-- test-6851
    `-- level2
|-- level3a
|   |-- worker1
|   `-- worker2
`-- level3b
    `-- worker3

Timeline (ish):
- worker3 gets throttled
- level3b is decayed, since it has no more load
- level2 get throttled
- worker3 get unthrottled
- level2 get unthrottled
  - worker3 is added to list
  - level3b is not added to list, since nr_running==0 and is decayed

 [ Vincent Guittot: Rebased and updated to fix for the reported warning. ]

Fixes: a7b359fc6a37 ("sched/fair: Correctly insert cfs_rq's to list on unthrottle")
Reported-by: Sachin Sant <[email protected]>
Suggested-by: Vincent Guittot <[email protected]>
Signed-off-by: Rik van Riel <[email protected]>
Signed-off-by: Vincent Guittot <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Tested-by: Sachin Sant <[email protected]>
Acked-by: Odin Ugedal <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
kernel/sched/fair.c
This page took 0.050917 seconds and 4 git commands to generate.