[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5e9efe12-0f59-4836-81cd-d39805f3b243@redhat.com>
Date: Thu, 4 Sep 2025 11:12:43 -0400
From: Waiman Long <llong@...hat.com>
To: Chuyi Zhou <zhouchuyi@...edance.com>, tj@...nel.org, mkoutny@...e.com,
hannes@...xchg.org
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] cpuset: Don't always flush cpuset_migrate_mm_wq in
cpuset_write_resmask
On 9/4/25 3:45 AM, Chuyi Zhou wrote:
> It is unnecessary to always wait for the flush operation of
> cpuset_migrate_mm_wq to complete in cpuset_write_resmask, as modifying
> cpuset.cpus or cpuset.exclusive does not trigger mm migrations. The
> flush_workqueue can be executed only when cpuset.mems is modified.
>
> Signed-off-by: Chuyi Zhou <zhouchuyi@...edance.com>
> ---
> kernel/cgroup/cpuset.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
> index 27adb04df675d..3d8492581c8c4 100644
> --- a/kernel/cgroup/cpuset.c
> +++ b/kernel/cgroup/cpuset.c
> @@ -3256,7 +3256,8 @@ ssize_t cpuset_write_resmask(struct kernfs_open_file *of,
> out_unlock:
> mutex_unlock(&cpuset_mutex);
> cpus_read_unlock();
> - flush_workqueue(cpuset_migrate_mm_wq);
> + if (of_cft(of)->private == FILE_MEMLIST)
> + flush_workqueue(cpuset_migrate_mm_wq);
> return retval ?: nbytes;
> }
>
LGTM
Reviewed-by: Waiman Long <longman@...hat.com>
Powered by blists - more mailing lists