Skip to content

Commit

Permalink
percpu: fix starting offset for chunk statistics traversal
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
  • Loading branch information
dennisszhou authored and htejun committed Sep 27, 2017
1 parent e88d62c commit 2e08d20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/percpu-stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2e08d20

Please sign in to comment.