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)
committerTejun Heo <tj@kernel.org>
Tue, 19 Oct 2021 18:38:31 +0000 (08:38 -1000)
commitd25302e46592c97d29f70ccb1be558df31a9a360
treef936e327b38c43fe9f7652eade89799c3a69a948
parentd9abdee5fd5abffd0e763e52fbfa3116de167822
workqueue: make sysfs of unbound kworker cpumask more clever

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>
kernel/workqueue.c