From: "Cédric Le Goater" <clg@kaod.org>
To: David Gibson <david@gibson.dropbear.id.au>,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: aik@ozlabs.ru, lvivier@redhat.com, philmd@redhat.com, groug@kaod.org
Subject: Re: [Qemu-devel] [PATCH 2/7] spapr: Move handling of special NVLink numa node from reset to init
Date: Wed, 11 Sep 2019 09:28:46 +0200 [thread overview]
Message-ID: <14d8fd7e-d00b-84ce-44d4-464b49d818f0@kaod.org> (raw)
In-Reply-To: <20190911040452.8341-3-david@gibson.dropbear.id.au>
On 11/09/2019 06:04, David Gibson wrote:
> The number of NUMA nodes in the system is fixed from the command line.
> Therefore, there's no need to recalculate it at reset time, and we can
> determine the special gpu_numa_id value used for NVLink2 devices at init
> time.
>
> This simplifies the reset path a bit which will make further improvements
> easier.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Thanks,
C.
> ---
> hw/ppc/spapr.c | 21 +++++++++++----------
> 1 file changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index c551001f86..e03e874d94 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -1737,16 +1737,6 @@ static void spapr_machine_reset(MachineState *machine)
> spapr_setup_hpt_and_vrma(spapr);
> }
>
> - /*
> - * NVLink2-connected GPU RAM needs to be placed on a separate NUMA node.
> - * We assign a new numa ID per GPU in spapr_pci_collect_nvgpu() which is
> - * called from vPHB reset handler so we initialize the counter here.
> - * If no NUMA is configured from the QEMU side, we start from 1 as GPU RAM
> - * must be equally distant from any other node.
> - * The final value of spapr->gpu_numa_id is going to be written to
> - * max-associativity-domains in spapr_build_fdt().
> - */
> - spapr->gpu_numa_id = MAX(1, machine->numa_state->num_nodes);
> qemu_devices_reset();
>
> /*
> @@ -2885,6 +2875,17 @@ static void spapr_machine_init(MachineState *machine)
>
> }
>
> + /*
> + * NVLink2-connected GPU RAM needs to be placed on a separate NUMA node.
> + * We assign a new numa ID per GPU in spapr_pci_collect_nvgpu() which is
> + * called from vPHB reset handler so we initialize the counter here.
> + * If no NUMA is configured from the QEMU side, we start from 1 as GPU RAM
> + * must be equally distant from any other node.
> + * The final value of spapr->gpu_numa_id is going to be written to
> + * max-associativity-domains in spapr_build_fdt().
> + */
> + spapr->gpu_numa_id = MAX(1, machine->numa_state->num_nodes);
> +
> if ((!kvm_enabled() || kvmppc_has_cap_mmu_radix()) &&
> ppc_type_check_compat(machine->cpu_type, CPU_POWERPC_LOGICAL_3_00, 0,
> spapr->max_compat_pvr)) {
>
next prev parent reply other threads:[~2019-09-11 7:30 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-11 4:04 [Qemu-devel] [PATCH 0/7] spapr: CAS and reset cleanup preliminaries David Gibson
2019-09-11 4:04 ` [Qemu-devel] [PATCH 1/7] spapr: Simplify handling of pre ISA 3.0 guest workaround handling David Gibson
2019-09-11 7:09 ` Cédric Le Goater
2019-09-11 7:26 ` Greg Kurz
2019-09-11 7:37 ` Alexey Kardashevskiy
2019-09-11 4:04 ` [Qemu-devel] [PATCH 2/7] spapr: Move handling of special NVLink numa node from reset to init David Gibson
2019-09-11 7:28 ` Cédric Le Goater [this message]
2019-09-11 7:33 ` Greg Kurz
2019-09-11 7:41 ` Alexey Kardashevskiy
2019-09-11 4:04 ` [Qemu-devel] [PATCH 3/7] spapr: Fixes a leak in CAS David Gibson
2019-09-11 7:28 ` Cédric Le Goater
2019-09-11 7:36 ` Greg Kurz
2019-09-11 4:04 ` [Qemu-devel] [PATCH 4/7] spapr: Skip leading zeroes from memory@ DT node names David Gibson
2019-09-11 8:01 ` Greg Kurz
2019-09-11 4:04 ` [Qemu-devel] [PATCH 5/7] spapr: Do not put empty properties for -kernel/-initrd/-append David Gibson
2019-09-11 8:46 ` Greg Kurz
2019-09-12 1:59 ` Alexey Kardashevskiy
2019-09-11 4:04 ` [Qemu-devel] [PATCH 6/7] spapr: Stop providing RTAS blob David Gibson
2019-09-11 9:16 ` Greg Kurz
2019-09-12 1:50 ` Alexey Kardashevskiy
2019-09-12 7:20 ` Greg Kurz
2019-09-11 4:04 ` [Qemu-devel] [PATCH 7/7] spapr: Perform machine reset in a more sensible order David Gibson
2019-09-11 7:40 ` Alexey Kardashevskiy
2019-09-11 7:51 ` David Gibson
2019-09-11 7:54 ` Cédric Le Goater
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=14d8fd7e-d00b-84ce-44d4-464b49d818f0@kaod.org \
--to=clg@kaod.org \
--cc=aik@ozlabs.ru \
--cc=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--cc=lvivier@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).