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 0/2] percpu: fix block iterators and reserved chunk stats
Date: Wed, 27 Sep 2017 16:34:58 -0500 [thread overview]
Message-ID: <1506548100-31247-1-git-send-email-dennisszhou@gmail.com> (raw)
Hi everyone,
This patchset includes two bug fixes related to bitmap percpu memory
allocator.
The first is a problem with how the start offset is managed in bytes, but
the bitmaps are traversed in bits. The start offset is maintained to keep
alignment true within the actual allocation area in the chunk. With the
reserved and dynamic chunk, this may unintentionally skip over a portion
proportional to the start offset and PCPU_MIN_ALLOC_SIZE.
The second is an issue reported by Luis in [1]. The allocator was unable
to allocate from the reserved chunk due to the block offset not being
reset within the iterator. This caused subsequently checked blocks to
check against a potentially higher block offset. This may lead the
iterator to believe it had checked this area in the prior iteration. The
fix is to simply reset the block offset to 0 after it is used allowing
the predicate to always evaluate to true for subsequent blocks.
[1] https://lkml.org/lkml/2017/9/26/506
This patchset contains the following 2 patches:
0001-percpu-fix-starting-offset-for-chunk-statistics-trav.patch
0002-percpu-fix-iteration-to-prevent-skipping-over-block.patch
0001 fixes the chunk start offset issue. 0002 fixes the iteration bug.
This patchset is on top of linus#v4.14-rc2 e19b205be4.
diffstats below:
Dennis Zhou (2):
percpu: fix starting offset for chunk statistics traversal
percpu: fix iteration to prevent skipping over block
mm/percpu-stats.c | 2 +-
mm/percpu.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
Thanks,
Dennis
--
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 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 Dennis Zhou [this message]
2017-09-27 21:34 ` [PATCH 1/2] percpu: fix starting offset for chunk statistics traversal Dennis Zhou
2017-09-27 21:46 ` 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-1-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