[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080309193137.GA17198@elte.hu>
Date: Sun, 9 Mar 2008 20:31:37 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Arjan van de Ven <arjan@...radead.org>
Cc: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Thomas Gleixner <tglx@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Christoph Lameter <clameter@....com>,
Bart Van Assche <bart.vanassche@...il.com>
Subject: Re: quicklists confuse meminfo
* Ingo Molnar <mingo@...e.hu> wrote:
> i.e. the patch below should do the trick.
>
> (it's still work in progress but it seems to boot just fine)
updated patch below - Thomas found a bug in the alloc-failure cleanup
path. I shouldnt hack late Sunday night :)
Ingo
--------------->
Subject: x86: patches/remove-quicklists.patch
From: Ingo Molnar <mingo@...e.hu>
Date: Sun Mar 09 20:04:32 CET 2008
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
arch/x86/mm/pgtable_32.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
Index: linux-x86.q/arch/x86/mm/pgtable_32.c
===================================================================
--- linux-x86.q.orig/arch/x86/mm/pgtable_32.c
+++ linux-x86.q/arch/x86/mm/pgtable_32.c
@@ -10,7 +10,6 @@
#include <linux/pagemap.h>
#include <linux/spinlock.h>
#include <linux/module.h>
-#include <linux/quicklist.h>
#include <asm/system.h>
#include <asm/pgtable.h>
@@ -338,12 +337,17 @@ static void pgd_mop_up_pmds(struct mm_st
pgd_t *pgd_alloc(struct mm_struct *mm)
{
- pgd_t *pgd = quicklist_alloc(0, GFP_KERNEL, pgd_ctor);
+ pgd_t *pgd;
+
+ pgd = (void *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
+ if (pgd)
+ pgd_ctor(pgd);
mm->pgd = pgd; /* so that alloc_pd can use it */
if (pgd && !pgd_prepopulate_pmd(mm, pgd)) {
- quicklist_free(0, pgd_dtor, pgd);
+ pgd_dtor(pgd);
+ free_page((unsigned long)pgd);
pgd = NULL;
}
@@ -353,12 +357,12 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
void pgd_free(struct mm_struct *mm, pgd_t *pgd)
{
pgd_mop_up_pmds(mm, pgd);
- quicklist_free(0, pgd_dtor, pgd);
+ pgd_dtor(pgd);
+ free_page((unsigned long)pgd);
}
void check_pgt_cache(void)
{
- quicklist_trim(0, pgd_dtor, 25, 16);
}
void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte)
--
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