> -----Original Message----- > From: Eduardo Habkost [mailto:[email protected]] > Sent: Friday, May 11, 2018 10:33 PM > To: Liu, Jingqi <[email protected]> > Cc: [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; qemu- > [email protected] > Subject: Re: [PATCH v1 4/7] numa: Classify the numa nodes as memory initiators > and memory targets > > 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
Hi Eduardo, Thanks for your reviewing. It's a good suggestion. I will improve in the next version. Jingqi
