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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJhGHyA_Z67mF9R6zAGorC13p1r1TeT1525Vgs1CUonv21+G2Q@mail.gmail.com>
Date:   Thu, 8 Jun 2023 14:33:53 +0800
From:   Lai Jiangshan <jiangshanlai@...il.com>
To:     tj@...nel.org, jiangshanlai@...il.com,
        linux-kernel@...r.kernel.org, pmladek@...e.com,
        zyhtheonly@...il.com, zyhtheonly@...h.net, zwp10758@...il.com
Cc:     tiozhang@...iglobal.com
Subject: Re: [PATCH] workqueue: introduce queue_work_cpumask to queue work
 onto a given cpumask

On Tue, Jun 6, 2023 at 5:31 PM Tio Zhang <tiozhang@...iglobal.com> wrote:
>
> Introduce queue_work_cpumask to queue work on a "random" CPU onto a given
> cpumask. It would be helpful when devices/modules want to assign works on
> different cpusets but do not want to maintain extra workqueues, since they
> have to alloc different workqueues and set different
> workqueue_attrs->cpumask in the past times.
>
> For now only available for unbound workqueues, We will try to further
> patch it.
> And default to the first CPU that is in the intersection of the cpumask
> given and the online cpumask.
> The only exception is if the CPU is local in the cpuset we will just use
> the current CPU.
>
> The implementation and comments are referenced from
> 'commit 8204e0c1113d ("workqueue: Provide queue_work_node to queue work
> near a given NUMA node")'
>

The code seems duplicated too. Could you do a little refactoring and make
they (queue_work_cpumask() & queue_work_node()) share some code?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ