Skip to content

Skip boot CPU or don't allow it from being used in isolcpus and isolated partitions

Waiman Long cgroups linux-doc linux-kselftest lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 2 repliesIn review
  2. v23 patches 11 repliesSuperseded
  3. v13 patches 0 repliesSuperseded

Changes in v3 from the cover letter

- Add tags.
- Patch 1: add a "cpumask_empty()" test in tick_nohz_init() to handle the "nohz_full=0" special case. Other than that, there is no change in its main logic.
- Patch 3: Move down the PERR_ISOLCPU0 check in prstate_housekeeping_conflict(0 and add one more test case to test_cpuset_prs.sh.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3tick/sched: Make tick_nohz_full_mask and HK_TYPE_KERNEL_NOISE cpumask consistentinclude/linux/sched/isolation.h kernel/sched/isolation.c kernel/time/tick-sched.c+19 -00 replies
2/3sched/isolation: Forbid the boot CPU from being domain isolatedDocumentation/admin-guide/kernel-parameters.txt kernel/sched/isolation.c+22 -70 replies
3/3cgroup/cpuset: Disallow CPU 0 from being used in isolated partitionDocumentation/admin-guide/cgroup-v2.rst kernel/cgroup/cpuset-internal.h kernel/cgroup/cpuset.c +1 more+81 -551 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchFrederic WeisbeckerRidong ChenGuopeng Zhang
1/3R-b R-b A-b T-b
2/3R-b R-b A-b T-b
3/3A-b R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH-next v3 0/3] Skip boot CPU or don't allow it from being used in isolcpus and isolated partitions

v3:
- Add tags.
- Patch 1: add a "cpumask_empty()" test in tick_nohz_init() to handle the "nohz_full=0" special case. Other than that, there is no change in its main logic.
- Patch 3: Move down the PERR_ISOLCPU0 check in prstate_housekeeping_conflict(0 and add one more test case to test_cpuset_prs.sh.

v2:
- Update the patches to address issues reported by sashiko.

It is reported that having CPU 0 being domain isolated can cause problems in the some kernel subystems which don't take into account that the boot CPU (CPU 0) may not be a HK_TYPE_DOMAIN housekeeping CPU. As a result, it makes sense to just disallow CPU 0 from being used in the isolcpus=domain boot parameter as well as in cpuset isolated partitions instead of trying to fix the problems when they show up.

The first patch fixes the inconsistency problems between tick_nohz_full_mask and HK_TYPE_KERNEL_NOISE cpumask.

The second patch removes the boot CPU from the isolcpus=domain parameter if set.

The third patch disallows isolated partitions from being created if CPU 0 is specified in its effective exclusive cpumask.

Waiman Long (3):
tick/sched: Make tick_nohz_full_mask and HK_TYPE_KERNEL_NOISE cpumask
consistent
sched/isolation: Forbid the boot CPU from being domain isolated cgroup/cpuset: Disallow CPU 0 from being used in isolated partition

 Documentation/admin-guide/cgroup-v2.rst       |  1 +
 .../admin-guide/kernel-parameters.txt         |  7 +-
 include/linux/sched/isolation.h               |  2 +
 kernel/cgroup/cpuset-internal.h               |  1 +
 kernel/cgroup/cpuset.c                        | 90 ++++++++++---------
 kernel/sched/isolation.c                      | 33 ++++++-
 kernel/time/tick-sched.c                      |  6 ++
 .../selftests/cgroup/test_cpuset_prs.sh       | 44 +++++----
 8 files changed, 122 insertions(+), 62 deletions(-)
Signature · 1 line
2.56.1