All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Michal Privoznik <mprivozn@redhat.com>
Cc: jingqi.liu@intel.com, tao3.xu@intel.com, qemu-devel@nongnu.org,
	ehabkost@redhat.com
Subject: Re: [PATCH 3/3] numa: Initialize node initiator with respect to .has_cpu
Date: Fri, 29 May 2020 17:09:48 +0200	[thread overview]
Message-ID: <20200529170948.5bdb3316@redhat.com> (raw)
In-Reply-To: <d3039c47e4ce1118bc7c4d4f51da6412c6669339.1590753455.git.mprivozn@redhat.com>

On Fri, 29 May 2020 15:33:48 +0200
Michal Privoznik <mprivozn@redhat.com> wrote:

> The initiator attribute of a NUMA node is documented as the 'NUMA
> node that has best performance to given NUMA node'. If a NUMA
> node has at least one CPU there can hardly be a different node
> with better performace and thus all NUMA nodes which have a CPU
> are initiators to themselves. Reflect this fact when initializing
> the attribute.

It is not true in case of the node is memory-less

> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
>  hw/core/numa.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/hw/core/numa.c b/hw/core/numa.c
> index 338453461c..1c9bc761cc 100644
> --- a/hw/core/numa.c
> +++ b/hw/core/numa.c
> @@ -136,11 +136,15 @@ static void parse_numa_node(MachineState *ms, NumaNodeOptions *node,
>          numa_info[nodenr].node_memdev = MEMORY_BACKEND(o);
>      }
>  
> -    /*
> -     * If not set the initiator, set it to MAX_NODES. And if
> -     * HMAT is enabled and this node has no cpus, QEMU will raise error.
> -     */
> -    numa_info[nodenr].initiator = MAX_NODES;
> +    /* Initialize initiator to either the current NUMA node (if
> +     * it has at least one CPU), or to MAX_NODES. If HMAT is
> +     * enabled an error will be raised later in
> +     * numa_validate_initiator(). */
> +    if (numa_info[nodenr].has_cpu)
> +        numa_info[nodenr].initiator = nodenr;
> +    else
> +        numa_info[nodenr].initiator = MAX_NODES;
> +
>      if (node->has_initiator) {
>          if (!ms->numa_state->hmat_enabled) {
>              error_setg(errp, "ACPI Heterogeneous Memory Attribute Table "



  reply	other threads:[~2020-05-29 15:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29 13:33 [PATCH 0/3] Couple of HMAT fixes Michal Privoznik
2020-05-29 13:33 ` [PATCH 1/3] qapi: Make @associativity, @policy and @line of NumaHmatCacheOptions optional Michal Privoznik
2020-05-29 15:25   ` Igor Mammedov
2020-05-29 13:33 ` [PATCH 2/3] numa: Allow HMAT cache to be defined before HMAT latency/bandwidth Michal Privoznik
2020-05-29 14:59   ` Igor Mammedov
2020-05-29 15:22     ` Michal Privoznik
2020-05-29 13:33 ` [PATCH 3/3] numa: Initialize node initiator with respect to .has_cpu Michal Privoznik
2020-05-29 15:09   ` Igor Mammedov [this message]
2020-05-29 15:24     ` Michal Privoznik
2020-06-01  8:10     ` Michal Privoznik
2020-06-02  8:00       ` Tao Xu
2020-06-03  9:16         ` Michal Privoznik
2020-06-05  1:52           ` Tao Xu
2020-06-11 14:42             ` Michal Privoznik
2020-05-29 20:11 ` [PATCH 0/3] Couple of HMAT fixes no-reply
2020-05-29 20:42 ` no-reply
2020-06-01 11:14 ` Michal Privoznik

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=20200529170948.5bdb3316@redhat.com \
    --to=imammedo@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=jingqi.liu@intel.com \
    --cc=mprivozn@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=tao3.xu@intel.com \
    /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.