From: Yinghai Lu <yinghai@kernel.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>,
linux-mm@kvack.org, Russell King <linux@arm.linux.org.uk>
Subject: Re: [RFC] memblock; Properly handle overlaps
Date: Sat, 05 Mar 2011 17:20:02 -0800 [thread overview]
Message-ID: <4D72E142.3000305@kernel.org> (raw)
In-Reply-To: <1299372594.8833.966.camel@pasglop>
On 03/05/2011 04:49 PM, Benjamin Herrenschmidt wrote:
> On Sat, 2011-03-05 at 15:20 -0800, Yinghai Lu wrote:
>>
>> maybe we can omit rgn->size == 0 checking here.
>> with that case, dummy array will go though to some extra checking.
>>
>> if (rgn->base <= base && rend >= end)
>> if (base < rgn->base && end >= rgn->base) {
>> if (base <= rend && end >= rend) {
>>
>> but we can spare more checking regarding
>> rgn->size == 0
>
> Well, the array can be collasped to dummy by the removal of the last
> block when doing a top overlap, then on the next loop around, we can
> potentially hit the if (base <= rend && end >= rend) test, and loop
> again no ?
>
> I'd rather keep the test in .. won't hurt.
ok.
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2011-03-06 2:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-05 4:05 [RFC] memblock; Properly handle overlaps Benjamin Herrenschmidt
2011-03-05 5:46 ` Yinghai Lu
2011-03-05 7:56 ` Benjamin Herrenschmidt
2011-03-05 19:14 ` Yinghai Lu
2011-03-05 21:37 ` Benjamin Herrenschmidt
2011-03-05 21:50 ` Benjamin Herrenschmidt
2011-03-05 22:08 ` Benjamin Herrenschmidt
2011-03-05 22:01 ` Yinghai Lu
2011-03-05 22:19 ` Benjamin Herrenschmidt
2011-03-05 23:20 ` Yinghai Lu
2011-03-06 0:49 ` Benjamin Herrenschmidt
2011-03-06 1:20 ` Yinghai Lu [this message]
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=4D72E142.3000305@kernel.org \
--to=yinghai@kernel.org \
--cc=benh@kernel.crashing.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@arm.linux.org.uk \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).