2002-10-30 23:40:43

by Matthew Dobson

[permalink] [raw]
Subject: [patch] pcibus_to_node() addition to topology infrastructure

Linus,
Here's a patch that adds PCI busses to the list of basic topology
elements (incl. CPUs, MemBlks, & Nodes).

pcibus_to_node-2.5.44.patch

This patch adds a new topology macro: pcibus_to_node(). This will be
useful to allow I/O bound processes to bind themselves to CPUs/Nodes
close to the PCI busses they are communicating over.

1) Adds pcibus_to_node() macro to asm-generic/topology.h
2) Makes small modifications to NUMA-Q PCI code, mostly modifying macros.
3) Uses the macros from #2 to implement pcibus_to_node() in
asm-i386/topology.h

[mcd@arrakis patches]$ diffstat api_patches/pcibus_to_node-2.5.44.patch
arch/i386/pci/numa.c | 33 +++++++++++++++------------------
include/asm-generic/topology.h | 3 +++
include/asm-i386/topology.h | 3 +++
3 files changed, 21 insertions(+), 18 deletions(-)

Cheers!

-Matt


2002-10-30 23:59:11

by Jesse Barnes

[permalink] [raw]
Subject: Re: [patch] pcibus_to_node() addition to topology infrastructure

This is a nice addition, but just FYI there are SGI systems that have
PCI busses attached to more than one node. I guess for now we can just
round-robin through the attached nodes for the return value.

Thanks,
Jesse

On Wed, Oct 30, 2002 at 03:42:45PM -0800, Matthew Dobson wrote:
> Linus,
> Here's a patch that adds PCI busses to the list of basic topology
> elements (incl. CPUs, MemBlks, & Nodes).
>
> pcibus_to_node-2.5.44.patch
>
> This patch adds a new topology macro: pcibus_to_node(). This will be
> useful to allow I/O bound processes to bind themselves to CPUs/Nodes
> close to the PCI busses they are communicating over.
>
> 1) Adds pcibus_to_node() macro to asm-generic/topology.h
> 2) Makes small modifications to NUMA-Q PCI code, mostly modifying macros.
> 3) Uses the macros from #2 to implement pcibus_to_node() in
> asm-i386/topology.h
>
> [mcd@arrakis patches]$ diffstat api_patches/pcibus_to_node-2.5.44.patch
> arch/i386/pci/numa.c | 33 +++++++++++++++------------------
> include/asm-generic/topology.h | 3 +++
> include/asm-i386/topology.h | 3 +++
> 3 files changed, 21 insertions(+), 18 deletions(-)
>
> Cheers!
>
> -Matt
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2002-10-31 00:22:02

by Matthew Dobson

[permalink] [raw]
Subject: Re: [patch] pcibus_to_node() addition to topology infrastructure

Jesse Barnes wrote:
> This is a nice addition, but just FYI there are SGI systems that have
> PCI busses attached to more than one node. I guess for now we can just
> round-robin through the attached nodes for the return value.
>
> Thanks,
> Jesse

Ah, yes... The p-bricks, i-bricks, etc. right?

Yes, I suppose a round-robin return for the SGI version of the macro
would work... Certainly not ideal, but it would work. The problem is
if you assume that binding several processes to the node PCI bus X is on
will ensure that those processes are on the same node. In this case
(SGI), it would be a false assumption. I suppose that's what you get
for assuming, though? ;)

Cheers!

-Matt

2002-10-31 00:53:05

by Jesse Barnes

[permalink] [raw]
Subject: Re: [patch] pcibus_to_node() addition to topology infrastructure

On Wed, Oct 30, 2002 at 04:24:13PM -0800, Matthew Dobson wrote:
> Ah, yes... The p-bricks, i-bricks, etc. right?

Yup.

> Yes, I suppose a round-robin return for the SGI version of the macro
> would work... Certainly not ideal, but it would work. The problem is

Can you think of any better way to do it? Perhaps make pcibus_to_node
return a list of nodes?

Thanks,
Jesse

2002-10-31 01:12:33

by Matthew Dobson

[permalink] [raw]
Subject: Re: [patch] pcibus_to_node() addition to topology infrastructure

Jesse Barnes wrote:
> On Wed, Oct 30, 2002 at 04:24:13PM -0800, Matthew Dobson wrote:
>
>>Ah, yes... The p-bricks, i-bricks, etc. right?
>
>
> Yup.
>
>
>>Yes, I suppose a round-robin return for the SGI version of the macro
>>would work... Certainly not ideal, but it would work. The problem is
>
>
> Can you think of any better way to do it? Perhaps make pcibus_to_node
> return a list of nodes?

Yeah... I was thinking about having it return a bitmask... It makes it
a bit of a pain to iterate through the mask, only to find that in most
cases there is only one bit set in the mask. :(

It's a bit late in the day... I'll mull this over and see if I can come
up with something good.

Cheers!

-Matt