public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Yinghai Lu <yinghai@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Jesse Brandeburg <jesse.brandeburg@gmail.com>
Subject: Re: [PATCH] x86/PCI: initialize PCI bus node numbers early
Date: Fri, 10 Jul 2009 13:22:49 -0700	[thread overview]
Message-ID: <20090710132249.1a032cfb@jbarnes-g45> (raw)
In-Reply-To: <4A57A1FE.30609@kernel.org>

On Fri, 10 Jul 2009 13:18:06 -0700
Yinghai Lu <yinghai@kernel.org> wrote:

> Jesse Barnes wrote:
> > The current mp_bus_to_node array is initialized only by AMD specific
> > code, since AMD platforms have registers that can be used for
> > determining mode numbers.  On new Intel platforms it's necessary to
> > initialize this array as well though, otherwise all PCI node numbers
> > will be 0, when in fact they should be -1 (indicating that I/O isn't
> > tied to any particular node).
> > 
> > So move the mp_bus_to_node code into the common PCI code, and
> > initialize it early with a default value of -1.  This may be
> > overridden later by arch code (e.g. the AMD code).
> > 
> > With this change, PCI consistent memory and other node specific
> > allocations (e.g. skbuff allocs) should occur on the "current" node.
> > If, for performance reasons, applications want to be bound to
> > specific nodes, they should open their devices only after being
> > pinned to the CPU where they'll run, for maximum locality.
> > 
> > Any thoughts here Yinghai or Jesse?
> > 
> > 
> >  include/asm/pci.h |    2 +
> >  kernel/setup.c    |    2 +
> >  pci/amd_bus.c     |   61 +-----------------------------------------
> >  pci/common.c      |   77
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files
> > changed, 83 insertions(+), 59 deletions(-)
> > 
> > Thanks,
> 
> could use
> 
> static int mp_bus_to_node[BUS_NR] = {
>         [0 ... BUS_NR - 1] = -1
> };
> 
> so we avoid to add pci_bus_to_node_init()

Ah yeah that would clean things up a bit...  Thanks.

-- 
Jesse Barnes, Intel Open Source Technology Center

  reply	other threads:[~2009-07-10 20:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-10 17:44 [PATCH] x86/PCI: initialize PCI bus node numbers early Jesse Barnes
2009-07-10 18:33 ` Jesse Barnes
2009-07-10 20:10 ` Yinghai Lu
2009-07-10 20:19   ` Jesse Barnes
2009-07-10 20:18 ` Yinghai Lu
2009-07-10 20:22   ` Jesse Barnes [this message]
2009-07-10 21:06     ` Jesse Barnes
2009-07-14  7:41       ` Jesse Brandeburg
2009-07-14 15:47         ` Jesse Barnes
2009-09-01 13:53 ` Ingo Molnar
2009-09-01 16:55   ` Yinghai Lu
2009-09-01 17:09     ` Jesse Barnes
2009-09-15  0:45     ` Jesse Barnes
2009-09-01 22:28   ` Jesse Barnes

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=20090710132249.1a032cfb@jbarnes-g45 \
    --to=jbarnes@virtuousgeek.org \
    --cc=jesse.brandeburg@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yinghai@kernel.org \
    /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