From: Michael Ellerman <michael@ellerman.id.au>
To: David Miller <davem@davemloft.net>
Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: bug in lmb_enforce_memory_limit()
Date: Sat, 16 Aug 2008 10:46:22 +1000 [thread overview]
Message-ID: <1218847582.7576.6.camel@localhost> (raw)
In-Reply-To: <20080815.152501.193746275.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 1522 bytes --]
On Fri, 2008-08-15 at 15:25 -0700, David Miller wrote:
> From: Michael Ellerman <michael@ellerman.id.au>
> Date: Thu, 14 Aug 2008 21:26:53 +1000
>
> > Perhaps after the first loop we should set memory_limit to equal
> > lmb_end_of_DRAM(), then the second loop should work as it is.
>
> Sounds great. Mind if I push the following to Linus?
Looks good to me.
I'll test it on Monday. I don't know if I have a system with memory
holes to test on, but I take it you do?
I notice some of our 32-bit code is using lmb_enforce_memory_limit() to
enforce an address limit, which is technically broken, but is probably
fine because it doesn't need to worry about holes.
> lmb: Fix reserved region handling in lmb_enforce_memory_limit().
>
> The idea of the implementation of this fix is from Michael Ellerman.
>
> This function has two loops, but they each interpret the memory_limit
> value differently. The first loop interprets it as a "size limit"
> whereas the second loop interprets it as an "address limit".
>
> Before the second loop runs, reset memory_limit to lmb_end_of_DRAM()
> so that it all works out.
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Michael Ellerman <michael@ellerman.id.au>
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2008-08-16 0:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-14 8:20 bug in lmb_enforce_memory_limit() David Miller
2008-08-14 11:26 ` Michael Ellerman
2008-08-15 22:25 ` David Miller
2008-08-16 0:46 ` Michael Ellerman [this message]
2008-08-16 2:57 ` David Miller
2008-08-18 2:00 ` Michael Ellerman
2008-08-18 2:03 ` David Miller
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=1218847582.7576.6.camel@localhost \
--to=michael@ellerman.id.au \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).