From: Catalin Marinas <catalin.marinas@arm.com>
To: Yicong Yang <yangyicong@huawei.com>
Cc: mark.rutland@arm.com, wangkefeng.wang@huawei.com,
prime.zeng@hisilicon.com, realmz6@gmail.com,
linux-doc@vger.kernel.org, peterz@infradead.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Nadav Amit <namit@vmware.com>,
punit.agrawal@bytedance.com, linux-riscv@lists.infradead.org,
will@kernel.org, linux-s390@vger.kernel.org,
zhangshiming@oppo.com, lipeifeng@oppo.com, corbet@lwn.net,
x86@kernel.org, Barry Song <21cnbao@gmail.com>,
Mel Gorman <mgorman@suse.de>,
ryan.roberts@arm.com, arnd@arndb.de, anshuman.khandual@arm.com,
Barry Song <v-songbaohua@oppo.com>,
openrisc@lists.librecores.org, darren@os.amperecomputing.com,
Jonathan.Cameron@huawei.com, yangyicong@hisilicon.com,
linux-arm-kernel@lists.infradead.org, guojian@oppo.com,
xhao@linux.alibaba.com, linux-mips@vger.kernel.org,
huzhanyuan@oppo.com, akpm@linux-foundation.org,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v10 4/4] arm64: support batched/deferred tlb shootdown during page reclamation/migration
Date: Sun, 16 Jul 2023 08:11:56 -0700 [thread overview]
Message-ID: <ZLQIvPpKvjWppc59@arm.com> (raw)
In-Reply-To: <20230710083914.18336-5-yangyicong@huawei.com>
On Mon, Jul 10, 2023 at 04:39:14PM +0800, Yicong Yang wrote:
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 7856c3a3e35a..f0ce8208c57f 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -96,6 +96,7 @@ config ARM64
> select ARCH_SUPPORTS_NUMA_BALANCING
> select ARCH_SUPPORTS_PAGE_TABLE_CHECK
> select ARCH_SUPPORTS_PER_VMA_LOCK
> + select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH if EXPERT
I don't want EXPERT to turn on a feature that's not selectable by the
user. This would lead to different performance behaviour based on
EXPERT. Just select it unconditionally.
> diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h
> index 412a3b9a3c25..4bb9cec62e26 100644
> --- a/arch/arm64/include/asm/tlbflush.h
> +++ b/arch/arm64/include/asm/tlbflush.h
> @@ -254,17 +254,23 @@ static inline void flush_tlb_mm(struct mm_struct *mm)
> dsb(ish);
> }
>
> -static inline void flush_tlb_page_nosync(struct vm_area_struct *vma,
> - unsigned long uaddr)
> +static inline void __flush_tlb_page_nosync(struct mm_struct *mm,
> + unsigned long uaddr)
> {
> unsigned long addr;
>
> dsb(ishst);
> - addr = __TLBI_VADDR(uaddr, ASID(vma->vm_mm));
> + addr = __TLBI_VADDR(uaddr, ASID(mm));
> __tlbi(vale1is, addr);
> __tlbi_user(vale1is, addr);
> }
>
> +static inline void flush_tlb_page_nosync(struct vm_area_struct *vma,
> + unsigned long uaddr)
> +{
> + return __flush_tlb_page_nosync(vma->vm_mm, uaddr);
> +}
> +
> static inline void flush_tlb_page(struct vm_area_struct *vma,
> unsigned long uaddr)
> {
> @@ -272,6 +278,42 @@ static inline void flush_tlb_page(struct vm_area_struct *vma,
> dsb(ish);
> }
>
> +#ifdef CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
If it's selected unconditionally, we won't need this #ifdef here.
> +
> +static inline bool arch_tlbbatch_should_defer(struct mm_struct *mm)
> +{
> +#ifdef CONFIG_ARM64_WORKAROUND_REPEAT_TLBI
> + /*
> + * TLB flush deferral is not required on systems, which are affected with
"affected by" and drop the comma before "which".
--
Catalin
next prev parent reply other threads:[~2023-07-16 15:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-10 8:39 [PATCH v10 0/4] arm64: support batched/deferred tlb shootdown during page reclamation/migration Yicong Yang
2023-07-10 8:39 ` [PATCH v10 1/4] mm/tlbbatch: Introduce arch_tlbbatch_should_defer() Yicong Yang
2023-07-10 8:39 ` [PATCH v10 2/4] mm/tlbbatch: Rename and extend some functions Yicong Yang
2023-07-10 8:39 ` [PATCH v10 3/4] mm/tlbbatch: Introduce arch_flush_tlb_batched_pending() Yicong Yang
2023-07-10 8:39 ` [PATCH v10 4/4] arm64: support batched/deferred tlb shootdown during page reclamation/migration Yicong Yang
2023-07-16 15:11 ` Catalin Marinas [this message]
2023-07-17 12:26 ` Yicong Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZLQIvPpKvjWppc59@arm.com \
--to=catalin.marinas@arm.com \
--cc=21cnbao@gmail.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=arnd@arndb.de \
--cc=corbet@lwn.net \
--cc=darren@os.amperecomputing.com \
--cc=guojian@oppo.com \
--cc=huzhanyuan@oppo.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lipeifeng@oppo.com \
--cc=mark.rutland@arm.com \
--cc=mgorman@suse.de \
--cc=namit@vmware.com \
--cc=openrisc@lists.librecores.org \
--cc=peterz@infradead.org \
--cc=prime.zeng@hisilicon.com \
--cc=punit.agrawal@bytedance.com \
--cc=realmz6@gmail.com \
--cc=ryan.roberts@arm.com \
--cc=v-songbaohua@oppo.com \
--cc=wangkefeng.wang@huawei.com \
--cc=will@kernel.org \
--cc=x86@kernel.org \
--cc=xhao@linux.alibaba.com \
--cc=yangyicong@hisilicon.com \
--cc=yangyicong@huawei.com \
--cc=zhangshiming@oppo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).