lkml.org 
[lkml]   [2015]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3 V8] workqueue: Allow modifying low level unbound workqueue cpumask
Hello,

On Tue, Apr 28, 2015 at 09:44:44AM +0800, Lai Jiangshan wrote:
> >> +int workqueue_set_unbound_cpumask(cpumask_var_t cpumask);
> >
> > Why is this a public function?
>
>
> In V4 patchset, Kevin Hilman had requested the wq_unbound_cpumask
> to be "cpumask_complement(wq_unbound_cpumask, tick_nohz_full_mask);"
>
> I replied against it and I suggested that wq_unbound_cpumask can be
> re-set after workqueue initialized it.
>
> And Frederic Weisbecker seemed on my side:
> """
> If it should be the default on NO_HZ_FULL, maybe we should do this from the
> tick nohz code. Some late or fs initcall that will do the workqueue affinity,
> timer affinity, etc...
> """
>
> So, we need an API to modify the wq_unbound_cpumask, and I provided
> this public function. Otherwise, the other code can't modify it.

I see. I don't have too strong an opinion; however, changing the mask
is a fairly heavy operation. Are there specific reasons why we don't
want to follow the nohz config right away? Also, even if we do it
this way, the function doesn't need to be EXPORT_SYMBOL_GPL()'d,
right?

> > Is the following list_del() necessary? The list is never used again,
> > right?
>
> It isn't necessary. It was added in V7. I thought it could make
> the code more normal.

The problem with doing unnecessary stuff is that it's bound to be
inconsistent and makes the reader wonder whether something else which
requires such extra operation is going on when there's none. It tends
to mislead than anything else.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2015-04-28 06:21    [W:0.050 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site