[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1297964543.2413.2038.camel@twins>
Date: Thu, 17 Feb 2011 18:42:23 +0100
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Andrea Arcangeli <aarcange@...hat.com>
Cc: Avi Kivity <avi@...hat.com>, Thomas Gleixner <tglx@...utronix.de>,
Rik van Riel <riel@...hat.com>, Ingo Molnar <mingo@...e.hu>,
akpm@...ux-foundation.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
linux-mm@...ck.org,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
David Miller <davem@...emloft.net>,
Hugh Dickins <hugh.dickins@...cali.co.uk>,
Mel Gorman <mel@....ul.ie>, Nick Piggin <npiggin@...nel.dk>,
Paul McKenney <paulmck@...ux.vnet.ibm.com>,
Yanmin Zhang <yanmin_zhang@...ux.intel.com>,
Martin Schwidefsky <schwidefsky@...ibm.com>
Subject: Re: [PATCH 00/17] mm: mmu_gather rework
On Thu, 2011-02-17 at 17:23 +0100, Peter Zijlstra wrote:
> s390 wants a bit more, but more on that in another email.
So what s390 wants is something like the below, where a fullmm gather
flushes a-priory and then simply gathers and frees the pages.
I can't see why something like this shouldn't work on x86 and power (the
only two archs I really looked in depth at), but it certainly is
something that needs a close look.
---
Index: linux-2.6/include/asm-generic/tlb.h
===================================================================
--- linux-2.6.orig/include/asm-generic/tlb.h
+++ linux-2.6/include/asm-generic/tlb.h
@@ -145,7 +145,10 @@ tlb_gather_mmu(struct mmu_gather *tlb, s
tlb->need_flush = 0;
if (num_online_cpus() == 1)
tlb->fast_mode = 1;
+
tlb->fullmm = full_mm_flush;
+ if (tlb->fullmm)
+ tlb_flush(tlb);
tlb->local.next = NULL;
tlb->local.nr = 0;
@@ -162,13 +165,15 @@ tlb_flush_mmu(struct mmu_gather *tlb)
{
struct mmu_gather_batch *batch;
- if (!tlb->need_flush)
- return;
- tlb->need_flush = 0;
- tlb_flush(tlb);
+ if (tlb->need_flush && !tlb->fullmm) {
+ tlb_flush(tlb);
+ tlb->need_flush = 0;
+ }
+
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
tlb_table_flush(tlb);
#endif
+
if (tlb_fast_mode(tlb))
return;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists