search for: update_balloon_stats

Displaying 20 results from an estimated 220 matches for "update_balloon_stats".

2017 Mar 24
2
[PATCH] virtio_balloon: prevent uninitialized variable use
...gt; > On Fri, Mar 24, 2017 at 7:38 PM, David Hildenbrand <david at redhat.com> wrote: > >> On 23.03.2017 16:17, Arnd Bergmann wrote: > >>> The latest gcc-7.0.1 snapshot reports a new warning: > >>> > >>> virtio/virtio_balloon.c: In function 'update_balloon_stats': > >>> virtio/virtio_balloon.c:258:26: error: 'events[2]' is used uninitialized in this function [-Werror=uninitialized] > >>> virtio/virtio_balloon.c:260:26: error: 'events[3]' is used uninitialized in this function [-Werror=uninitialized] > >>...
2017 Mar 24
2
[PATCH] virtio_balloon: prevent uninitialized variable use
...gt; > On Fri, Mar 24, 2017 at 7:38 PM, David Hildenbrand <david at redhat.com> wrote: > >> On 23.03.2017 16:17, Arnd Bergmann wrote: > >>> The latest gcc-7.0.1 snapshot reports a new warning: > >>> > >>> virtio/virtio_balloon.c: In function 'update_balloon_stats': > >>> virtio/virtio_balloon.c:258:26: error: 'events[2]' is used uninitialized in this function [-Werror=uninitialized] > >>> virtio/virtio_balloon.c:260:26: error: 'events[3]' is used uninitialized in this function [-Werror=uninitialized] > >>...
2017 Mar 28
1
[PATCH] virtio_balloon: prevent uninitialized variable use
...8 PM, David Hildenbrand <david at redhat.com> wrote: > >> >> On 23.03.2017 16:17, Arnd Bergmann wrote: > >> >>> The latest gcc-7.0.1 snapshot reports a new warning: > >> >>> > >> >>> virtio/virtio_balloon.c: In function 'update_balloon_stats': > >> >>> virtio/virtio_balloon.c:258:26: error: 'events[2]' is used uninitialized in this function [-Werror=uninitialized] > >> >>> virtio/virtio_balloon.c:260:26: error: 'events[3]' is used uninitialized in this function [-Werror=uninitiali...
2017 Mar 28
1
[PATCH] virtio_balloon: prevent uninitialized variable use
...8 PM, David Hildenbrand <david at redhat.com> wrote: > >> >> On 23.03.2017 16:17, Arnd Bergmann wrote: > >> >>> The latest gcc-7.0.1 snapshot reports a new warning: > >> >>> > >> >>> virtio/virtio_balloon.c: In function 'update_balloon_stats': > >> >>> virtio/virtio_balloon.c:258:26: error: 'events[2]' is used uninitialized in this function [-Werror=uninitialized] > >> >>> virtio/virtio_balloon.c:260:26: error: 'events[3]' is used uninitialized in this function [-Werror=uninitiali...
2017 Mar 24
2
[PATCH] virtio_balloon: prevent uninitialized variable use
On Fri, Mar 24, 2017 at 7:38 PM, David Hildenbrand <david at redhat.com> wrote: > On 23.03.2017 16:17, Arnd Bergmann wrote: >> The latest gcc-7.0.1 snapshot reports a new warning: >> >> virtio/virtio_balloon.c: In function 'update_balloon_stats': >> virtio/virtio_balloon.c:258:26: error: 'events[2]' is used uninitialized in this function [-Werror=uninitialized] >> virtio/virtio_balloon.c:260:26: error: 'events[3]' is used uninitialized in this function [-Werror=uninitialized] >> virtio/virtio_balloon....
2017 Mar 24
2
[PATCH] virtio_balloon: prevent uninitialized variable use
On Fri, Mar 24, 2017 at 7:38 PM, David Hildenbrand <david at redhat.com> wrote: > On 23.03.2017 16:17, Arnd Bergmann wrote: >> The latest gcc-7.0.1 snapshot reports a new warning: >> >> virtio/virtio_balloon.c: In function 'update_balloon_stats': >> virtio/virtio_balloon.c:258:26: error: 'events[2]' is used uninitialized in this function [-Werror=uninitialized] >> virtio/virtio_balloon.c:260:26: error: 'events[3]' is used uninitialized in this function [-Werror=uninitialized] >> virtio/virtio_balloon....
2017 Mar 28
4
[PATCH v3 0/3] virtio_balloon: don't push uninitialized buffers to stats virtqueue
This series fixes issues with variable initialization in the virtio balloon driver which manifest as the driver sending invalid memory stats to the host. v1->v2: * Call update_balloon_stats instead of filling the buffer with invalid tags. * Add BUG_ON to update_balloon_stats to formalize the invariant that all slots in the buffer must be initialized. v2->v3: * Remove BUG_ON and return the actual number of counters from update_balloon_stats instead. * Added Arnd's patch...
2017 Mar 28
4
[PATCH v3 0/3] virtio_balloon: don't push uninitialized buffers to stats virtqueue
This series fixes issues with variable initialization in the virtio balloon driver which manifest as the driver sending invalid memory stats to the host. v1->v2: * Call update_balloon_stats instead of filling the buffer with invalid tags. * Add BUG_ON to update_balloon_stats to formalize the invariant that all slots in the buffer must be initialized. v2->v3: * Remove BUG_ON and return the actual number of counters from update_balloon_stats instead. * Added Arnd's patch...
2017 Mar 28
0
[PATCH v3 2/3] virtio-balloon: use actual number of stats for stats queue buffers
The virtio balloon driver contained a not-so-obvious invariant that update_balloon_stats has to update exactly VIRTIO_BALLOON_S_NR counters in order to send valid stats to the host. This commit fixes it by having update_balloon_stats return the actual number of counters, and its callers use it when pushing buffers to the stats virtqueue. Note that it is still out of spec to change the...
2017 Mar 27
0
[PATCH] virtio_balloon: prevent uninitialized variable use
...Mar 24, 2017 at 7:38 PM, David Hildenbrand <david at redhat.com> wrote: >> >> On 23.03.2017 16:17, Arnd Bergmann wrote: >> >>> The latest gcc-7.0.1 snapshot reports a new warning: >> >>> >> >>> virtio/virtio_balloon.c: In function 'update_balloon_stats': >> >>> virtio/virtio_balloon.c:258:26: error: 'events[2]' is used uninitialized in this function [-Werror=uninitialized] >> >>> virtio/virtio_balloon.c:260:26: error: 'events[3]' is used uninitialized in this function [-Werror=uninitialized] >&...
2017 Mar 24
0
[PATCH] virtio_balloon: prevent uninitialized variable use
...t redhat.com> wrote: > On Fri, Mar 24, 2017 at 7:38 PM, David Hildenbrand <david at redhat.com> wrote: >> On 23.03.2017 16:17, Arnd Bergmann wrote: >>> The latest gcc-7.0.1 snapshot reports a new warning: >>> >>> virtio/virtio_balloon.c: In function 'update_balloon_stats': >>> virtio/virtio_balloon.c:258:26: error: 'events[2]' is used uninitialized in this function [-Werror=uninitialized] >>> virtio/virtio_balloon.c:260:26: error: 'events[3]' is used uninitialized in this function [-Werror=uninitialized] >>> virtio/vir...
2017 Mar 23
1
[PATCH v2] virtio_balloon: don't push uninitialized buffers to stats virtqueue
..., virtio_balloon.stats is either uninitialized or contains stale values. The host updates its state with garbage data because it has no way of knowing that this is just a marker buffer used for signaling. This patch updates the stats before pushing the initial buffer. An assertion is also added to update_balloon_stats to make sure that all stats fields are initialized. Alternative fixes: * Push an empty buffer in init_vqs. Not easily done with the current virtio implementation and violates the spec "Driver MUST supply the same subset of statistics in all buffers submitted to the statsq". * Push a...
2017 Mar 23
1
[PATCH v2] virtio_balloon: don't push uninitialized buffers to stats virtqueue
..., virtio_balloon.stats is either uninitialized or contains stale values. The host updates its state with garbage data because it has no way of knowing that this is just a marker buffer used for signaling. This patch updates the stats before pushing the initial buffer. An assertion is also added to update_balloon_stats to make sure that all stats fields are initialized. Alternative fixes: * Push an empty buffer in init_vqs. Not easily done with the current virtio implementation and violates the spec "Driver MUST supply the same subset of statistics in all buffers submitted to the statsq". * Push a...
2017 Mar 23
3
[PATCH] virtio_balloon: prevent uninitialized variable use
The latest gcc-7.0.1 snapshot reports a new warning: virtio/virtio_balloon.c: In function 'update_balloon_stats': virtio/virtio_balloon.c:258:26: error: 'events[2]' is used uninitialized in this function [-Werror=uninitialized] virtio/virtio_balloon.c:260:26: error: 'events[3]' is used uninitialized in this function [-Werror=uninitialized] virtio/virtio_balloon.c:261:56: error: 'event...
2017 Mar 23
3
[PATCH] virtio_balloon: prevent uninitialized variable use
The latest gcc-7.0.1 snapshot reports a new warning: virtio/virtio_balloon.c: In function 'update_balloon_stats': virtio/virtio_balloon.c:258:26: error: 'events[2]' is used uninitialized in this function [-Werror=uninitialized] virtio/virtio_balloon.c:260:26: error: 'events[3]' is used uninitialized in this function [-Werror=uninitialized] virtio/virtio_balloon.c:261:56: error: 'event...
2017 Oct 19
2
[PATCH v2 1/1] virtio_balloon: include buffers and cached memory statistics
...15 insertions(+), 1 deletion(-) > > diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c > index f0b3a0b9d42f..c2558ec47a62 100644 > --- a/drivers/virtio/virtio_balloon.c > +++ b/drivers/virtio/virtio_balloon.c > @@ -244,12 +244,19 @@ static unsigned int update_balloon_stats(struct virtio_balloon *vb) > struct sysinfo i; > unsigned int idx = 0; > long available; > + long cached; > > all_vm_events(events); > si_meminfo(&i); > > available = si_mem_available(); > > + cached = global_node_page_state(NR_FILE_PAGES) - &g...
2017 Oct 19
2
[PATCH v2 1/1] virtio_balloon: include buffers and cached memory statistics
...15 insertions(+), 1 deletion(-) > > diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c > index f0b3a0b9d42f..c2558ec47a62 100644 > --- a/drivers/virtio/virtio_balloon.c > +++ b/drivers/virtio/virtio_balloon.c > @@ -244,12 +244,19 @@ static unsigned int update_balloon_stats(struct virtio_balloon *vb) > struct sysinfo i; > unsigned int idx = 0; > long available; > + long cached; > > all_vm_events(events); > si_meminfo(&i); > > available = si_mem_available(); > > + cached = global_node_page_state(NR_FILE_PAGES) - &g...
2017 Nov 12
2
[PATCH v3] virtio_balloon: include disk/file caches memory statistics
...on.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index f0b3a0b9d42f..d2bd13bbaf9f 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -244,11 +244,13 @@ static unsigned int update_balloon_stats(struct virtio_balloon *vb) struct sysinfo i; unsigned int idx = 0; long available; + unsigned long caches; all_vm_events(events); si_meminfo(&i); available = si_mem_available(); + caches = global_node_page_state(NR_FILE_PAGES); #ifdef CONFIG_VM_EVENT_COUNTERS update_stat(vb...
2017 Nov 12
2
[PATCH v3] virtio_balloon: include disk/file caches memory statistics
...on.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index f0b3a0b9d42f..d2bd13bbaf9f 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -244,11 +244,13 @@ static unsigned int update_balloon_stats(struct virtio_balloon *vb) struct sysinfo i; unsigned int idx = 0; long available; + unsigned long caches; all_vm_events(events); si_meminfo(&i); available = si_mem_available(); + caches = global_node_page_state(NR_FILE_PAGES); #ifdef CONFIG_VM_EVENT_COUNTERS update_stat(vb...
2017 Oct 31
2
[PATCH v2 1/1] virtio_balloon: include buffers and cached memory statistics
...t; diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c > > > index f0b3a0b9d42f..c2558ec47a62 100644 > > > --- a/drivers/virtio/virtio_balloon.c > > > +++ b/drivers/virtio/virtio_balloon.c > > > @@ -244,12 +244,19 @@ static unsigned int update_balloon_stats(struct virtio_balloon *vb) > > > struct sysinfo i; > > > unsigned int idx = 0; > > > long available; > > > + long cached; > > > > > > all_vm_events(events); > > > si_meminfo(&i); > > > > > > availab...