From: Tao Xu <tao3.xu@intel.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: "lvivier@redhat.com" <lvivier@redhat.com>,
"thuth@redhat.com" <thuth@redhat.com>,
"ehabkost@redhat.com" <ehabkost@redhat.com>,
"mst@redhat.com" <mst@redhat.com>,
"Liu, Jingqi" <jingqi.liu@intel.com>,
"Du, Fan" <fan.du@intel.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"mdroth@linux.vnet.ibm.com" <mdroth@linux.vnet.ibm.com>,
"jonathan.cameron@huawei.com" <jonathan.cameron@huawei.com>,
"armbru@redhat.com" <armbru@redhat.com>
Subject: Re: [PATCH v16 08/14] numa: Extend CLI to provide memory latency and bandwidth information
Date: Wed, 20 Nov 2019 15:55:04 +0800 [thread overview]
Message-ID: <f82a9d01-e9cb-902e-34bd-c81fab380995@intel.com> (raw)
In-Reply-To: <20191119120302.6ff9e61e@redhat.com>
On 11/19/2019 7:03 PM, Igor Mammedov wrote:
> On Fri, 15 Nov 2019 15:53:46 +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>
>
> looks good to me, so
>
> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
>
>
> PS:
> also see question below
>
[...]
>> +
>> + hmat_lb->range_bitmap |= node->bandwidth;
>> + first_bit = ctz64(hmat_lb->range_bitmap);
>> + hmat_lb->base = UINT64_C(1) << first_bit;
>> + max_entry = node->bandwidth / hmat_lb->base;
>> + last_bit = 64 - clz64(hmat_lb->range_bitmap);
>> +
>> + /*
>> + * For bandwidth, first_bit record the base unit of bandwidth bits,
>> + * last_bit record the last bit of the max bandwidth. The max compressed
>> + * bandwidth should be less than 0xFFFF (UINT16_MAX)
>> + */
>> + if ((last_bit - first_bit) > UINT16_BITS || max_entry >= UINT16_MAX) {
> ^^^^^^^^^^^^^^^^^^^
> what bandwidth combination is going to trigger above condition?
>
Only use (last_bit - first_bit) > UINT16_BITS, we can't trigger error if
the max compressed bandwidth is 0xFFFF. Because in that condition,
"last_bit - first_bit == UINT16_BITS". So I add "max_entry >=
UINT16_MAX" to catch 0xFFFF. For example:
Combination 1 (Error):
bandwidth1 = ...0000 1111 1111 1111 1110 0000... (max_entry 32767)
range_bitmap = ...0000 1111 1111 1111 1110 0000... (range is 15 bits)
bandwidth2 = ...0000 1111 1111 1111 1111 0000... (max_entry 65535)
range_bitmap = ...0000 1111 1111 1111 1111 0000... (range is 16 bits)
Combination 2 (Error):
bandwidth1 = ...0000 1111 1111 1111 1110 0000... (max_entry 32767)
range_bitmap = ...0000 1111 1111 1111 1110 0000... (range is 15 bits)
bandwidth2 = ...0001 1111 1111 1111 1110 0000... (max_entry 65535)
range_bitmap = ...0001 1111 1111 1111 1110 0000... (range is 16 bits)
Combination 3 (OK, because bandwidth1 will be compressed to 65534):
bandwidth1 = ...0000 1111 1111 1111 1110 0000... (max_entry 32767)
range_bitmap = ...0000 1111 1111 1111 1110 0000... (range is 15 bits)
bandwidth2 = ...0000 0111 1111 1111 1111 0000... (max_entry 32767)
range_bitmap = ...0000 1111 1111 1111 1111 0000... (range is 16 bits)
Combination 4 (Error):
bandwidth1 = ...0000 1111 1111 1111 1111 0000... (max_entry 65535)
range_bitmap = ...0000 1111 1111 1111 1111 0000... (range is 16 bits)
next prev parent reply other threads:[~2019-11-20 7:56 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-15 7:53 [PATCH v16 00/14] Build ACPI Heterogeneous Memory Attribute Table (HMAT) Tao Xu
2019-11-15 7:53 ` [PATCH v16 01/14] util/cutils: Add Add qemu_strtold and qemu_strtold_finite Tao Xu
2019-11-15 7:53 ` [PATCH v16 02/14] util/cutils: Use qemu_strtold_finite to parse size Tao Xu
2019-11-15 7:53 ` [PATCH v16 03/14] util/cutils: refactor do_strtosz() to support suffixes list Tao Xu
2019-11-15 12:11 ` Philippe Mathieu-Daudé
2019-11-18 7:35 ` Tao Xu
2019-11-15 7:53 ` [PATCH v16 04/14] util/cutils: Add qemu_strtotime_ns() Tao Xu
2019-11-15 7:53 ` [PATCH v16 05/14] qapi: Add builtin type time Tao Xu
2019-11-15 7:53 ` [PATCH v16 06/14] tests: Add test for QAPI " Tao Xu
2019-11-15 7:53 ` [PATCH v16 07/14] numa: Extend CLI to provide initiator information for numa nodes Tao Xu
2019-11-15 7:53 ` [PATCH v16 08/14] numa: Extend CLI to provide memory latency and bandwidth information Tao Xu
2019-11-19 11:03 ` Igor Mammedov
2019-11-20 7:55 ` Tao Xu [this message]
2019-11-20 12:56 ` Igor Mammedov
2019-11-21 1:07 ` Tao Xu
2019-11-15 7:53 ` [PATCH v16 09/14] numa: Extend CLI to provide memory side cache information Tao Xu
2019-11-19 11:47 ` Igor Mammedov
2019-11-20 6:51 ` Tao Xu
2019-11-15 7:53 ` [PATCH v16 10/14] hmat acpi: Build Memory Proximity Domain Attributes Structure(s) Tao Xu
2019-11-15 7:53 ` [PATCH v16 11/14] hmat acpi: Build System Locality Latency and Bandwidth Information Structure(s) Tao Xu
2019-11-20 10:09 ` Igor Mammedov
2019-11-21 1:28 ` Tao Xu
2019-11-15 7:53 ` [PATCH v16 12/14] hmat acpi: Build Memory Side Cache " Tao Xu
2019-11-20 12:50 ` Igor Mammedov
2019-11-15 7:53 ` [PATCH v16 13/14] tests/numa: Add case for QMP build HMAT Tao Xu
2019-11-20 12:32 ` Igor Mammedov
2019-11-21 0:56 ` Tao Xu
2019-11-15 7:53 ` [PATCH v16 14/14] tests/bios-tables-test: add test cases for ACPI HMAT Tao Xu
2019-11-15 8:58 ` [PATCH v16 00/14] Build ACPI Heterogeneous Memory Attribute Table (HMAT) no-reply
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=f82a9d01-e9cb-902e-34bd-c81fab380995@intel.com \
--to=tao3.xu@intel.com \
--cc=armbru@redhat.com \
--cc=ehabkost@redhat.com \
--cc=fan.du@intel.com \
--cc=imammedo@redhat.com \
--cc=jingqi.liu@intel.com \
--cc=jonathan.cameron@huawei.com \
--cc=lvivier@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.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 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).