mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
numa: Keep track of NUMA nodes present on the command-line
Based on "enable sparse node numbering" patch from Nishanth Aravamudan, but without the code to actually support sparse node IDs. This just adds the code to keep track of present/non-present nodes on the command-line, without changing any behavior. Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com> [Rename max_numa_node to max_numa_nodeid -Eduardo] [Initialize max_numa_nodeid to 0 -Eduardo] [Use MAX() macro when setting max_numa_nodeid -Eduardo] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
2f5732e964
commit
1af878e049
3 changed files with 11 additions and 1 deletions
|
@ -146,11 +146,16 @@ extern int mem_prealloc;
|
|||
*/
|
||||
#define MAX_CPUMASK_BITS 255
|
||||
|
||||
extern int nb_numa_nodes;
|
||||
extern int nb_numa_nodes; /* Number of NUMA nodes */
|
||||
extern int max_numa_nodeid; /* Highest specified NUMA node ID, plus one.
|
||||
* For all nodes, nodeid < max_numa_nodeid
|
||||
*/
|
||||
|
||||
typedef struct node_info {
|
||||
uint64_t node_mem;
|
||||
DECLARE_BITMAP(node_cpu, MAX_CPUMASK_BITS);
|
||||
struct HostMemoryBackend *node_memdev;
|
||||
bool present;
|
||||
} NodeInfo;
|
||||
extern NodeInfo numa_info[MAX_NODES];
|
||||
void set_numa_nodes(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue