Skip to content

Commit

Permalink
percpu: expose pcpu_nr_empty_pop_pages in pcpu_stats
Browse files Browse the repository at this point in the history
Percpu memory holds a minimum threshold of pages that are populated
in order to serve atomic percpu memory requests. This change makes it
easier to verify that there are a minimum number of populated pages
lying around.

Signed-off-by: Dennis Zhou <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
  • Loading branch information
dennisszhou authored and htejun committed Jul 17, 2017
1 parent 0245916 commit 6b9b6f3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions mm/percpu-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ extern spinlock_t pcpu_lock;

extern struct list_head *pcpu_slot;
extern int pcpu_nr_slots;
extern int pcpu_nr_empty_pop_pages;

extern struct pcpu_chunk *pcpu_first_chunk;
extern struct pcpu_chunk *pcpu_reserved_chunk;
Expand Down
1 change: 1 addition & 0 deletions mm/percpu-stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ static int percpu_stats_show(struct seq_file *m, void *v)
PU(nr_max_chunks);
PU(min_alloc_size);
PU(max_alloc_size);
P("empty_pop_pages", pcpu_nr_empty_pop_pages);
seq_putc(m, '\n');

#undef PU
Expand Down
2 changes: 1 addition & 1 deletion mm/percpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ static LIST_HEAD(pcpu_map_extend_chunks);
* The number of empty populated pages, protected by pcpu_lock. The
* reserved chunk doesn't contribute to the count.
*/
static int pcpu_nr_empty_pop_pages;
int pcpu_nr_empty_pop_pages;

/*
* Balance work is used to populate or destroy chunks asynchronously. We
Expand Down

0 comments on commit 6b9b6f3

Please sign in to comment.