[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 14/20] numa: Handle virtio-mem in NUMA stats
From: |
Pankaj Gupta |
Subject: |
Re: [PATCH v3 14/20] numa: Handle virtio-mem in NUMA stats |
Date: |
Wed, 3 Jun 2020 20:33:09 +0200 |
> Account the memory to the configured nid.
>
> Cc: Eduardo Habkost <ehabkost@redhat.com>
> Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
> hw/core/numa.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/hw/core/numa.c b/hw/core/numa.c
> index 316bc50d75..06960918e7 100644
> --- a/hw/core/numa.c
> +++ b/hw/core/numa.c
> @@ -812,6 +812,7 @@ static void numa_stat_memory_devices(NumaNodeMem
> node_mem[])
> MemoryDeviceInfoList *info;
> PCDIMMDeviceInfo *pcdimm_info;
> VirtioPMEMDeviceInfo *vpi;
> + VirtioMEMDeviceInfo *vmi;
>
> for (info = info_list; info; info = info->next) {
> MemoryDeviceInfo *value = info->value;
> @@ -832,6 +833,11 @@ static void numa_stat_memory_devices(NumaNodeMem
> node_mem[])
> node_mem[0].node_mem += vpi->size;
> node_mem[0].node_plugged_mem += vpi->size;
> break;
> + case MEMORY_DEVICE_INFO_KIND_VIRTIO_MEM:
> + vmi = value->u.virtio_mem.data;
> + node_mem[vmi->node].node_mem += vmi->size;
> + node_mem[vmi->node].node_plugged_mem += vmi->size;
> + break;
> default:
> g_assert_not_reached();
> }
Reviewed-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
- [PATCH v3 06/20] target/i386: sev: Use ram_block_discard_disable(), (continued)
- [PATCH v3 06/20] target/i386: sev: Use ram_block_discard_disable(), David Hildenbrand, 2020/06/03
- [PATCH v3 07/20] migration/rdma: Use ram_block_discard_disable(), David Hildenbrand, 2020/06/03
- [PATCH v3 08/20] migration/colo: Use ram_block_discard_disable(), David Hildenbrand, 2020/06/03
- [PATCH v3 09/20] linux-headers: update to contain virtio-mem, David Hildenbrand, 2020/06/03
- [PATCH v3 10/20] virtio-mem: Paravirtualized memory hot(un)plug, David Hildenbrand, 2020/06/03
- [PATCH v3 11/20] virtio-pci: Proxy for virtio-mem, David Hildenbrand, 2020/06/03
- [PATCH v3 12/20] MAINTAINERS: Add myself as virtio-mem maintainer, David Hildenbrand, 2020/06/03
- [PATCH v3 13/20] hmp: Handle virtio-mem when printing memory device info, David Hildenbrand, 2020/06/03
- [PATCH v3 14/20] numa: Handle virtio-mem in NUMA stats, David Hildenbrand, 2020/06/03
- Re: [PATCH v3 14/20] numa: Handle virtio-mem in NUMA stats,
Pankaj Gupta <=
- [PATCH v3 15/20] pc: Support for virtio-mem-pci, David Hildenbrand, 2020/06/03
- [PATCH v3 16/20] virtio-mem: Allow notifiers for size changes, David Hildenbrand, 2020/06/03
- [PATCH v3 17/20] virtio-pci: Send qapi events when the virtio-mem size changes, David Hildenbrand, 2020/06/03
- [PATCH v3 18/20] virtio-mem: Migration sanity checks, David Hildenbrand, 2020/06/03
- [PATCH v3 19/20] virtio-mem: Add trace events, David Hildenbrand, 2020/06/03
- [PATCH v3 20/20] virtio-mem: Exclude unplugged memory during migration, David Hildenbrand, 2020/06/03
- Re: [PATCH v3 00/20] virtio-mem: Paravirtualized memory hot(un)plug, Eric Blake, 2020/06/03
- Re: [PATCH v3 00/20] virtio-mem: Paravirtualized memory hot(un)plug, Michael S. Tsirkin, 2020/06/09