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: <CAGsJ_4wp03dV0JqRk5NiSSEwPxvMH7z3SE0FhX8Dc8DjDPuVyw@mail.gmail.com>
Date:   Fri, 8 Jul 2022 20:17:12 +1200
From:   Barry Song <21cnbao@...il.com>
To:     Nadav Amit <namit@...are.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Arnd Bergmann <arnd@...db.de>,
        Catalin Marinas <catalin.marinas@....com>,
        Jonathan Corbet <corbet@....net>,
        "darren@...amperecomputing.com" <darren@...amperecomputing.com>,
        "guojian@...o.com" <guojian@...o.com>,
        "huzhanyuan@...o.com" <huzhanyuan@...o.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "lipeifeng@...o.com" <lipeifeng@...o.com>,
        "mgorman@...e.de" <mgorman@...e.de>,
        "realmz6@...il.com" <realmz6@...il.com>,
        "v-songbaohua@...o.com" <v-songbaohua@...o.com>,
        "will@...nel.org" <will@...nel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "yangyicong@...ilicon.com" <yangyicong@...ilicon.com>,
        "zhangshiming@...o.com" <zhangshiming@...o.com>
Subject: Re: [PATCH 2/4] mm: rmap: Allow platforms without mm_cpumask to defer
 TLB flush

On Fri, Jul 8, 2022 at 8:08 PM Nadav Amit <namit@...are.com> wrote:
>
> On Jul 7, 2022, at 11:59 PM, Barry Song <21cnbao@...il.com> wrote:
>
> >> The cpumask_empty() is indeed just another memory access, which is most
> >> likely ok. But wouldn’t adding something like CONFIG_ARCH_HAS_MM_CPUMASK
> >> make the code simpler and (slightly, certainly slightly) more performant?
> >
> > Yep. good suggestion, Nadav. So the code will be as below, right?
>
> Hmmm… Although it is likely to work (because only x86 and arm would use this
> batch flushing), I think that for consistency ARCH_HAS_MM_CPUMASK should be
> correct for all architectures.
>
> Is it really only x86 that has mm_cpumask()?

i am quite sure there are some other platforms having mm_cpumask().
for example, arm(not arm64).
but i am not exactly sure of the situation of each individual arch. thus,
i don't risk changing their source code.
but arm64 is the second platform looking for tlbbatch, and
ARCH_HAS_MM_CPUMASK only affects tlbbatch. so i would
expect those platforms to fill their ARCH_HAS_MM_CPUMASK
while they start to bringup their tlbbatch? for this moment,
we only need to make certain we don't break x86?
does it make sense?

Thanks
Barry


>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ