public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@saeurebad.de>
To: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Sean MacLennan <smaclennan@pikatech.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Section mismatch contig_page_data and bootmem_node_data
Date: Thu, 21 Aug 2008 09:06:32 +0200	[thread overview]
Message-ID: <873aky4zk7.fsf@skyscraper.fehenstaub.lan> (raw)
In-Reply-To: <20080821000844.GA10031@joi> (Marcin Slusarz's message of "Thu, 21 Aug 2008 02:08:48 +0200")

Marcin Slusarz <marcin.slusarz@gmail.com> writes:

> On Wed, Aug 20, 2008 at 11:45:00PM +0200, Johannes Weiner wrote:
>> Hi,
>> 
>> > On Wed, 20 Aug 2008 21:05:41 +0200
>> > Marcin Slusarz <marcin.slusarz@gmail.com> wrote:
>> >
>> >> I thought about this warning today and found 2 other solutions:
>> >> 1) Mark contig_page_data as __ref (but it might hide real bugs).
>> >> 2) Remove bdata from struct pglist_data and access it directly through
>> >>    bootmem_node_data. It requires passing node number to all functions
>> >>    which use bdata, but unfortunately arch/ia64/mm/discontig.c handles
>> >>    node numbering its own way. I'm still investigating it.
>> 
>> Yeah, I gave it a shot once too but dropped it again after I looked at
>> ia64 code.
>> 
>> Perhaps we can just remove the static assignment and do it at boot up?
>
> That won't work - modpost will warn at different place about section
> mismatch. But even if it would work, we lose potentially useful
> analysis of all uses of pglist_data->bdata.

Right, but the current way of handling things completely circumvents the
section checking, no?

> But I think I found better solution - replace "struct bootmem_data *bdata"
> in struct pglist_data with "int bootmem_node;" and change all uses of bdata
> to &bootmem_node_data[struct pglist_data *->bootmem_node].

Good idea.  You don't even need a new number here, pgdat->node_id should
be usable out of the box to index into the bdata array.

> What do you think about it? Would it be acceptable?

Yes, that sounds good.

	Hannes

  reply	other threads:[~2008-08-21  7:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-20 17:55 [PATCH] Section mismatch contig_page_data and bootmem_node_data Sean MacLennan
2008-08-20 19:05 ` Marcin Slusarz
     [not found]   ` <20080820151531.38fc1071@lappy.seanm.ca>
     [not found]     ` <87myj74azn.fsf@skyscraper.fehenstaub.lan>
2008-08-21  0:08       ` Marcin Slusarz
2008-08-21  7:06         ` Johannes Weiner [this message]
2008-08-21 20:10           ` Marcin Slusarz
2008-08-22  6:15             ` Andrew Morton
2008-08-22 13:05               ` Marcin Slusarz
2008-08-20 21:53 ` Johannes Weiner

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=873aky4zk7.fsf@skyscraper.fehenstaub.lan \
    --to=hannes@saeurebad.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcin.slusarz@gmail.com \
    --cc=smaclennan@pikatech.com \
    /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