From: Russell King <rmk@arm.linux.org.uk>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: schwidefsky@de.ibm.com, Andrew Morton <akpm@linux-foundation.org>,
linux-arch@vger.kernel.org, davem@davemloft.net,
hugh@veritas.com
Subject: Re: + sparc64-rename-tlb_flush_mmu.patch added to -mm tree
Date: Tue, 17 Jul 2007 23:04:49 +0100 [thread overview]
Message-ID: <20070717220448.GA19506@flint.arm.linux.org.uk> (raw)
In-Reply-To: <617E1C2C70743745A92448908E030B2A01F28290@scsmsx411.amr.corp.intel.com>
On Tue, Jul 17, 2007 at 02:55:05PM -0700, Luck, Tony wrote:
> - tlb_finish_mmu(*tlbp, tlb_start, start);
> -
> if (need_resched() ||
> (i_mmap_lock && need_lockbreak(i_mmap_lock))) {
> - if (i_mmap_lock) {
> - *tlbp = NULL;
> + if (i_mmap_lock)
> goto out;
>
> If we take this "goto out" path, then we'll miss out on calling
> the tlb_finish_mmu() which you deleted just above.
Look at the next hunk in the patch. The old path set *tlbp to NULL
if we exit this function having called tlb_finish_mmu(). In that case,
we avoid calling tlb_finish_mmu() again. Otherwise, *tlbp is left
pointing at the mmu_gather structure, and it's left for zap_page_range()
to call tlb_finish_mmu().
The new path actually cleans this up - we always exit unmap_vmas()s
_with_ the tlb context requiring tlb_finish_mmu(), so the call in
zap_page_range() becomes unconditional.
So, if anything, this is a much needed cleanup of the behaviour of
unmap_vmas().
> At the very
> least this will leave preemption disabled (since we'll miss calling
> the put_cpu_var(mmu_gathers)).
>
> I think I'm also missing the big picture view of what you are
> doing here.
Avoiding calling tlb_finish_mmu() and tlb_gather_mmu() unnecessarily,
and (eg) thereby avoiding some repetitive entire TLB invalidations on
ARM.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
next prev parent reply other threads:[~2007-07-17 22:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200707170748.l6H7m1so005969@imap1.linux-foundation.org>
[not found] ` <20070717005551.cdb9504e.akpm@linux-foundation.org>
[not found] ` <20070717010324.833fee7e.akpm@linux-foundation.org>
2007-07-17 13:56 ` + sparc64-rename-tlb_flush_mmu.patch added to -mm tree Martin Schwidefsky
2007-07-17 18:18 ` Russell King
2007-07-17 19:08 ` Andrew Morton
2007-07-17 21:14 ` Russell King
2007-07-17 21:42 ` Andrew Morton
2007-07-18 7:48 ` Martin Schwidefsky
2007-07-17 21:55 ` Luck, Tony
2007-07-17 22:04 ` Russell King [this message]
2007-07-17 22:21 ` Luck, Tony
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=20070717220448.GA19506@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=hugh@veritas.com \
--cc=linux-arch@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
--cc=tony.luck@intel.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