mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 11:03:43 +02:00
cpuset: Don't always flush cpuset_migrate_mm_wq in cpuset_write_resmask
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@bytedance.com> Reviewed-by: Michal Koutný <mkoutny@suse.com> Reviewed-by: Waiman Long <longman@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
e117ff1129
commit
c0fb16ef88
|
|
@ -3291,7 +3291,8 @@ ssize_t cpuset_write_resmask(struct kernfs_open_file *of,
|
|||
rebuild_sched_domains_locked();
|
||||
out_unlock:
|
||||
cpuset_full_unlock();
|
||||
flush_workqueue(cpuset_migrate_mm_wq);
|
||||
if (of_cft(of)->private == FILE_MEMLIST)
|
||||
flush_workqueue(cpuset_migrate_mm_wq);
|
||||
return retval ?: nbytes;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user