workqueue: make sysfs of unbound kworker cpumask more clever
authorMenglong Dong <imagedong@tencent.com>
Sun, 17 Oct 2021 12:04:02 +0000 (20:04 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:17 +0000 (19:16 +0100)
commitb09a201b714d698d712ba8af1052548df0350d1e
tree0c2733a3b9c90bf0b214fa37b6cd373998998f32
parent0b1a4d0ff911edb4579f9d17f6d7ae04e6fc1582
workqueue: make sysfs of unbound kworker cpumask more clever

[ Upstream commit d25302e46592c97d29f70ccb1be558df31a9a360 ]

Some unfriendly component, such as dpdk, write the same mask to
unbound kworker cpumask again and again. Every time it write to
this interface some work is queue to cpu, even though the mask
is same with the original mask.

So, fix it by return success and do nothing if the cpumask is
equal with the old one.

Signed-off-by: Mengen Sun <mengensun@tencent.com>
Signed-off-by: Menglong Dong <imagedong@tencent.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/workqueue.c