lkml.org 
[lkml]   [2021]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] hotfix: make sysfs of unbound kworker cpumask more clever
Hello,

On Thu, Oct 14, 2021 at 11:06:41AM +0800, menglong8.dong@gmail.com wrote:
> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> index 1b3eb1e9531f..8216fc45c77b 100644
> --- a/kernel/workqueue.c
> +++ b/kernel/workqueue.c
> @@ -5394,6 +5394,11 @@ int workqueue_set_unbound_cpumask(cpumask_var_t cpumask)
> cpumask_and(cpumask, cpumask, cpu_possible_mask);
> if (!cpumask_empty(cpumask)) {
> apply_wqattrs_lock();
> + if (cpumask_equal(cpumask, wq_unbound_cpumask)) {
> + apply_wqattrs_unlock();
> + free_cpumask_var(saved_cpumask);

A few nitpicks:

* Please replace "hotfix:" with "workqueue:".

* Can you reorganize the code so that it doesn't have to alloc and free the
saved_mask?

Thanks.

--
tejun

\
 
 \ /
  Last update: 2021-10-14 23:25    [W:0.325 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site