lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFDyS3MsrhZu71L2c=Q0fps-x_WRtB=ocx+4N1G+3ne3Yr8Ehg@mail.gmail.com>
Date:   Sat, 21 Oct 2017 19:13:33 +0300
From:   Tal Shorer <tal.shorer@...il.com>
To:     Tejun Heo <tj@...nel.org>
Cc:     jiangshanlai@...il.com,
        "<linux-kernel@...r.kernel.org>" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] workqueue: respect isolated cpus when queueing an unbound work

On Sat, Oct 21, 2017 at 7:04 PM, Tejun Heo <tj@...nel.org> wrote:
> On Sat, Oct 21, 2017 at 07:02:21PM +0300, Tal Shorer wrote:
>> On Sat, Oct 21, 2017 at 6:49 PM, Tejun Heo <tj@...nel.org> wrote:
>> > On Fri, Oct 20, 2017 at 12:44:06AM +0300, Tal Shorer wrote:
>> >> Initialize wq_unbound_cpumask to exclude cpus that were isolated by
>> >> the cmdline's isolcpus parameter.
>> >>
>> >> Signed-off-by: Tal Shorer <tal.shorer@...il.com>
>> >> ---
>> >>  kernel/workqueue.c | 2 +-
>> >>  1 file changed, 1 insertion(+), 1 deletion(-)
>> >>
>> >> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
>> >> index ca937b0..25b351d 100644
>> >> --- a/kernel/workqueue.c
>> >> +++ b/kernel/workqueue.c
>> >> @@ -5546,7 +5546,7 @@ int __init workqueue_init_early(void)
>> >>       WARN_ON(__alignof__(struct pool_workqueue) < __alignof__(long long));
>> >>
>> >>       BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL));
>> >> -     cpumask_copy(wq_unbound_cpumask, cpu_possible_mask);
>> >> +     cpumask_andnot(wq_unbound_cpumask, cpu_possible_mask, cpu_isolated_map);
>> >
>> > Don't we also wanna apply the same masking when wq_unbound_cpumask is
>> > being updated after boot?
>> >
>> I think that if the user actively enables unbound works on isolated
>> cpus, the kernel should allow that.
>
> (Please restore cc list when you reply.)
>
> Do we have a consistent behavior around this?  Are there different
> examples where isolcpus interact with other dynamically configurable
> parameters?
>
sched_setaffinity comes to mind, which obviously bypasses isolcpus.
Running git grep, other uses of cpu_isolated_map are just its
initialization and its use and the initialization of
non_isolated_cpus.

> Thanks.
>
> --
> tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ