lkml.org 
[lkml]   [2008]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: bug in lmb_enforce_memory_limit()
From
Date
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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2008-08-16 02:49    [W:0.172 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site