Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1741035

[PATCH 1/2] percpu: fix starting offset for chunk statistics traversal

From Dennis Zhou <dennisszhou@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 1/2] percpu: fix starting offset for chunk statistics traversal
Date 2017-09-27 23:40 +0200
Message-ID <uusdH-8rg-19@gated-at.bofh.it> (permalink)
References <uusdH-8rg-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 mm/percpu-stats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/percpu-stats.c b/mm/percpu-stats.c
index 6142484..7a58460 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
-- 
1.8.3.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] percpu: fix block iterators and reserved chunk stats Dennis Zhou <dennisszhou@gmail.com> - 2017-09-27 23:40 +0200
  [PATCH 2/2] percpu: fix iteration to prevent skipping over block Dennis Zhou <dennisszhou@gmail.com> - 2017-09-27 23:40 +0200
    Re: [PATCH 2/2] percpu: fix iteration to prevent skipping over block Tejun Heo <tj@kernel.org> - 2017-09-28 00:00 +0200
      Re: [PATCH 2/2] percpu: fix iteration to prevent skipping over block Luis Henriques <lhenriques@suse.com> - 2017-09-28 10:40 +0200
    Re: [PATCH 2/2] percpu: fix iteration to prevent skipping over block Tejun Heo <tj@kernel.org> - 2017-09-28 16:50 +0200
  [PATCH 1/2] percpu: fix starting offset for chunk statistics traversal Dennis Zhou <dennisszhou@gmail.com> - 2017-09-27 23:40 +0200
    Re: [PATCH 1/2] percpu: fix starting offset for chunk statistics  traversal Tejun Heo <tj@kernel.org> - 2017-09-27 23:50 +0200

csiph-web