[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 11 Nov 2022 10:17:09 +0000
From: Punit Agrawal <punit.agrawal@...edance.com>
To: Yicong Yang <yangyicong@...wei.com>
Cc: <akpm@...ux-foundation.org>, <linux-mm@...ck.org>,
<linux-arm-kernel@...ts.infradead.org>, <x86@...nel.org>,
<catalin.marinas@....com>, <will@...nel.org>,
<anshuman.khandual@....com>, <linux-doc@...r.kernel.org>,
<corbet@....net>, <peterz@...radead.org>, <arnd@...db.de>,
<punit.agrawal@...edance.com>, <linux-kernel@...r.kernel.org>,
<darren@...amperecomputing.com>, <yangyicong@...ilicon.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>,
<linuxppc-dev@...ts.ozlabs.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>
Subject: Re: [External] [PATCH v5 0/2] arm64: support batched/deferred tlb
shootdown during page reclamation
Yicong Yang <yangyicong@...wei.com> writes:
> From: Yicong Yang <yangyicong@...ilicon.com>
>
> Though ARM64 has the hardware to do tlb shootdown, the hardware
> broadcasting is not free.
> A simplest micro benchmark shows even on snapdragon 888 with only
> 8 cores, the overhead for ptep_clear_flush is huge even for paging
> out one page mapped by only one process:
> 5.36% a.out [kernel.kallsyms] [k] ptep_clear_flush
>
> While pages are mapped by multiple processes or HW has more CPUs,
> the cost should become even higher due to the bad scalability of
> tlb shootdown.
>
> The same benchmark can result in 16.99% CPU consumption on ARM64
> server with around 100 cores according to Yicong's test on patch
> 4/4.
>
> This patchset leverages the existing BATCHED_UNMAP_TLB_FLUSH by
> 1. only send tlbi instructions in the first stage -
> arch_tlbbatch_add_mm()
> 2. wait for the completion of tlbi by dsb while doing tlbbatch
> sync in arch_tlbbatch_flush()
> Testing on snapdragon shows the overhead of ptep_clear_flush
> is removed by the patchset. The micro benchmark becomes 5% faster
> even for one page mapped by single process on snapdragon 888.
>
> With this support we're possible to do more optimization for memory
> reclamation and migration[*].
I applied the patches on v6.1-rc4 and was able to see the drop in
ptep_clear_flush() in the perf report when running the test program from
Patch 2. The tests were done on a rk3399 based system with benefits
visible when running the tests on either of the clusters.
So, for the series,
Tested-by: Punit Agrawal <punit.agrawal@...edance.com>
Thanks,
Punit
[...]
Powered by blists - more mailing lists