[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 4/7] numa: Classify the numa nodes as memory
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PATCH v1 4/7] numa: Classify the numa nodes as memory initiators and memory targets |
Date: |
Fri, 11 May 2018 11:33:00 -0300 |
User-agent: |
Mutt/1.9.2 (2017-12-15) |
On Wed, May 09, 2018 at 04:36:29PM +0800, Liu Jingqi wrote:
> An initiator proximity domain (memory initiator) is any device
> such as a CPU or a separate memory I/O device that can initiate
> a memory request. A target proximity domain (memory target)
> is a CPU-accessible physical address range.
>
[...]
> + if (node->cpus) {
> + initiator_pxm[num_initiator++] = nodenr;
> + }
[...]
> + target_pxm[num_target++] = nodenr;
I suggest NumaNode::is_initiator and NumaNode::is_target boolean
fields instead of a separate global table.
Or numa.c could simply provide
bool numa_node_is_initiator(int node) and
bool numa_node_is_target(int node)
helpers.
--
Eduardo