[lkml]   [2015]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 4/4] workqueue: Allow modifying low level unbound workqueue cpumask
On 03/13/2015 01:42 AM, Christoph Lameter wrote:
> On Thu, 12 Mar 2015, Lai Jiangshan wrote:
>> The per-nodes' pwqs are mandatorily controlled by the low level cpumask, while
>> the default pwq ignores the low level cpumask when (and ONLY when) the cpumask set
>> by the user doesn't overlap with the low level cpumask. In this case, we can't
>> apply the empty cpumask to the default pwq, so we use the user-set cpumask
>> directly.
> I am wondering now why we have two cpumasks?

What's your meaning? which two cpumask?

The per-nodes' pwqs' cpumask and the default pwq's cpumask?
They refer to different pool, so they have different cpumask.

If the per-nodes' pwqs exist, they were controlled by A
(A = user-set-cpumask & possible-cpus-of-the-node). Now after this patch,
they are controlled by B (B = A & the-low-level-cpumak).

if A is empty or B is empty, we used default pwq for the node.

The default pwq is different, it was controlled by C (C = user-set-cpumask),
and after this patch, it will be controlled by D
(D = user-set-cpumask(C) & the-low-level-cpumask), But D may be empty,
we can't have a default pwq with empty cpumask, so we have
use C instead in this case.

> A script can just interate
> through the work queues if we want to set them all right? Then we do not
> have to deal with the conflict between the settings in the kernel.

wq->unbound_attrs->cpumask and the-low-level-cpumask can be set by users.
they may be set different or even non-intersect, the non-intersect case
is not real conflict, but it is possible, we have to handle it.

 \ /
  Last update: 2015-03-13 02:41    [W:0.062 / U:2.720 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site