From: Dennis Zhou <dennisszhou@gmail.com>
To: Tejun Heo <tj@kernel.org>, Christoph Lameter <cl@linux.com>,
Luis Henriques <lhenriques@suse.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Dennis Zhou <dennisszhou@gmail.com>
Subject: [PATCH 1/2] percpu: fix starting offset for chunk statistics traversal
Date: Wed, 27 Sep 2017 16:34:59 -0500 [thread overview]
Message-ID: <1506548100-31247-2-git-send-email-dennisszhou@gmail.com> (raw)
In-Reply-To: <1506548100-31247-1-git-send-email-dennisszhou@gmail.com>
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
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-09-27 21:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-27 21:34 [PATCH 0/2] percpu: fix block iterators and reserved chunk stats Dennis Zhou
2017-09-27 21:34 ` Dennis Zhou [this message]
2017-09-27 21:46 ` [PATCH 1/2] percpu: fix starting offset for chunk statistics traversal Tejun Heo
2017-09-27 21:35 ` [PATCH 2/2] percpu: fix iteration to prevent skipping over block Dennis Zhou
2017-09-27 21:51 ` Tejun Heo
2017-09-28 8:31 ` Luis Henriques
2017-09-28 14:40 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1506548100-31247-2-git-send-email-dennisszhou@gmail.com \
--to=dennisszhou@gmail.com \
--cc=cl@linux.com \
--cc=lhenriques@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox