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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8e391962-4e3a-5a56-64b4-78e8637e3b8c@huawei.com>
Date:   Tue, 27 Sep 2022 17:15:40 +0800
From:   Yicong Yang <yangyicong@...wei.com>
To:     Anshuman Khandual <anshuman.khandual@....com>
CC:     <yangyicong@...ilicon.com>, <corbet@....net>,
        <peterz@...radead.org>, <arnd@...db.de>,
        <linux-kernel@...r.kernel.org>, <darren@...amperecomputing.com>,
        <huzhanyuan@...o.com>, <lipeifeng@...o.com>,
        <zhangshiming@...o.com>, <guojian@...o.com>, <realmz6@...il.com>,
        <linux-mips@...r.kernel.org>, <openrisc@...ts.librecores.org>,
        <linux-mm@...ck.org>, <x86@...nel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linuxppc-dev@...ts.ozlabs.org>, <akpm@...ux-foundation.org>,
        <linux-riscv@...ts.infradead.org>, <linux-s390@...r.kernel.org>,
        Barry Song <21cnbao@...il.com>, <wangkefeng.wang@...wei.com>,
        <xhao@...ux.alibaba.com>, <prime.zeng@...ilicon.com>,
        Barry Song <v-songbaohua@...o.com>,
        Nadav Amit <namit@...are.com>, Mel Gorman <mgorman@...e.de>,
        <catalin.marinas@....com>, <will@...nel.org>,
        <linux-doc@...r.kernel.org>
Subject: Re: [PATCH v4 2/2] arm64: support batched/deferred tlb shootdown
 during page reclamation

On 2022/9/27 14:16, Anshuman Khandual wrote:
> [...]
> 
> On 9/21/22 14:13, Yicong Yang wrote:
>> +static inline bool arch_tlbbatch_should_defer(struct mm_struct *mm)
>> +{
>> +	/* for small systems with small number of CPUs, TLB shootdown is cheap */
>> +	if (num_online_cpus() <= 4)
> 
> It would be great to have some more inputs from others, whether 4 (which should
> to be codified into a macro e.g ARM64_NR_CPU_DEFERRED_TLB, or something similar)
> is optimal for an wide range of arm64 platforms.
> 

Do you prefer this macro to be static or make it configurable through kconfig then
different platforms can make choice based on their own situations? It maybe hard to
test on all the arm64 platforms.

Thanks.

>> +		return false;> +
>> +#ifdef CONFIG_ARM64_WORKAROUND_REPEAT_TLBI
>> +	if (unlikely(this_cpu_has_cap(ARM64_WORKAROUND_REPEAT_TLBI)))
>> +		return false;
>> +#endif
>> +
>> +	return true;
>> +}
>> +
> 
> [...]
> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ