From: Steffen Persvold <sp@numascale.com>
To: Borislav Petkov <bp@amd64.org>
Cc: Daniel J Blueman <daniel@numascale-asia.com>,
Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, linux-kernel@vger.kernel.org,
Andreas Herrmann <andreas.herrmann3@amd.com>
Subject: Re: [PATCH v2] Fix AMD Northbridge-ID contiguity assumptions
Date: Fri, 12 Oct 2012 11:57:00 +0200 [thread overview]
Message-ID: <5077E96C.4030609@numascale.com> (raw)
In-Reply-To: <20121012093310.GC19420@aftab.osrc.amd.com>
On 10/12/2012 11:33, Borislav Petkov wrote:
> On Thu, Oct 04, 2012 at 03:18:02PM +0200, Borislav Petkov wrote:
>> On Wed, Oct 03, 2012 at 09:21:14PM +0800, Daniel J Blueman wrote:
>>> The AMD Northbridge initialisation code and EDAC assume the Northbridge IDs
>>> are contiguous, which no longer holds on federated systems with multiple
>>> HyperTransport fabrics and multiple PCI domains.
>>>
>>> Address this assumption by searching the Northbridge ID array, rather than
>>> directly indexing it, using the upper bits for the PCI domain.
>>>
>>> v2: Fix Northbridge entry initialisation
>>>
>>> Tested on a single-socket system and 3-server federated system.
>>>
>>> Signed-off-by: Daniel J Blueman <daniel@numascale-asia.com>
>>> ---
>>> arch/x86/include/asm/amd_nb.h | 23 +++++++++++++++++++++--
>>> arch/x86/kernel/amd_nb.c | 16 +++++++++-------
>>> drivers/edac/amd64_edac.c | 18 +++++++++---------
>>> drivers/edac/amd64_edac.h | 6 ------
>
> Ok,
>
> I've been meaning to clean up that amd_nb.c code which iterates over all
> PCI devices on the system just so it can count the NBs and then do it
> again in order to do the ->misc and ->link assignment.
>
> So below is what I've come up with and it builds but it is completely
> untested and I might be completely off, for all I know.
>
> The basic idea, though, is to have the first 8 NB descriptors in an
> array of 8 and use that for a fast lookup on all those single-board
> machines where the number of the northbridges is the number of physical
> processors on the board (or x2, if a MCM).
>
> Then, there's a linked list of all further NB descriptors which should
> work in your case of confederated systems.
>
> Btw, I've also reused your get_node_id function and the edac changes are
> still pending but they should be trivial once this new approach pans
> out.
>
Hi Boris,
This patch looks very clean and should serve our purpose as well (I'll
double check with Daniel).
Regarding the size of the "node" variable, you asked before. The
theoretical maximum number of AMD NBs we can have in a confederated
NumaConnect system _today_ is 8*4096 (8 NBs per system, 4096 systems) so
technically this could fit into a u16 instead of a u32 (you'll have to
shift left by 3 instead of 8).
However, to allow some flexibility I think a u32 is better and I think
we can live with those two extra bytes per struct member, or ?
Cheers,
--
Steffen Persvold, Chief Architect NumaChip
Numascale AS - www.numascale.com
Tel: +47 92 49 25 54 Skype: spersvold
next prev parent reply other threads:[~2012-10-12 11:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-03 13:21 [PATCH v2] Fix AMD Northbridge-ID contiguity assumptions Daniel J Blueman
2012-10-04 13:18 ` Borislav Petkov
2012-10-12 9:33 ` Borislav Petkov
2012-10-12 9:57 ` Steffen Persvold [this message]
2012-10-12 10:26 ` Borislav Petkov
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=5077E96C.4030609@numascale.com \
--to=sp@numascale.com \
--cc=andreas.herrmann3@amd.com \
--cc=bp@amd64.org \
--cc=daniel@numascale-asia.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.