All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: xiaoguangrong.eric@gmail.com, mst@redhat.com,
	jingqi.liu@intel.com, Tao Xu <tao3.xu@intel.com>,
	qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
	pbonzini@redhat.com, rth@twiddle.net, ehabkost@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4 08/11] numa: Extend the command-line to provide memory latency and bandwidth information
Date: Thu, 6 Jun 2019 18:50:40 +0200	[thread overview]
Message-ID: <20190606185040.7eb6c32e@redhat.com> (raw)
In-Reply-To: <c802e812-dabb-0ec6-4458-71f0379856c7@redhat.com>

On Thu, 6 Jun 2019 08:23:47 -0500
Eric Blake <eblake@redhat.com> wrote:

> On 6/6/19 2:47 AM, Tao Xu wrote:
> > On 6/5/2019 10:40 PM, Igor Mammedov wrote:  
> >> On Wed,  8 May 2019 14:17:23 +0800
> >> Tao Xu <tao3.xu@intel.com> wrote:
> >>  
> >>> From: Liu Jingqi <jingqi.liu@intel.com>
> >>>
> >>> Add -numa hmat-lb option to provide System Locality Latency and
> >>> Bandwidth Information. These memory attributes help to build
> >>> System Locality Latency and Bandwidth Information Structure(s)
> >>> in ACPI Heterogeneous Memory Attribute Table (HMAT).
> >>>
> >>> Signed-off-by: Liu Jingqi <jingqi.liu@intel.com>
> >>> Signed-off-by: Tao Xu <tao3.xu@intel.com>
> >>> ---  
> > ...  
> >>> +##
> >>> +{ 'struct': 'NumaHmatLBOptions',
> >>> +  'data': {
> >>> +   'initiator': 'uint16',
> >>> +   'target': 'uint16',
> >>> +   'hierarchy': 'HmatLBMemoryHierarchy',
> >>> +   'data-type': 'HmatLBDataType',  
> >> I think union will be better here with data-type used as discriminator,
> >> on top of that you'll be able to drop a bit of error checking above since
> >> QAPI's union will not allow user to mix latency and bandwidth.
> >>  
> > Hi Igor,
> > 
> > I have quesion here, the 'hmat-lb' is a member of a union 'NumaOptions',
> > it seems can' use a union as a member of union.  
> 
> It should be technically possible to expand the QAPI generators to allow
> one union as a branch within another union, so long as there are no
> collisions in identifiers, if that makes for the smartest on-the-wire
> representation.

It would save quite a bit of boiler plate error checking in numa code,
but since I don't know much about QAPI to make meaningful suggestion
how to implement it, I won't insist on using union.


  reply	other threads:[~2019-06-06 16:52 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08  6:17 [Qemu-devel] [PATCH v4 00/11] Build ACPI Heterogeneous Memory Attribute Table (HMAT) Tao Xu
2019-05-08  6:17 ` [Qemu-devel] [PATCH v4 01/11] numa: move numa global variable nb_numa_nodes into MachineState Tao Xu
2019-05-23 13:04   ` Igor Mammedov
2019-05-08  6:17 ` [Qemu-devel] [PATCH v4 02/11] numa: move numa global variable have_numa_distance " Tao Xu
2019-05-23 13:07   ` Igor Mammedov
2019-05-08  6:17 ` [Qemu-devel] [PATCH v4 03/11] numa: move numa global variable numa_info " Tao Xu
2019-05-23 13:47   ` Igor Mammedov
2019-05-28  7:43     ` Tao Xu
2019-05-08  6:17 ` [Qemu-devel] [PATCH v4 04/11] acpi: introduce AcpiDeviceIfClass.build_mem_ranges hook Tao Xu
2019-05-24 12:35   ` Igor Mammedov
2019-06-06  5:15     ` Tao Xu
2019-06-06 16:25       ` Igor Mammedov
2019-05-08  6:17 ` [Qemu-devel] [PATCH v4 05/11] hmat acpi: Build Memory Subsystem Address Range Structure(s) in ACPI HMAT Tao Xu
2019-05-24 14:16   ` Igor Mammedov
2019-05-08  6:17 ` [Qemu-devel] [PATCH v4 06/11] hmat acpi: Build System Locality Latency and Bandwidth Information " Tao Xu
2019-06-04 14:43   ` Igor Mammedov
2019-05-08  6:17 ` [Qemu-devel] [PATCH v4 07/11] hmat acpi: Build Memory Side Cache " Tao Xu
2019-06-04 15:04   ` Igor Mammedov
2019-06-05  6:04     ` Tao Xu
2019-06-05 12:12       ` Igor Mammedov
2019-06-06  3:00         ` Tao Xu
2019-06-06 16:45           ` Igor Mammedov
2019-06-10 13:39             ` Tao Xu
2019-06-16 19:41               ` Igor Mammedov
2019-05-08  6:17 ` [Qemu-devel] [PATCH v4 08/11] numa: Extend the command-line to provide memory latency and bandwidth information Tao Xu
2019-06-05 14:40   ` Igor Mammedov
2019-06-06  7:47     ` Tao Xu
2019-06-06 13:23       ` Eric Blake
2019-06-06 16:50         ` Igor Mammedov [this message]
2019-05-08  6:17 ` [Qemu-devel] [PATCH v4 09/11] numa: Extend the command-line to provide memory side cache information Tao Xu
2019-06-16 19:52   ` Igor Mammedov
2019-05-08  6:17 ` [Qemu-devel] [PATCH v4 10/11] acpi: introduce build_acpi_aml_common for NFIT generalizations Tao Xu
2019-06-06 17:00   ` Igor Mammedov
2019-05-08  6:17 ` [Qemu-devel] [PATCH v4 11/11] hmat acpi: Implement _HMA method to update HMAT at runtime Tao Xu
2019-06-16 20:07   ` Igor Mammedov
2019-06-17  7:19     ` Tao Xu
2019-05-31  4:55 ` [Qemu-devel] [PATCH v4 00/11] Build ACPI Heterogeneous Memory Attribute Table (HMAT) Dan Williams
2019-05-31  4:55   ` Dan Williams

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=20190606185040.7eb6c32e@redhat.com \
    --to=imammedo@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=jingqi.liu@intel.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=tao3.xu@intel.com \
    --cc=xiaoguangrong.eric@gmail.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.