Displaying 20 results from an estimated 33 matches for "nr_file_pag".
Did you mean:
nr_file_pages
2020 Feb 06
6
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
...N_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);
unsigned long...
2020 Feb 06
6
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
...N_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);
unsigned long...
2020 Feb 10
2
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
On Saturday, February 8, 2020 8:33 PM, Tetsuo Handa wrote:
>
> Is this NUMA aware? Can "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-B" happen?
No, it's a global counter.
>Can some thread keep
> this shrinker defunctional by keep increasing NR_FILE_PAGES?
Yes....
2020 Feb 10
2
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
On Saturday, February 8, 2020 8:33 PM, Tetsuo Handa wrote:
>
> Is this NUMA aware? Can "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-B" happen?
No, it's a global counter.
>Can some thread keep
> this shrinker defunctional by keep increasing NR_FILE_PAGES?
Yes....
2020 Feb 10
0
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
Wang, Wei W wrote:
> On Saturday, February 8, 2020 8:33 PM, Tetsuo Handa wrote:
> >
> > Is this NUMA aware? Can "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-B" happen?
>
> No, it's a global counter.
>
> >Can some thread keep
> > this shrinker defunctional by ke...
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 th...
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 th...
2020 Feb 06
2
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
...e:
> 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 (1 << 0)...
2020 Feb 08
0
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
...aimed.
>
> @@ -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;
> +
Is this NUMA aware? Can "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-B" happen? Can some thread keep this shrinker
defunctional by keep...
2020 Feb 06
2
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
...e:
> 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 (1 << 0)...
2017 Oct 31
2
[PATCH v2 1/1] virtio_balloon: include buffers and cached memory statistics
...t 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,
> > > pa...
2017 Oct 31
2
[PATCH v2 1/1] virtio_balloon: include buffers and cached memory statistics
...t 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,
> > > pa...
2020 Sep 03
1
[PATCH v3] mm/thp: fix __split_huge_pmd_locked() for migration PMD
A migrating transparent huge page has to already be unmapped. Otherwise,
the page could be modified while it is being copied to a new page and
data could be lost. The function __split_huge_pmd() checks for a PMD
migration entry before calling __split_huge_pmd_locked() leading one to
think that __split_huge_pmd_locked() can handle splitting a migrating PMD.
However, the code always increments the
2020 Feb 06
0
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
..._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_b...
2020 Feb 06
0
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
..._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_b...
2020 Feb 06
0
[PATCH RFC] virtio_balloon: conservative balloon page shrinking
...rinker_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_...
2017 Oct 19
2
[PATCH v2 1/1] virtio_balloon: include buffers and cached memory statistics
...pdate_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 upd...
2017 Oct 19
2
[PATCH v2 1/1] virtio_balloon: include buffers and cached memory statistics
...pdate_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 upd...
2017 Oct 31
0
[PATCH v2 1/1] virtio_balloon: include buffers and cached memory statistics
...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
...on.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(available));
+ upd...