Re: [RFC] pcibus_to_node implementation for ia64

From: Jesse Barnes <jesse.barnes_at_intel.com>
Date: 2005-05-12 01:58:26
On Wednesday, May 11, 2005 8:49 am, you wrote:
> On Wed, 11 May 2005, colin ngam wrote:
> > >That's certainly another way to go--just make the function do a
> > > search to find the closest node with memory (and/or CPUs) all by
> > > itself.  The obvious disadvantage is that you'll incur that cost
> > > on every function call unless you build a lookup table at boot
> > > time or somesuch.
>
> This search is performed by alloc_pages using the zonelists.

Not right now it isn't.  In the snippet you posted you might get back a 
special node id, one that corresponds to an I/O node, which doesn't 
have a pgdat associated with it, and therefore won't work when passed 
to alloc_pages_node (I think it'll panic).

> How do I get a node that I can pass to alloc_pages_node?

Fix the sn2 implementation of I/O nodes to make them more like regular 
nodes.  Basically,

  o put them in the SLIT and SRAT tables
  o make sure empty pgdats are created for memoryless nodes (in
    discontig.c), ideally on the closest node containing memory.

The first step isn't strictly necessary since you could fake it (you'd 
probably have to pull some code from io_init.c out and make it usable 
at early boot), but is probably preferable to putting together an ugly 
hack.

Jesse
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed May 11 11:59:13 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:38 EST