[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <473DF2EF.70404@goop.org>
Date: Fri, 16 Nov 2007 11:43:43 -0800
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
CC: William Lee Irwin III <wli@...omorphy.com>,
Andi Kleen <ak@...e.de>, Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
Nick Piggin <nickpiggin@...oo.com.au>,
"H. Peter Anvin" <hpa@...or.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Why preallocate pmd in x86 32-bit PAE?
Linus Torvalds wrote:
> On Fri, 16 Nov 2007, Jeremy Fitzhardinge wrote:
>
>> If you happened to do a 1G munmap, it may end up freeing and
>> reallocating them, but that's going to be very rare.
>>
>
> I don't think we ever free the pmd's now, do we?
>
> (Except for the *final* free, of course, when we release the whole VM).
Not for 32-bit at the moment, but it does in principle. munmap ends up
calling free_pgtables, and so ends up calling pmd_free_range. That will
do a pud_clear to detach the pmd from the pagetable and call
__pmd_free_tlb, which ends up doing tlb_remove_page ->
free_page_and_swap_cache. 32-bit knobbles all this at the moment, but
it looks to me like it wouldn't be hard to make this work if the code is
all common with 64-bit.
J
-
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