mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Franck Bui-Huu" <vagabon.xyz@gmail.com>
To: "Mel Gorman" <mel@csn.ul.ie>
Cc: akpm@osdl.org,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] Only use ARCH_PFN_OFFSET once during boot
Date: Thu, 6 Jul 2006 20:01:22 +0200	[thread overview]
Message-ID: <cda58cb80607061101l4698f1afr799e9814688903cf@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0607061556470.3895@skynet.skynet.ie>

2006/7/6, Mel Gorman <mel@csn.ul.ie>:
>
> I think my patch does the job of moving ARCH_PFN_OFFSET out of the hot
> path in a less risky fashion. However, if you are sure that callers to
> free_area_init() and ARCH_PFN_OFFSET are ok after your patch, I'd be happy
> to go with it. If you're not sure, I reckon my patch would be the way to
> go.
>

Ok I try to explain better what I have in mind. Your patch changes the
behaviour of free_area_init_node() in the sense that it doesn't work
as expected if its fourth parameter is different from ARCH_PFN_OFFSET,
it even becomes boggus IMHO. And I think it's valid to use it when
FLATMEM model is selected.

I don't know if there is a platform which uses FLATMEM model and do
not setup ARCH_PFN_OFFSET when its memory do not start at 0. But I
don't think we should assume that if FLATMEM model is selected then
all uses of free_area_init_node() imply ARCH_PFN_OFFSET whatever the
value of the fourth parameter. I would say it's a risky implementation
of free_area_init_node() and prone boggus uses of this function.

One example comes in mind, though I don't know if it's possible. Let's
say a platform can't determine where exactly its memory start. It has
to determine this start at boot time, the BIOS may pass it for
example. So in that case you can't use ARCH_PFN_OFFSET and you have to
use free_area_init_node() with a variable as fourth parameter.

-- 
               Franck

  reply	other threads:[~2006-07-06 18:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-06  9:51 Mel Gorman
2006-07-06 14:34 ` Franck Bui-Huu
2006-07-06 16:08   ` Mel Gorman
2006-07-06 18:01     ` Franck Bui-Huu [this message]
2006-07-06 19:55       ` Mel Gorman
2006-07-07  8:01         ` Franck Bui-Huu
2006-07-07  9:14           ` Mel Gorman
2006-07-07 11:41             ` Franck Bui-Huu
2006-07-07 12:31               ` Mel Gorman
     [not found] <BFECAF9E178F144FAEF2BF4CE739C66803EF8299@exmail1.se.axis.com>
2006-07-07 12:37 ` Mikael Starvik

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=cda58cb80607061101l4698f1afr799e9814688903cf@mail.gmail.com \
    --to=vagabon.xyz@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mel@csn.ul.ie \
    /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

all inboxes | Powered by JetHome®