From: Tejun Heo <tj@kernel.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Christoph Lameter <cl@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] percpu: Prevent endless loop if there is no unallocated region
Date: Mon, 10 Aug 2015 12:36:38 -0400 [thread overview]
Message-ID: <20150810163638.GC23408@mtj.duckdns.org> (raw)
In-Reply-To: <1439122659-31442-1-git-send-email-linux@roeck-us.net>
Hello,
On Sun, Aug 09, 2015 at 05:17:39AM -0700, Guenter Roeck wrote:
> Qemu tests with unicore32 show memory management code entering an endless
> loop in pcpu_alloc(). Bisect points to commit a93ace487a33 ("percpu: move
> region iterations out of pcpu_[de]populate_chunk()"). Code analysis
> identifies the following relevant changes.
>
> - rs = page_start;
> - pcpu_next_pop(chunk, &rs, &re, page_end);
> -
> - if (rs != page_start || re != page_end) {
> + pcpu_for_each_unpop_region(chunk, rs, re, page_start, page_end) {
>
> For unicore32, values were page_start==0, page_end==1, rs==0, re==1.
> This worked fine with the old code. With the new code, however, the loop
> is always entered. Debugging information added into the loop shows
> an endless repetition of
>
> in loop chunk c5c53100 populated 0xff rs 1 re 2 page start 0 page end 1
> in loop chunk c5c53100 populated 0xff rs 1 re 2 page start 0 page end 1
> in loop chunk c5c53100 populated 0xff rs 1 re 2 page start 0 page end 1
> in loop chunk c5c53100 populated 0xff rs 1 re 2 page start 0 page end 1
That's a bug in the find bit functions in unicore32. If @offset >=
@end, it should return @end, not @offset.
Thanks.
--
tejun
--
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:[~2015-08-10 16:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-09 12:17 Guenter Roeck
2015-08-10 16:36 ` Tejun Heo [this message]
2015-08-10 17:19 ` [RFC PATCH] percpu: Prevent endless loop if there is no unallocated region (unicore32 bug) Guenter Roeck
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=20150810163638.GC23408@mtj.duckdns.org \
--to=tj@kernel.org \
--cc=cl@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@roeck-us.net \
/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