All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Daniel Henrique Barboza <danielhb413@gmail.com>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH v4 4/5] spapr_numa: consider user input when defining associativity
Date: Tue, 13 Oct 2020 09:48:46 +1100	[thread overview]
Message-ID: <20201012224846.GC71119@yekko.fritz.box> (raw)
In-Reply-To: <cf0a0fbf-5c4f-96d6-039d-780513a724e0@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2921 bytes --]

On Mon, Oct 12, 2020 at 07:44:14PM +0200, Philippe Mathieu-Daudé wrote:
> On 10/7/20 7:28 PM, Daniel Henrique Barboza wrote:
> > A new function called spapr_numa_define_associativity_domains()
> > is created to calculate the associativity domains and change
> > the associativity arrays considering user input. This is how
> > the associativity domain between two NUMA nodes A and B is
> > calculated:
> > 
> > - get the distance D between them
> > 
> > - get the correspondent NUMA level 'n_level' for D. This is done
> > via a helper called spapr_numa_get_numa_level()
> > 
> > - all associativity arrays were initialized with their own
> > numa_ids, and we're calculating the distance in node_id ascending
> > order, starting from node id 0 (the first node retrieved by
> > numa_state). This will have a cascade effect in the algorithm because
> > the associativity domains that node 0 defines will be carried over to
> > other nodes, and node 1 associativities will be carried over after
> > taking node 0 associativities into account, and so on. This
> > happens because we'll assign assoc_src as the associativity domain
> > of dst as well, for all NUMA levels beyond and including n_level.
> > 
> > The PPC kernel expects the associativity domains of the first node
> > (node id 0) to be always 0 [1], and this algorithm will grant that
> > by default.
> > 
> > Ultimately, all of this results in a best effort approximation for
> > the actual NUMA distances the user input in the command line. Given
> > the nature of how PAPR itself interprets NUMA distances versus the
> > expectations risen by how ACPI SLIT works, there might be better
> > algorithms but, in the end, it'll also result in another way to
> > approximate what the user really wanted.
> > 
> > To keep this commit message no longer than it already is, the next
> > patch will update the existing documentation in ppc-spapr-numa.rst
> > with more in depth details and design considerations/drawbacks.
> > 
> > [1] https://lore.kernel.org/linuxppc-dev/5e8fbea3-8faf-0951-172a-b41a2138fbcf@gmail.com/
> > 
> > Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
> > ---
> >   capstone            |   2 +-
> >   hw/ppc/spapr_numa.c | 110 +++++++++++++++++++++++++++++++++++++++++++-
> >   2 files changed, 110 insertions(+), 2 deletions(-)
> > 
> > diff --git a/capstone b/capstone
> > index f8b1b83301..22ead3e0bf 160000
> > --- a/capstone
> > +++ b/capstone
> > @@ -1 +1 @@
> > -Subproject commit f8b1b833015a4ae47110ed068e0deb7106ced66d
> > +Subproject commit 22ead3e0bfdb87516656453336160e0a37b066bf
> 
> Certainly unrelated to your patch.

Yeah, found and fixed that one already.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-10-12 22:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07 17:28 [PATCH v4 0/5] pseries NUMA distance calculation Daniel Henrique Barboza
2020-10-07 17:28 ` [PATCH v4 1/5] spapr: add spapr_machine_using_legacy_numa() helper Daniel Henrique Barboza
2020-10-07 17:28 ` [PATCH v4 2/5] spapr_numa: forbid asymmetrical NUMA setups Daniel Henrique Barboza
2020-10-07 17:28 ` [PATCH v4 3/5] spapr_numa: change reference-points and maxdomain settings Daniel Henrique Barboza
2020-10-07 17:28 ` [PATCH v4 4/5] spapr_numa: consider user input when defining associativity Daniel Henrique Barboza
2020-10-12 17:44   ` Philippe Mathieu-Daudé
2020-10-12 22:48     ` David Gibson [this message]
2020-10-07 17:28 ` [PATCH v4 5/5] specs/ppc-spapr-numa: update with new NUMA support Daniel Henrique Barboza
2020-10-08  9:13 ` [PATCH v4 0/5] pseries NUMA distance calculation Greg Kurz
2020-10-08 11:07   ` Daniel Henrique Barboza
2020-10-08 23:52 ` David Gibson

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=20201012224846.GC71119@yekko.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=danielhb413@gmail.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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.