From: Waiman Long <llong@redhat.com>
To: Chen Ridong <chenridong@huaweicloud.com>,
tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
lujialin4@huawei.com
Subject: Re: [PATCH RESEND -next 00/21] cpuset: rework local partition logic
Date: Sun, 4 Jan 2026 23:33:56 -0500 [thread overview]
Message-ID: <13975af6-97af-49d8-ae85-d126a65715ee@redhat.com> (raw)
In-Reply-To: <7937ad21-8c98-4bd8-8a5d-93f868bcb8b5@huaweicloud.com>
On 1/4/26 11:01 PM, Chen Ridong wrote:
>
> On 2025/12/25 20:30, Chen Ridong wrote:
>> From: Chen Ridong <chenridong@huawei.com>
>>
>> The current local partition implementation consolidates all operations
>> (enable, disable, invalidate, and update) within the large
>> update_parent_effective_cpumask() function, which exceeds 300 lines.
>> This monolithic approach has become increasingly difficult to understand
>> and maintain. Additionally, partition-related fields are updated in
>> multiple locations, leading to redundant code and potential corner case
>> oversights.
>>
>> This patch series refactors the local partition logic by separating
>> operations into dedicated functions: local_partition_enable(),
>> local_partition_disable(), and local_partition_update(), creating
>> symmetry with the existing remote partition infrastructure.
>>
>> The series is organized as follows:
>>
>> 1. Infrastructure Preparation (Patches 1-2):
>> - Code cleanup and preparation for the refactoring work
>>
>> 2. Introduce partition operation helpers (Patches 3-5):
>> - Introduce out partition_enable(), partition_disable(), and
>> partition_update() functions.
>>
>> 3. Use new helpers for remote partition (Patches 6-8)
>>
>> 4. Local Partition Implementation (Patches 9-12):
>> - Separate update_parent_effective_cpumask() into dedicated functions:
>> * local_partition_enable()
>> * local_partition_disable()
>> * local_partition_update()
>>
>> 5. Optimization and Cleanup (Patches 13-21):
>> - Remove redundant partition-related operations
>> - Additional optimizations based on the new architecture
>>
>> base-commit: cc3aa43b44bdb43dfbac0fcb51c56594a11338a8
>>
>> ---
>>
>> Changes in RESEND:
>> 1. Rebase on the next-20251219
>>
>> Changes from RFC v2:
>> 1. Dropped the bugfix (already merged/fixed upstream)
>> 2. Rebased onto next
>> 3. Introduced partition_switch to handle root state switches
>> 4. Directly use local_partition_disable()—no longer first introduce
>> local_partition_invalidate() before unifying the two
>> 5. Incorporated modifications based on Longman's suggestions
>>
>> Changes in RFC v1:
>> 1. Added bugfix for root partition isolcpus at series start.
>> 2. Completed helper function implementations when first introduced.
>> 3. Split larger patches into smaller, more reviewable units.
>> 4. Incorporated feedback from Longman.
>>
>> Chen Ridong (21):
>> cpuset: add early empty cpumask check in partition_xcpus_add/del
>> cpuset: generalize the validate_partition() interface
>> cpuset: introduce partition_enable()
>> cpuset: introduce partition_disable()
>> cpuset: introduce partition_update()
>> cpuset: use partition_enable() for remote partition enablement
>> cpuset: use partition_disable() for remote partition disablement
>> cpuset: use partition_update() for remote partition update
>> cpuset: introduce local_partition_enable()
>> cpuset: introduce local_partition_disable()
>> cpuset: user local_partition_disable() to invalidate local partition
>> cpuset: introduce local_partition_update()
>> cpuset: remove update_parent_effective_cpumask
>> cpuset: remove redundant partition field updates
>> cpuset: simplify partition update logic for hotplug tasks
>> cpuset: use partition_disable for compute_partition_effective_cpumask
>> cpuset: use validate_local_partition in local_partition_enable
>> cpuset: introduce validate_remote_partition
>> cpuset: simplify the update_prstate() function
>> cpuset: remove prs_err clear when notify_partition_change
>> cpuset: Remove unnecessary validation in partition_cpus_change
>>
>> kernel/cgroup/cpuset.c | 1023 ++++++++++++++++++----------------------
>> 1 file changed, 454 insertions(+), 569 deletions(-)
>>
> Hi Longman,
>
> This series has been out for a while. I'd appreciate it if you could take some time to review it.
>
Sorry for being late in reviewing this updated series. However, there
are also other cpuset related patch series that are being reviewed at
the moment. Since this is mainly a cleanup patch making the code easier
to understand, but it does a major restructuring of the existing code
which will likely make the other patches harder to merge. So I would
like to prioritize the other fix and feature patches first. I will try
to review the patches when I have time, but I want this series to be
merged after other cpuset patches are done.
Sorry for the inconvenience caused as you may have to redo the patch
series again when the code base is settled down.
Cheers,
Longman
next prev parent reply other threads:[~2026-01-05 4:34 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-25 12:30 Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 01/21] cpuset: add early empty cpumask check in partition_xcpus_add/del Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 02/21] cpuset: generalize the validate_partition() interface Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 03/21] cpuset: introduce partition_enable() Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 04/21] cpuset: introduce partition_disable() Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 05/21] cpuset: introduce partition_update() Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 06/21] cpuset: use partition_enable() for remote partition enablement Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 07/21] cpuset: use partition_disable() for remote partition disablement Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 08/21] cpuset: use partition_update() for remote partition update Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 09/21] cpuset: introduce local_partition_enable() Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 10/21] cpuset: introduce local_partition_disable() Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 11/21] cpuset: user local_partition_disable() to invalidate local partition Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 12/21] cpuset: introduce local_partition_update() Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 13/21] cpuset: remove update_parent_effective_cpumask Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 14/21] cpuset: remove redundant partition field updates Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 15/21] cpuset: simplify partition update logic for hotplug tasks Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 16/21] cpuset: use partition_disable for compute_partition_effective_cpumask Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 17/21] cpuset: use validate_local_partition in local_partition_enable Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 18/21] cpuset: introduce validate_remote_partition Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 19/21] cpuset: simplify the update_prstate() function Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 20/21] cpuset: remove prs_err clear when notify_partition_change Chen Ridong
2025-12-25 12:30 ` [PATCH RESEND -next 21/21] cpuset: Remove unnecessary validation in partition_cpus_change Chen Ridong
2026-01-05 4:01 ` [PATCH RESEND -next 00/21] cpuset: rework local partition logic Chen Ridong
2026-01-05 4:33 ` Waiman Long [this message]
2026-01-05 6:21 ` Chen Ridong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=13975af6-97af-49d8-ae85-d126a65715ee@redhat.com \
--to=llong@redhat.com \
--cc=cgroups@vger.kernel.org \
--cc=chenridong@huaweicloud.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lujialin4@huawei.com \
--cc=mkoutny@suse.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®