Displaying 20 results from an estimated 67 matches for "totalram".
2019 Dec 05
2
[PATCH v2] virtio-balloon: fix managed page counts when migrating pages between zones
...Fix it by properly adjusting the managed page count when migrating if
the zone changed. The managed page count of the zones now looks after
unplug of the DIMM (and after deflating the balloon) just like before
inflating the balloon (and plugging+onlining the DIMM).
We'll temporarily modify the totalram page count. If this ever becomes a
problem, we can fine tune by providing helpers that don't touch
the totalram pages (e.g., adjust_zone_managed_page_count()).
Reported-by: Yumei Huang <yuhuang at redhat.com>
Fixes: 3dcc0571cd64 ("mm: correctly update zone->managed_pages")
C...
2019 Dec 05
2
[PATCH v2] virtio-balloon: fix managed page counts when migrating pages between zones
...Fix it by properly adjusting the managed page count when migrating if
the zone changed. The managed page count of the zones now looks after
unplug of the DIMM (and after deflating the balloon) just like before
inflating the balloon (and plugging+onlining the DIMM).
We'll temporarily modify the totalram page count. If this ever becomes a
problem, we can fine tune by providing helpers that don't touch
the totalram pages (e.g., adjust_zone_managed_page_count()).
Reported-by: Yumei Huang <yuhuang at redhat.com>
Fixes: 3dcc0571cd64 ("mm: correctly update zone->managed_pages")
C...
2024 Aug 30
1
[PATCH -next 2/3] drm/amdgpu: use clamp() in amdgpu_vm_adjust_size()
...u/amdgpu_vm.c
> index e20d19ae01b2..40f9a5d4f3c0 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -2224,7 +2224,7 @@ void amdgpu_vm_adjust_size(struct amdgpu_device *adev, uint32_t min_vm_size,
> phys_ram_gb = ((uint64_t)si.totalram * si.mem_unit +
> (1 << 30) - 1) >> 30;
> vm_size = roundup_pow_of_two(
> - min(max(phys_ram_gb * 3, min_vm_size), max_size));
> + clamp(phys_ram_gb * 3, min_vm_size, max_size));
> }
>
> adev->vm_manager.max_pfn = (uint64_t)vm_size &l...
2017 Oct 19
2
[PATCH v2 1/1] virtio_balloon: include buffers and cached memory statistics
...< 0)
> + cached = 0;
> +
> +
> #ifdef CONFIG_VM_EVENT_COUNTERS
> update_stat(vb, idx++, VIRTIO_BALLOON_S_SWAP_IN,
> pages_to_bytes(events[PSWPIN]));
> @@ -264,6 +271,10 @@ static unsigned int update_balloon_stats(struct virtio_balloon *vb)
> pages_to_bytes(i.totalram));
> update_stat(vb, idx++, VIRTIO_BALLOON_S_AVAIL,
> pages_to_bytes(available));
> + update_stat(vb, idx++, VIRTIO_BALLOON_S_BUFFERS,
> + pages_to_bytes(i.bufferram));
> + update_stat(vb, idx++, VIRTIO_BALLOON_S_CACHED,
> + pages_to_bytes(cached));
>
> retu...
2017 Oct 19
2
[PATCH v2 1/1] virtio_balloon: include buffers and cached memory statistics
...< 0)
> + cached = 0;
> +
> +
> #ifdef CONFIG_VM_EVENT_COUNTERS
> update_stat(vb, idx++, VIRTIO_BALLOON_S_SWAP_IN,
> pages_to_bytes(events[PSWPIN]));
> @@ -264,6 +271,10 @@ static unsigned int update_balloon_stats(struct virtio_balloon *vb)
> pages_to_bytes(i.totalram));
> update_stat(vb, idx++, VIRTIO_BALLOON_S_AVAIL,
> pages_to_bytes(available));
> + update_stat(vb, idx++, VIRTIO_BALLOON_S_BUFFERS,
> + pages_to_bytes(i.bufferram));
> + update_stat(vb, idx++, VIRTIO_BALLOON_S_CACHED,
> + pages_to_bytes(cached));
>
> retu...
2019 Dec 11
1
[PATCH v3] virtio-balloon: fix managed page counts when migrating pages between zones
...Fix it by properly adjusting the managed page count when migrating if
the zone changed. The managed page count of the zones now looks after
unplug of the DIMM (and after deflating the balloon) just like before
inflating the balloon (and plugging+onlining the DIMM).
We'll temporarily modify the totalram page count. If this ever becomes a
problem, we can fine tune by providing helpers that don't touch
the totalram pages (e.g., adjust_zone_managed_page_count()).
Please note that fixing up the managed page count is only necessary when
we adjusted the managed page count when inflating - only if w...
2019 Dec 10
1
[PATCH v2] virtio-balloon: fix managed page counts when migrating pages between zones
...t when migrating if
> > the zone changed. The managed page count of the zones now looks after
> > unplug of the DIMM (and after deflating the balloon) just like before
> > inflating the balloon (and plugging+onlining the DIMM).
> >
> > We'll temporarily modify the totalram page count. If this ever becomes a
> > problem, we can fine tune by providing helpers that don't touch
> > the totalram pages (e.g., adjust_zone_managed_page_count()).
> >
> > Reported-by: Yumei Huang <yuhuang at redhat.com>
> > Fixes: 3dcc0571cd64 ("mm...
2017 Nov 12
2
[PATCH v3] virtio_balloon: include disk/file caches memory statistics
..._meminfo(&i);
available = si_mem_available();
+ caches = global_node_page_state(NR_FILE_PAGES);
#ifdef CONFIG_VM_EVENT_COUNTERS
update_stat(vb, idx++, VIRTIO_BALLOON_S_SWAP_IN,
@@ -264,6 +266,8 @@ static unsigned int update_balloon_stats(struct virtio_balloon *vb)
pages_to_bytes(i.totalram));
update_stat(vb, idx++, VIRTIO_BALLOON_S_AVAIL,
pages_to_bytes(available));
+ update_stat(vb, idx++, VIRTIO_BALLOON_S_CACHES,
+ pages_to_bytes(caches));
return idx;
}
diff --git a/include/uapi/linux/virtio_balloon.h b/include/uapi/linux/virtio_balloon.h
index 343d7ddefe04..4e8b8304...
2017 Nov 12
2
[PATCH v3] virtio_balloon: include disk/file caches memory statistics
..._meminfo(&i);
available = si_mem_available();
+ caches = global_node_page_state(NR_FILE_PAGES);
#ifdef CONFIG_VM_EVENT_COUNTERS
update_stat(vb, idx++, VIRTIO_BALLOON_S_SWAP_IN,
@@ -264,6 +266,8 @@ static unsigned int update_balloon_stats(struct virtio_balloon *vb)
pages_to_bytes(i.totalram));
update_stat(vb, idx++, VIRTIO_BALLOON_S_AVAIL,
pages_to_bytes(available));
+ update_stat(vb, idx++, VIRTIO_BALLOON_S_CACHES,
+ pages_to_bytes(caches));
return idx;
}
diff --git a/include/uapi/linux/virtio_balloon.h b/include/uapi/linux/virtio_balloon.h
index 343d7ddefe04..4e8b8304...
2016 Feb 16
3
[PATCH 0/2] export 'available' memory to virtio balloon statistics
Add a new field, VIRTIO_BALLOON_S_AVAIL, to virtio_balloon memory
statistics protocol, corresponding to 'Available' in /proc/meminfo.
It indicates to the hypervisor how big the balloon can be inflated
without pushing the guest system to swap. This metric would be very
useful in VM orchestration software to improve memory management
of different VMs under overcommit.
Signed-off-by: Igor
2016 Feb 16
3
[PATCH 0/2] export 'available' memory to virtio balloon statistics
Add a new field, VIRTIO_BALLOON_S_AVAIL, to virtio_balloon memory
statistics protocol, corresponding to 'Available' in /proc/meminfo.
It indicates to the hypervisor how big the balloon can be inflated
without pushing the guest system to swap. This metric would be very
useful in VM orchestration software to improve memory management
of different VMs under overcommit.
Signed-off-by: Igor
2017 Mar 23
1
[PATCH v2] virtio_balloon: don't push uninitialized buffers to stats virtqueue
...sertions(+)
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 4e11915..42dc35f 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -266,6 +266,8 @@ static void update_balloon_stats(struct virtio_balloon *vb)
pages_to_bytes(i.totalram));
update_stat(vb, idx++, VIRTIO_BALLOON_S_AVAIL,
pages_to_bytes(available));
+
+ BUG_ON(idx < VIRTIO_BALLOON_S_NR);
}
/*
@@ -429,6 +431,8 @@ static int init_vqs(struct virtio_balloon *vb)
* Prime this virtqueue with one buffer so the hypervisor can
* use it to signal us later...
2017 Mar 23
1
[PATCH v2] virtio_balloon: don't push uninitialized buffers to stats virtqueue
...sertions(+)
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 4e11915..42dc35f 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -266,6 +266,8 @@ static void update_balloon_stats(struct virtio_balloon *vb)
pages_to_bytes(i.totalram));
update_stat(vb, idx++, VIRTIO_BALLOON_S_AVAIL,
pages_to_bytes(available));
+
+ BUG_ON(idx < VIRTIO_BALLOON_S_NR);
}
/*
@@ -429,6 +431,8 @@ static int init_vqs(struct virtio_balloon *vb)
* Prime this virtqueue with one buffer so the hypervisor can
* use it to signal us later...
2017 Oct 31
2
[PATCH v2 1/1] virtio_balloon: include buffers and cached memory statistics
...; > #ifdef CONFIG_VM_EVENT_COUNTERS
> > > update_stat(vb, idx++, VIRTIO_BALLOON_S_SWAP_IN,
> > > pages_to_bytes(events[PSWPIN]));
> > > @@ -264,6 +271,10 @@ static unsigned int update_balloon_stats(struct virtio_balloon *vb)
> > > pages_to_bytes(i.totalram));
> > > update_stat(vb, idx++, VIRTIO_BALLOON_S_AVAIL,
> > > pages_to_bytes(available));
> > > + update_stat(vb, idx++, VIRTIO_BALLOON_S_BUFFERS,
> > > + pages_to_bytes(i.bufferram));
> > > + update_stat(vb, idx++, VIRTIO_BALLOON_S_CACHED,
>...
2017 Oct 31
2
[PATCH v2 1/1] virtio_balloon: include buffers and cached memory statistics
...; > #ifdef CONFIG_VM_EVENT_COUNTERS
> > > update_stat(vb, idx++, VIRTIO_BALLOON_S_SWAP_IN,
> > > pages_to_bytes(events[PSWPIN]));
> > > @@ -264,6 +271,10 @@ static unsigned int update_balloon_stats(struct virtio_balloon *vb)
> > > pages_to_bytes(i.totalram));
> > > update_stat(vb, idx++, VIRTIO_BALLOON_S_AVAIL,
> > > pages_to_bytes(available));
> > > + update_stat(vb, idx++, VIRTIO_BALLOON_S_BUFFERS,
> > > + pages_to_bytes(i.bufferram));
> > > + update_stat(vb, idx++, VIRTIO_BALLOON_S_CACHED,
>...
2017 Sep 20
2
[PATCH] virtio_balloon: include buffers and chached memory statistics
...che_pages() - i.bufferram;
+ if (cached < 0)
+ cached = 0;
+
+
#ifdef CONFIG_VM_EVENT_COUNTERS
update_stat(vb, idx++, VIRTIO_BALLOON_S_SWAP_IN,
pages_to_bytes(events[PSWPIN]));
@@ -264,6 +271,10 @@ static unsigned int update_balloon_stats(struct virtio_balloon *vb)
pages_to_bytes(i.totalram));
update_stat(vb, idx++, VIRTIO_BALLOON_S_AVAIL,
pages_to_bytes(available));
+ update_stat(vb, idx++, VIRTIO_BALLOON_S_BUFFERS,
+ pages_to_bytes(i.bufferram));
+ update_stat(vb, idx++, VIRTIO_BALLOON_S_CACHED,
+ pages_to_bytes(cached));
return idx;
}
diff --git a/include/uapi/lin...
2017 Sep 20
2
[PATCH] virtio_balloon: include buffers and chached memory statistics
...che_pages() - i.bufferram;
+ if (cached < 0)
+ cached = 0;
+
+
#ifdef CONFIG_VM_EVENT_COUNTERS
update_stat(vb, idx++, VIRTIO_BALLOON_S_SWAP_IN,
pages_to_bytes(events[PSWPIN]));
@@ -264,6 +271,10 @@ static unsigned int update_balloon_stats(struct virtio_balloon *vb)
pages_to_bytes(i.totalram));
update_stat(vb, idx++, VIRTIO_BALLOON_S_AVAIL,
pages_to_bytes(available));
+ update_stat(vb, idx++, VIRTIO_BALLOON_S_BUFFERS,
+ pages_to_bytes(i.bufferram));
+ update_stat(vb, idx++, VIRTIO_BALLOON_S_CACHED,
+ pages_to_bytes(cached));
return idx;
}
diff --git a/include/uapi/lin...
2017 Sep 21
4
[PATCH v2 0/1] linux: Buffers/caches in VirtIO Balloon driver stats
Linux driver part
v2:
- fixed typos
Tom?? Golembiovsk? (1):
virtio_balloon: include buffers and cached memory statistics
drivers/virtio/virtio_balloon.c | 11 +++++++++++
include/uapi/linux/virtio_balloon.h | 4 +++-
mm/swap_state.c | 1 +
3 files changed, 15 insertions(+), 1 deletion(-)
--
2.14.1
2017 Sep 21
4
[PATCH v2 0/1] linux: Buffers/caches in VirtIO Balloon driver stats
Linux driver part
v2:
- fixed typos
Tom?? Golembiovsk? (1):
virtio_balloon: include buffers and cached memory statistics
drivers/virtio/virtio_balloon.c | 11 +++++++++++
include/uapi/linux/virtio_balloon.h | 4 +++-
mm/swap_state.c | 1 +
3 files changed, 15 insertions(+), 1 deletion(-)
--
2.14.1
2017 Mar 24
2
[PATCH] virtio_balloon: prevent uninitialized variable use
...on_stats(struct virtio_balloon *vb)
> +static unsigned int update_balloon_stats(struct virtio_balloon *vb)
> {
> unsigned long events[NR_VM_EVENT_ITEMS];
> struct sysinfo i;
> @@ -268,6 +268,8 @@ static void update_balloon_stats(struct virtio_balloon *vb)
> pages_to_bytes(i.totalram));
> update_stat(vb, idx++, VIRTIO_BALLOON_S_AVAIL,
> pages_to_bytes(available));
> +
> + return idx;
> }
>
> /*
> @@ -294,13 +296,14 @@ static void stats_handle_request(struct
> virtio_balloon *vb)
> struct virtqueue *vq;
> struct scatterlist sg;
>...