search for: global_node_page_st

Displaying 20 results from an estimated 23 matches for "global_node_page_st".

2020 Feb 06
6
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
...on_vq { VIRTIO_BALLOON_VQ_INFLATE, VIRTIO_BALLOON_VQ_DEFLATE, @@ -796,6 +800,10 @@ static unsigned long shrink_balloon_pages(struct virtio_balloon *vb, { unsigned long pages_freed = 0; + /* Balloon pages only gets shrunk when the pagecache depleted */ + if (conservative_shrinker && global_node_page_state(NR_FILE_PAGES)) + return 0; + /* * One invocation of leak_balloon can deflate at most * VIRTIO_BALLOON_ARRAY_PFNS_MAX balloon pages, so we call it @@ -837,7 +845,11 @@ static unsigned long virtio_balloon_shrinker_count(struct shrinker *shrinker, struct virtio_balloon, shrinker);...
2020 Feb 06
6
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
...on_vq { VIRTIO_BALLOON_VQ_INFLATE, VIRTIO_BALLOON_VQ_DEFLATE, @@ -796,6 +800,10 @@ static unsigned long shrink_balloon_pages(struct virtio_balloon *vb, { unsigned long pages_freed = 0; + /* Balloon pages only gets shrunk when the pagecache depleted */ + if (conservative_shrinker && global_node_page_state(NR_FILE_PAGES)) + return 0; + /* * One invocation of leak_balloon can deflate at most * VIRTIO_BALLOON_ARRAY_PFNS_MAX balloon pages, so we call it @@ -837,7 +845,11 @@ static unsigned long virtio_balloon_shrinker_count(struct shrinker *shrinker, struct virtio_balloon, shrinker);...
2020 Feb 06
2
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
...Michael S. Tsirkin wrote: > virtio_balloon_shrinker_count(struct shrinker *shrinker, > > struct virtio_balloon, shrinker); > > unsigned long count; > > > > - count = vb->num_pages / VIRTIO_BALLOON_PAGES_PER_PAGE; > > + if (conservative_shrinker && global_node_page_state(NR_FILE_PAGES)) > > I'd rather have an API for that in mm/. In particular, do we want other > shrinkers to run, not just pagecache? To pick an example I'm familiar > with, kvm mmu cache for nested virt? We could make it extendable: #define BALLOON_SHRINKER_AFTER_PAGE_CACHE...
2020 Feb 06
2
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
...Michael S. Tsirkin wrote: > virtio_balloon_shrinker_count(struct shrinker *shrinker, > > struct virtio_balloon, shrinker); > > unsigned long count; > > > > - count = vb->num_pages / VIRTIO_BALLOON_PAGES_PER_PAGE; > > + if (conservative_shrinker && global_node_page_state(NR_FILE_PAGES)) > > I'd rather have an API for that in mm/. In particular, do we want other > shrinkers to run, not just pagecache? To pick an example I'm familiar > with, kvm mmu cache for nested virt? We could make it extendable: #define BALLOON_SHRINKER_AFTER_PAGE_CACHE...
2017 Oct 31
2
[PATCH v2 1/1] virtio_balloon: include buffers and cached memory statistics
...> > 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) - > > > + total_swapcache_pages() - i.bufferram; > > > + if (cached < 0) > > > + cached = 0; > > > + > > > + > > > #ifdef CONFIG_VM_EVENT_COUNTERS > > > update_stat(vb, idx++, VIRTIO_BALLOON_S_SWAP_IN, > &g...
2017 Oct 31
2
[PATCH v2 1/1] virtio_balloon: include buffers and cached memory statistics
...> > 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) - > > > + total_swapcache_pages() - i.bufferram; > > > + if (cached < 0) > > > + cached = 0; > > > + > > > + > > > #ifdef CONFIG_VM_EVENT_COUNTERS > > > update_stat(vb, idx++, VIRTIO_BALLOON_S_SWAP_IN, > &g...
2020 Feb 10
2
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
On Monday, February 10, 2020 11:57 AM, Tetsuo Handa wrote: > Then, "node-A's NR_FILE_PAGES is already 0 and node-B's NR_FILE_PAGES is > not 0, but allocation request which triggered this shrinker wants to allocate > from only node-A" > would be confused by this change, for the pagecache pages for allocating > thread's interested node are already depleted but
2020 Feb 10
2
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
On Monday, February 10, 2020 11:57 AM, Tetsuo Handa wrote: > Then, "node-A's NR_FILE_PAGES is already 0 and node-B's NR_FILE_PAGES is > not 0, but allocation request which triggered this shrinker wants to allocate > from only node-A" > would be confused by this change, for the pagecache pages for allocating > thread's interested node are already depleted but
2020 Feb 06
0
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
..., > VIRTIO_BALLOON_VQ_DEFLATE, > @@ -796,6 +800,10 @@ static unsigned long shrink_balloon_pages(struct virtio_balloon *vb, > { > unsigned long pages_freed = 0; > > + /* Balloon pages only gets shrunk when the pagecache depleted */ > + if (conservative_shrinker && global_node_page_state(NR_FILE_PAGES)) > + return 0; > + > /* > * One invocation of leak_balloon can deflate at most > * VIRTIO_BALLOON_ARRAY_PFNS_MAX balloon pages, so we call it > @@ -837,7 +845,11 @@ static unsigned long virtio_balloon_shrinker_count(struct shrinker *shrinker, >...
2020 Feb 06
0
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
..., > VIRTIO_BALLOON_VQ_DEFLATE, > @@ -796,6 +800,10 @@ static unsigned long shrink_balloon_pages(struct virtio_balloon *vb, > { > unsigned long pages_freed = 0; > > + /* Balloon pages only gets shrunk when the pagecache depleted */ > + if (conservative_shrinker && global_node_page_state(NR_FILE_PAGES)) > + return 0; > + > /* > * One invocation of leak_balloon can deflate at most > * VIRTIO_BALLOON_ARRAY_PFNS_MAX balloon pages, so we call it > @@ -837,7 +845,11 @@ static unsigned long virtio_balloon_shrinker_count(struct shrinker *shrinker, >...
2020 Feb 06
0
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
...> virtio_balloon_shrinker_count(struct shrinker *shrinker, > > > struct virtio_balloon, shrinker); > > > unsigned long count; > > > > > > - count = vb->num_pages / VIRTIO_BALLOON_PAGES_PER_PAGE; > > > + if (conservative_shrinker && global_node_page_state(NR_FILE_PAGES)) > > > > I'd rather have an API for that in mm/. In particular, do we want other > > shrinkers to run, not just pagecache? To pick an example I'm familiar > > with, kvm mmu cache for nested virt? > > We could make it extendable: > > #...
2017 Oct 19
2
[PATCH v2 1/1] virtio_balloon: include buffers and cached memory statistics
...@ 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) - > + total_swapcache_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 u...
2017 Oct 19
2
[PATCH v2 1/1] virtio_balloon: include buffers and cached memory statistics
...@ 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) - > + total_swapcache_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 u...
2017 Oct 31
0
[PATCH v2 1/1] virtio_balloon: include buffers and cached memory statistics
...gt; That would be best answered by somebody from kernel. But my personal > > opinion is that it would not be out of date. The amount of memory > > dedicated to Buffers does not seem to fluctuate too much. > > > > Tomas > > I would be inclined to say, just report global_node_page_state(NR_FILE_PAGES). Maybe subtract buffer ram. It's not clear host cares about the distinction, it's all memory that can shrink in response to memory pressure such as inflating the balloon. This statistic is portable as well I think, most guests have storage cache. > > > > --...
2017 Nov 12
2
[PATCH v3] virtio_balloon: include disk/file caches memory statistics
...ers/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, 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(ava...
2017 Nov 12
2
[PATCH v3] virtio_balloon: include disk/file caches memory statistics
...ers/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, 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(ava...
2017 Sep 20
2
[PATCH] virtio_balloon: include buffers and chached memory statistics
...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) - + total_swapcache_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 virti...
2017 Sep 20
2
[PATCH] virtio_balloon: include buffers and chached memory statistics
...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) - + total_swapcache_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 virti...
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