diff options
author | Dennis Zhou <dennis@kernel.org> | 2019-02-26 21:00:08 +0300 |
---|---|---|
committer | Dennis Zhou <dennis@kernel.org> | 2019-03-13 22:25:31 +0300 |
commit | 92c14cab43267411bc9160f23d55a7548d814483 (patch) | |
tree | 9aa31dff3801639a5ef792157d12109976bf12d5 /mm/percpu-stats.c | |
parent | 047924c96898266e9a37412434abd1db72600384 (diff) | |
download | linux-92c14cab43267411bc9160f23d55a7548d814483.tar.xz |
percpu: convert chunk hints to be based on pcpu_block_md
As mentioned in the last patch, a chunk's hints are no different than a
block just responsible for more bits. This converts chunk level hints to
use a pcpu_block_md to maintain them. This lets us reuse the same hint
helper functions as a block. The left_free and right_free are unused by
the chunk's pcpu_block_md.
Signed-off-by: Dennis Zhou <dennis@kernel.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'mm/percpu-stats.c')
-rw-r--r-- | mm/percpu-stats.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/percpu-stats.c b/mm/percpu-stats.c index b5fdd43b60c9..ef5034a0464e 100644 --- a/mm/percpu-stats.c +++ b/mm/percpu-stats.c @@ -53,6 +53,7 @@ static int find_max_nr_alloc(void) static void chunk_map_stats(struct seq_file *m, struct pcpu_chunk *chunk, int *buffer) { + struct pcpu_block_md *chunk_md = &chunk->chunk_md; int i, last_alloc, as_len, start, end; int *alloc_sizes, *p; /* statistics */ @@ -121,9 +122,9 @@ static void chunk_map_stats(struct seq_file *m, struct pcpu_chunk *chunk, P("nr_alloc", chunk->nr_alloc); P("max_alloc_size", chunk->max_alloc_size); P("empty_pop_pages", chunk->nr_empty_pop_pages); - P("first_bit", chunk->first_bit); + P("first_bit", chunk_md->first_free); P("free_bytes", chunk->free_bytes); - P("contig_bytes", chunk->contig_bits * PCPU_MIN_ALLOC_SIZE); + P("contig_bytes", chunk_md->contig_hint * PCPU_MIN_ALLOC_SIZE); P("sum_frag", sum_frag); P("max_frag", max_frag); P("cur_min_alloc", cur_min_alloc); |