mbox series

[v10,0/8] cgroup/cpuset: Major cpu partition code restructuring

Message ID 20220503162149.1764245-1-longman@redhat.com (mailing list archive)
Headers show
Series cgroup/cpuset: Major cpu partition code restructuring | expand

Message

Waiman Long May 3, 2022, 4:21 p.m. UTC
v10:
 - Relax constraints for changes made to "cpuset.cpus"
   and "cpuset.cpus.partition" as suggested. Now almost all changes
   are allowed.

v9:
 - Add a new patch 1 to remove the child cpuset restriction on parent's
   "cpuset.cpus".
 - Relax initial root partition entry limitation to allow cpuset.cpus to
   overlap that of parent's.
 - An "isolated invalid" displayed type is added to
   cpuset.cpus.partition.
 - Resetting partition root to "member" will leave child partition root
   as invalid.
 - Update documentation and test accordingly.

v8:
 - Reorganize the patch series and rationalize the features and
   constraints of a partition.
 - Update patch descriptions and documentation accordingly.

This patchset include the following enhancements to the cpuset v2
partition code.
 1) Allow partitions that have no task to have empty effective cpus.
 2) Relax the constraints on what changes are allowed in cpuset.cpus
    and cpuset.cpus.partition. However, the partition remain invalid
    until the constraints of a valid partition root is satisfied.
 3) Add a new "isolated" partition type for partitions with no load
    balancing which is available in v1 but not yet in v2.
 4) Allow the reading of cpuset.cpus.partition to include a reason
    string as to why the partition remain invalid.

 In addition, the cgroup-v2.rst documentation file is updated and
 a self test is added to verify the correctness the partition code.

Waiman Long (8):
  cgroup/cpuset: Add top_cpuset check in update_tasks_cpumask()
  cgroup/cpuset: Miscellaneous cleanups & add helper functions
  cgroup/cpuset: Allow no-task partition to have empty
    cpuset.cpus.effective
  cgroup/cpuset: Relax constraints to partition & cpus changes
  cgroup/cpuset: Add a new isolated cpus.partition type
  cgroup/cpuset: Show invalid partition reason string
  cgroup/cpuset: Update description of cpuset.cpus.partition in
    cgroup-v2.rst
  kselftest/cgroup: Add cpuset v2 partition root state test

 Documentation/admin-guide/cgroup-v2.rst       | 145 ++--
 kernel/cgroup/cpuset.c                        | 712 +++++++++++-------
 tools/testing/selftests/cgroup/Makefile       |   5 +-
 .../selftests/cgroup/test_cpuset_prs.sh       | 674 +++++++++++++++++
 tools/testing/selftests/cgroup/wait_inotify.c |  87 +++
 5 files changed, 1295 insertions(+), 328 deletions(-)
 create mode 100755 tools/testing/selftests/cgroup/test_cpuset_prs.sh
 create mode 100644 tools/testing/selftests/cgroup/wait_inotify.c

Comments

Michal Koutný May 4, 2022, 11:28 a.m. UTC | #1
Hello.

On Tue, May 03, 2022 at 12:21:41PM -0400, Waiman Long <longman@redhat.com> wrote:
> v10:
>  - Relax constraints for changes made to "cpuset.cpus"
>    and "cpuset.cpus.partition" as suggested. Now almost all changes
>    are allowed.

I see there were also some other changes from v9 (like the first patches
of series).
Any chance you have a public git repo with both versions for a
convenient range-diff?

Thanks,
Michal
Waiman Long May 4, 2022, 6:33 p.m. UTC | #2
On 5/4/22 07:28, Michal Koutný wrote:
> Hello.
>
> On Tue, May 03, 2022 at 12:21:41PM -0400, Waiman Long <longman@redhat.com> wrote:
>> v10:
>>   - Relax constraints for changes made to "cpuset.cpus"
>>     and "cpuset.cpus.partition" as suggested. Now almost all changes
>>     are allowed.
> I see there were also some other changes from v9 (like the first patches
> of series).
> Any chance you have a public git repo with both versions for a
> convenient range-diff?

That is true. Both patches 1 and 2 are new and the changes are pretty 
straight forward. Patch 1 of v9 has been merged with a latent bug. Patch 
4 of this series is a replacement of patch 3 "cgroup/cpuset: Refining 
features and constraints of a  partition" of v9. The other patches are 
similar to their versions in v9 with some adjustment based on the 
different code base.

I don't have a public repo. Attached is the file diff between v9 and v10 
in cpuset.c with some other unrelated cpuset patches included.

Cheers,
Longman