[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4D4C63ED.6060104@tilera.com>
Date: Fri, 4 Feb 2011 15:39:09 -0500
From: Chris Metcalf <cmetcalf@...era.com>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
CC: Andrea Arcangeli <aarcange@...hat.com>,
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>
Subject: Re: [PATCH 01/25] tile: Fix __pte_free_tlb
On 1/25/2011 12:31 PM, Peter Zijlstra wrote:
> Tile's __pte_free_tlb() implementation makes assumptions about the
> generic mmu_gather implementation, cure this ;-)
I assume you will take this patch into your tree? If so:
Acked-by: Chris Metcalf <cmetcalf@...era.com>
> [ Chris, from a quick look L2_USER_PGTABLE_PAGES is something like:
> 1 << (24 - 16 + 3), which looks awefully large for an on-stack
> array. ]
Yes, the pte_pages[] array in this routine is 2KB currently. Currently we
ship with 64KB pagesize, so the kernel stack has plenty of room. I do like
that your patch removes this buffer, however, since we're currently looking
into (re-)supporting 4KB pages, which would totally blow the kernel stack
in this routine.
> Cc: Chris Metcalf <cmetcalf@...era.com>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> ---
> arch/tile/mm/pgtable.c | 15 ++-------------
> 1 file changed, 2 insertions(+), 13 deletions(-)
>
> Index: linux-2.6/arch/tile/mm/pgtable.c
> ===================================================================
> --- linux-2.6.orig/arch/tile/mm/pgtable.c
> +++ linux-2.6/arch/tile/mm/pgtable.c
> @@ -252,19 +252,8 @@ void __pte_free_tlb(struct mmu_gather *t
> int i;
>
> pgtable_page_dtor(pte);
> - tlb->need_flush = 1;
> - if (tlb_fast_mode(tlb)) {
> - struct page *pte_pages[L2_USER_PGTABLE_PAGES];
> - for (i = 0; i < L2_USER_PGTABLE_PAGES; ++i)
> - pte_pages[i] = pte + i;
> - free_pages_and_swap_cache(pte_pages, L2_USER_PGTABLE_PAGES);
> - return;
> - }
> - for (i = 0; i < L2_USER_PGTABLE_PAGES; ++i) {
> - tlb->pages[tlb->nr++] = pte + i;
> - if (tlb->nr >= FREE_PTE_NR)
> - tlb_flush_mmu(tlb, 0, 0);
> - }
> + for (i = 0; i < L2_USER_PGTABLE_PAGES; ++i)
> + tlb_remove_page(tlb, pte + i);
> }
>
> #ifndef __tilegx__
>
>
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
--
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