qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Tao Xu <tao3.xu@intel.com>
To: Michal Privoznik <mprivozn@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>
Cc: "Liu, Jingqi" <jingqi.liu@intel.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"ehabkost@redhat.com" <ehabkost@redhat.com>
Subject: Re: [PATCH 3/3] numa: Initialize node initiator with respect to .has_cpu
Date: Fri, 5 Jun 2020 09:52:52 +0800	[thread overview]
Message-ID: <1b670edc-dd14-4e7e-34db-c1f2860297f0@intel.com> (raw)
In-Reply-To: <33014889-a70e-3d5d-3138-0e0f72553477@redhat.com>

On 6/3/20 5:16 PM, Michal Privoznik wrote:
> On 6/2/20 10:00 AM, Tao Xu wrote:
>>
>> On 6/1/2020 4:10 PM, Michal Privoznik wrote:
>>> On 5/29/20 5:09 PM, Igor Mammedov wrote:
>>>> 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
>>>
>>> Are you saying that if there's a memory-less NUMA node, then it needs to
>>> have initiator set too? Asking mostly out of curiosity because we don't
>>> allow memory-less NUMA nodes in Libvirt just yet. Nor cpu-less, but my
>>> patches that I'm referring to in cover letter will allow at least
>>> cpu-less nodes. Should I allow both?
>> QEMU now is not support memory-less NUMA node, but in hardware may be
>> supported. So we reserve this type of NUMA node for future usage. And
>> QEMU now can support cpu-less NUMA node, for emulating some "slow"
>> memory(like some NVDIMM).
> 
> Oh yeah, I understand that. But it doesn't explain why initiator needs
> to be specified for NUMA nodes with cpus and memory, or does it? Maybe
> I'm still misunderstanding what the initiator is.
> 

Yes, the initiator NUMA nodes with cpus and memory should be itself. In 
ACPI 6.3 spec, initiator is defined as:

This field is valid only if the memory controller
responsible for satisfying the access to memory
belonging to the specified memory proximity
domain is directly attached to an initiator that
belongs to a proximity domain. In that case, this
field contains the integer that represents the
proximity domain to which the initiator (Generic
Initiator or Processor) belongs. This number shall
match the corresponding entry in the SRAT table’s
processor affinity structure (e.g., Processor Local
APIC/SAPIC Affinity Structure, Processor Local
x2APIC Affinity Structure, GICC Affinity Structure) if
the initiator is a processor, or the Generic Initiator
Affinity Structure if the initator is a generic
initiator.
Note: this field provides additional information as
to the initiator node that is closest (as in directly
attached) to the memory address ranges within
the specified memory proximity domain, and
therefore should provide the best performance.

And if in the future, there is a memory-less NUMA node. Because in HMAT 
we describe "Memory" Proximity Domain Attributes Structure, I think we 
should not add memory-less NUMA node into HMAT.

>>
>>>
>>> Also, can you shed more light into why machine_set_cpu_numa_node() did
>>> not override the .initiator?
> 
> And this one is still unanswered too. Because from user's perspective,
> initiator has to be set on all NUMA nodes (if HMAT is enabled) and it
> seems like this auto assignment code is not run/not working.
> 
> Michal
> 

So we check the HMAT configure in hw/core/machine.c 
numa_validate_initiator(NumaState *numa_state) because the initiator 
NUMA nodes with cpus and memory should be itself. And in 
machine_set_cpu_numa_node we didn't use auto assignment way just use 
user's setting in cli (although there is only one right choice for NUMA 
nodes with cpus and memory). But I don't know if it is appropriate to 
auto assign the initiator for NUMA nodes with cpus and memory.


  reply	other threads:[~2020-06-05  1:53 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
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 [this message]
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=1b670edc-dd14-4e7e-34db-c1f2860297f0@intel.com \
    --to=tao3.xu@intel.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=jingqi.liu@intel.com \
    --cc=mprivozn@redhat.com \
    --cc=qemu-devel@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).