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: <xhsmhlerka5uq.mognet@vschneid.remote.csb>
Date:   Fri, 19 Aug 2022 11:24:29 +0100
From:   Valentin Schneider <vschneid@...hat.com>
To:     Yury Norov <yury.norov@...il.com>
Cc:     netdev@...r.kernel.org, linux-rdma@...r.kernel.org,
        linux-kernel@...r.kernel.org, Saeed Mahameed <saeedm@...dia.com>,
        Leon Romanovsky <leon@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Mel Gorman <mgorman@...e.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Barry Song <song.bao.hua@...ilicon.com>,
        Heiko Carstens <hca@...ux.ibm.com>,
        Tony Luck <tony.luck@...el.com>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        Gal Pressman <gal@...dia.com>, Tariq Toukan <tariqt@...dia.com>
Subject: Re: [PATCH v2 2/5] cpumask: Introduce for_each_cpu_andnot()

On 18/08/22 15:38, Yury Norov wrote:
> On Wed, Aug 17, 2022 at 06:58:09PM +0100, Valentin Schneider wrote:
>> for_each_cpu_and() is very convenient as it saves having to allocate a
>> temporary cpumask to store the result of cpumask_and(). The same issue
>> applies to cpumask_andnot() which doesn't actually need temporary storage
>> for iteration purposes.
>>
>> Following what has been done for for_each_cpu_and(), introduce
>> for_each_cpu_andnot().
>>
>> Signed-off-by: Valentin Schneider <vschneid@...hat.com>
>
> I'm concerned that this series doesn't give us real examples and tests
> for the new API. If we take it as-is, we'll end up with a dead code for
> a while, quite probably for long.
>

Tariq has at least two uses of for_each_numa_hop_cpu() (which uses
for_each_cpu_andnot()) in net/mlx5e and net/enic). My plan here is to make
sure the cpumask and sched/topology changes are OK, and then I'd let Tariq
carry the whole set with actual users on top.

I wouldn't want to see this merged without users, especially given the
EXPORT_SYMBOL_GPL() in 3/5.

> Can you please submit a new code with a real application for the new API?
> Alternatively, you can rework some existing code.
>
> Briefly grepping, I found good candidate in a core code: __sched_core_flip(),
> and one candidate in arch code: arch/powerpc/kernel/smp.c: update_coregroup_mask.
> I believe there are much more.
>

Some of these look fairly trivial, I'll have a look around.

> Regarding the test, I don't think it's strictly necessary to have it as soon as
> we'll have real users, but it's always good to backup with tests.
>

That sounds sensible enough, I'll have a look at that.

> Thanks,
> Yury

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ