linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@osdl.org>
To: Zwane Mwaikambo <zwane@arm.linux.org.uk>
Cc: Andrew Morton <akpm@osdl.org>, Chris Wright <chrisw@osdl.org>,
	clameter@sgi.com, Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Fixes for prep_zero_page
Date: Sun, 9 Jan 2005 14:48:40 -0800	[thread overview]
Message-ID: <20050109144840.W2357@build.pdx.osdl.net> (raw)
In-Reply-To: <Pine.LNX.4.61.0501091409490.13639@montezuma.fsmlabs.com>; from zwane@arm.linux.org.uk on Sun, Jan 09, 2005 at 02:32:00PM -0700

* Zwane Mwaikambo (zwane@arm.linux.org.uk) wrote:
> On Sun, 9 Jan 2005, Andrew Morton wrote:
> > Can't we simply move the page zeroing to the very end of __alloc_pages()?
> 
> Ok, i've changed that bit to something like;

I did it the other way around, and moved kernel_map_pages to prep_new_page
so it's called before zeroing to keep that with the other prep bits
in buffered_rmqueue.  Made sense to me that kernel_map_pages is part of
prepping a new page, but this isn't my area, so I could be way off ;-)
It works for me with DEBUG_PAGEALLOC enabled.

===== mm/page_alloc.c 1.251 vs edited =====
--- 1.251/mm/page_alloc.c	2005-01-07 21:44:07 -08:00
+++ edited/mm/page_alloc.c	2005-01-09 14:36:38 -08:00
@@ -413,6 +413,7 @@ static void prep_new_page(struct page *p
 			1 << PG_checked | 1 << PG_mappedtodisk);
 	page->private = 0;
 	set_page_refs(page, order);
+	kernel_map_pages(page, 1 << order, 1);
 }
 
 /* 
@@ -823,7 +824,6 @@ nopage:
 	return NULL;
 got_pg:
 	zone_statistics(zonelist, z);
-	kernel_map_pages(page, 1 << order, 1);
 	return page;
 }
 

  reply	other threads:[~2005-01-09 22:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-08  9:06 panic on bootup due to __GFP_ZERO patch Chris Wright
2005-01-08 20:00 ` Dave Jones
2005-01-09  9:45 ` Andrew Morton
2005-01-09 15:56   ` [PATCH] Fixes for prep_zero_page Zwane Mwaikambo
2005-01-09 20:52     ` Andrew Morton
2005-01-09 21:32       ` Zwane Mwaikambo
2005-01-09 22:48         ` Chris Wright [this message]
2005-01-10  4:18           ` Zwane Mwaikambo
2005-01-13  5:05             ` Zwane Mwaikambo
2005-01-13 18:24               ` Chris Wright
2005-01-14  0:50                 ` Zwane Mwaikambo

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=20050109144840.W2357@build.pdx.osdl.net \
    --to=chrisw@osdl.org \
    --cc=akpm@osdl.org \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zwane@arm.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).