summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorDennis Zhou <dennisszhou@gmail.com>2017-09-28 00:34:59 +0300
committerTejun Heo <tj@kernel.org>2017-09-28 00:45:57 +0300
commit2e08d20d777e997bf37806b22b471f98fbe6b693 (patch)
tree0bd30c9717769551b38ce344a9293ad70c9ca31e /mm
parente88d62cd4b2f0b1ae55e9008e79c2794b1fc914d (diff)
downloadlinux-2e08d20d777e997bf37806b22b471f98fbe6b693.tar.xz
percpu: fix starting offset for chunk statistics traversal
This patch fixes the starting offset used when scanning chunks to compute the chunk statistics. The value start_offset (and end_offset) are managed in bytes while the traversal occurs over bits. Thus for the reserved and dynamic chunk, it may incorrectly skip over the initial allocations. Signed-off-by: Dennis Zhou <dennisszhou@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/percpu-stats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/percpu-stats.c b/mm/percpu-stats.c
index 6142484e88f7..7a58460bfd27 100644
--- a/mm/percpu-stats.c
+++ b/mm/percpu-stats.c
@@ -73,7 +73,7 @@ static void chunk_map_stats(struct seq_file *m, struct pcpu_chunk *chunk,
last_alloc + 1 : 0;
as_len = 0;
- start = chunk->start_offset;
+ start = chunk->start_offset / PCPU_MIN_ALLOC_SIZE;
/*
* If a bit is set in the allocation map, the bound_map identifies