From: Randy Dunlap <rdunlap@infradead.org>
To: Nicholas Piggin <npiggin@gmail.com>, linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-mm@kvack.org, Anton Blanchard <anton@ozlabs.org>,
Andy Lutomirski <luto@kernel.org>
Subject: Re: [PATCH v2 3/5] lazy tlb: shoot lazies, a non-refcounting lazy tlb option
Date: Sun, 13 Dec 2020 23:04:55 -0800 [thread overview]
Message-ID: <de068125-7d95-b3f0-2de9-71923e3c3651@infradead.org> (raw)
In-Reply-To: <20201214065312.270062-4-npiggin@gmail.com>
On 12/13/20 10:53 PM, Nicholas Piggin wrote:
> diff --git a/arch/Kconfig b/arch/Kconfig
> index 84faaba66364..e69c974369cc 100644
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -443,9 +443,22 @@ config MMU_LAZY_TLB
> config MMU_LAZY_TLB_REFCOUNT
> def_bool y
> depends on MMU_LAZY_TLB
> + depends on !MMU_LAZY_TLB_SHOOTDOWN
> help
> - This must be enabled if MMU_LAZY_TLB is enabled until the next
> - patch.
> + This refcounts the mm that is used as the lazy TLB mm when switching
> + switching to a kernel thread.
duplicate "switching".
> +
> +config MMU_LAZY_TLB_SHOOTDOWN
> + bool
> + depends on MMU_LAZY_TLB
> + help
> + Instead of refcounting the "lazy tlb" mm struct, which can cause
> + contention with multi-threaded apps on large multiprocessor systems,
> + this option causes __mmdrop to IPI all CPUs in the mm_cpumask and
> + switch to init_mm if they were using the to-be-freed mm as the lazy
> + tlb. To implement this, architectures must use _lazy_tlb variants of
> + mm refcounting, and mm_cpumask must include at least all possible
> + CPUs in which mm might be lazy.
>
> config ARCH_HAVE_NMI_SAFE_CMPXCHG
> bool
--
next prev parent reply other threads:[~2020-12-14 7:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-14 6:53 [PATCH v2 0/5] shoot lazy tlbs Nicholas Piggin
2020-12-14 6:53 ` [PATCH v2 1/5] lazy tlb: introduce lazy mm refcount helper functions Nicholas Piggin
2020-12-14 6:53 ` [PATCH v2 2/5] lazy tlb: allow lazy tlb mm switching to be configurable Nicholas Piggin
2020-12-14 6:53 ` [PATCH v2 3/5] lazy tlb: shoot lazies, a non-refcounting lazy tlb option Nicholas Piggin
2020-12-14 7:04 ` Randy Dunlap [this message]
2020-12-14 6:53 ` [PATCH v2 4/5] powerpc: use lazy mm refcount helper functions Nicholas Piggin
2020-12-14 6:53 ` [PATCH v2 5/5] powerpc/64s: enable MMU_LAZY_TLB_SHOOTDOWN Nicholas Piggin
2021-02-04 8:21 ` [PATCH v2 0/5] shoot lazy tlbs Nicholas Piggin
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=de068125-7d95-b3f0-2de9-71923e3c3651@infradead.org \
--to=rdunlap@infradead.org \
--cc=anton@ozlabs.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=luto@kernel.org \
--cc=npiggin@gmail.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