All of lore.kernel.org
 help / color / mirror / Atom feed
From: ypodemsk@redhat.com
To: Will Deacon <will@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	aneesh.kumar@linux.ibm.com, akpm@linux-foundation.org,
	npiggin@gmail.com, arnd@arndb.de, linux-arch@vger.kernel.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	mtosatti@redhat.com, ppandit@redhat.com, alougovs@redhat.com,
	David Hildenbrand <david@redhat.com>
Subject: Re: [PATCH] mm/mmu_gather: send tlb_remove_table_smp_sync IPI only to MM CPUs
Date: Sun, 26 Mar 2023 10:40:08 +0300	[thread overview]
Message-ID: <b88b37de44222a67bc5cf22798e84fb178b58725.camel@redhat.com> (raw)
In-Reply-To: <20230324151259.GC27199@willie-the-truck>

On Fri, 2023-03-24 at 15:13 +0000, Will Deacon wrote:
> On Wed, Mar 22, 2023 at 04:11:44PM +0200, ypodemsk@redhat.com wrote:
> > On Mon, 2023-03-20 at 09:49 +0100, Peter Zijlstra wrote:
> > > On Sun, Mar 12, 2023 at 10:09:45AM +0200, Yair Podemsky wrote:
> > > > Currently the tlb_remove_table_smp_sync IPI is sent to all CPUs
> > > > indiscriminately, this causes unnecessary work and delays
> > > > notable
> > > > in
> > > > real-time use-cases and isolated cpus, this patch will limit
> > > > this
> > > > IPI to
> > > > only be sent to cpus referencing the effected mm and are
> > > > currently
> > > > in
> > > > kernel space.
> > > 
> > > Did you validate that all architectures for which this is
> > > relevant
> > > actually set bits in mm_cpumask() ?
> > > 
> > Hi Peter,
> > Thank you for bringing this to my attention.
> > I reviewed the architectures using the MMU_GATHER_RCU_TABLE_FREE:
> > arm, powerpc, s390, sparc and x86 set the bit when switching
> > process
> > in.
> > for arm64 removed set/clear bit in 38d96287504a ("arm64: mm: kill
> > mm_cpumask usage")
> > The reason given was that mm_cpumask was not used.
> > Given that we now have a use for it, I will add a patch to revert.
> 
> Maintaining the mask is also not free, so I'm not keen on adding it
> back
> unless there's a net win.
> 
> Will
> 
How about adding a Kconfig to mark which architectures set/use the
mm_cpumask?
This will allow us to use the mm_cpumask on architectures that support
it, and use acpu_online_mask on those that don't.
Also make it clear which architectures set the bit for the future.
Yair


      reply	other threads:[~2023-03-26  7:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-12  8:09 [PATCH] mm/mmu_gather: send tlb_remove_table_smp_sync IPI only to MM CPUs Yair Podemsky
2023-03-12 20:25 ` Andrew Morton
2023-03-20  8:49 ` Peter Zijlstra
2023-03-22 14:11   ` ypodemsk
2023-03-24 15:13     ` Will Deacon
2023-03-26  7:40       ` ypodemsk [this message]

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=b88b37de44222a67bc5cf22798e84fb178b58725.camel@redhat.com \
    --to=ypodemsk@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=alougovs@redhat.com \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=arnd@arndb.de \
    --cc=david@redhat.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mtosatti@redhat.com \
    --cc=npiggin@gmail.com \
    --cc=peterz@infradead.org \
    --cc=ppandit@redhat.com \
    --cc=will@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.