linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: reg adjust_total_lowmem
       [not found] <4dd2a2ce0710252051pe83a943q48f52d148f5a9603@mail.gmail.com>
@ 2007-10-26 15:04 ` Kumar Gala
  2007-10-26 19:40   ` Scott Wood
  0 siblings, 1 reply; 5+ messages in thread
From: Kumar Gala @ 2007-10-26 15:04 UTC (permalink / raw)
  To: Surya Ravikiran; +Cc: linuxppc-dev list


On Oct 25, 2007, at 10:51 PM, Surya Ravikiran wrote:

> Hi,
>
> I am trying to bootup a Linux kernel, on a FS eval board with 256M.
> I pass the kernel argument mem=252M, and see that the kernel boots up
> fine, but with much less memory, ~192M (the closes 64M multiple), and
> I browsed through the code to see that the adjust_total_lowmem
> function does not add up the residual memory to the total memory.
> I am trying to understand why I cannot do this reserving of higher end
> of the RAM during boot up,
> I would appreciate your comments.

The reason you have 192M is that lowmem is the total amount of memory  
that can be covered by up to three CAM entries.  In the case of  
setting mem=252M that max that three CAM entries can cover is 192M (64 
+64+64).  You should be able to access the other 60M via HIGHMEM.

- k

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: reg adjust_total_lowmem
  2007-10-26 15:04 ` reg adjust_total_lowmem Kumar Gala
@ 2007-10-26 19:40   ` Scott Wood
  2007-10-26 20:50     ` Scott Wood
  0 siblings, 1 reply; 5+ messages in thread
From: Scott Wood @ 2007-10-26 19:40 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev list, Surya Ravikiran

On Fri, Oct 26, 2007 at 10:04:19AM -0500, Kumar Gala wrote:
> 
> On Oct 25, 2007, at 10:51 PM, Surya Ravikiran wrote:
> 
> > Hi,
> >
> > I am trying to bootup a Linux kernel, on a FS eval board with 256M.
> > I pass the kernel argument mem=252M, and see that the kernel boots up
> > fine, but with much less memory, ~192M (the closes 64M multiple), and
> > I browsed through the code to see that the adjust_total_lowmem
> > function does not add up the residual memory to the total memory.
> > I am trying to understand why I cannot do this reserving of higher end
> > of the RAM during boot up,
> > I would appreciate your comments.
> 
> The reason you have 192M is that lowmem is the total amount of memory  
> that can be covered by up to three CAM entries.  In the case of  
> setting mem=252M that max that three CAM entries can cover is 192M (64 
> +64+64).  You should be able to access the other 60M via HIGHMEM.

Why doesn't it just use a 256M mapping, and not access the last 4M?

-Scott

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: reg adjust_total_lowmem
  2007-10-26 19:40   ` Scott Wood
@ 2007-10-26 20:50     ` Scott Wood
  2007-10-26 21:17       ` Kumar Gala
  0 siblings, 1 reply; 5+ messages in thread
From: Scott Wood @ 2007-10-26 20:50 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev list, Surya Ravikiran

Scott Wood wrote:
> On Fri, Oct 26, 2007 at 10:04:19AM -0500, Kumar Gala wrote:
>> The reason you have 192M is that lowmem is the total amount of memory  
>> that can be covered by up to three CAM entries.  In the case of  
>> setting mem=252M that max that three CAM entries can cover is 192M (64 
>> +64+64).  You should be able to access the other 60M via HIGHMEM.
> 
> Why doesn't it just use a 256M mapping, and not access the last 4M?

Not to mention, why highmem and not just normal TLB0 mappings for the 
extra pages?

-Scott

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: reg adjust_total_lowmem
  2007-10-26 20:50     ` Scott Wood
@ 2007-10-26 21:17       ` Kumar Gala
  2007-10-26 21:27         ` Scott Wood
  0 siblings, 1 reply; 5+ messages in thread
From: Kumar Gala @ 2007-10-26 21:17 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev list, Surya Ravikiran

On Fri, 26 Oct 2007, Scott Wood wrote:

> Scott Wood wrote:
> > On Fri, Oct 26, 2007 at 10:04:19AM -0500, Kumar Gala wrote:
> > > The reason you have 192M is that lowmem is the total amount of memory
> > > that can be covered by up to three CAM entries.  In the case of  setting
> > > mem=252M that max that three CAM entries can cover is 192M (64 +64+64).
> > > You should be able to access the other 60M via HIGHMEM.
> >
> > Why doesn't it just use a 256M mapping, and not access the last 4M?

This has some possibility, not sure what the threshold should be.  Do we
just always map 768M of lowmem regardless of how much memory we have?

> Not to mention, why highmem and not just normal TLB0 mappings for the extra
> pages?

Because we do not handle recursive misses in the TLB handlers.  We expect
any load/store that occurs in the TLB handlers to not have a TLB fault
associated with (and thus all of lowmem must be pinned).

- k

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: reg adjust_total_lowmem
  2007-10-26 21:17       ` Kumar Gala
@ 2007-10-26 21:27         ` Scott Wood
  0 siblings, 0 replies; 5+ messages in thread
From: Scott Wood @ 2007-10-26 21:27 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev list, Surya Ravikiran

Kumar Gala wrote:
> On Fri, 26 Oct 2007, Scott Wood wrote:
> 
>> Scott Wood wrote:
>>> On Fri, Oct 26, 2007 at 10:04:19AM -0500, Kumar Gala wrote:
>>>> The reason you have 192M is that lowmem is the total amount of memory
>>>> that can be covered by up to three CAM entries.  In the case of  setting
>>>> mem=252M that max that three CAM entries can cover is 192M (64 +64+64).
>>>> You should be able to access the other 60M via HIGHMEM.
>>> Why doesn't it just use a 256M mapping, and not access the last 4M?
> 
> This has some possibility, not sure what the threshold should be.  Do we
> just always map 768M of lowmem regardless of how much memory we have?

That's probably the simplest way.  We'll need to fix VMALLOC_START as well.

>> Not to mention, why highmem and not just normal TLB0 mappings for the extra
>> pages?
> 
> Because we do not handle recursive misses in the TLB handlers.  We expect
> any load/store that occurs in the TLB handlers to not have a TLB fault
> associated with (and thus all of lowmem must be pinned).

OK.  I guess that means no page debugging... :-P

-Scott

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-10-26 21:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4dd2a2ce0710252051pe83a943q48f52d148f5a9603@mail.gmail.com>
2007-10-26 15:04 ` reg adjust_total_lowmem Kumar Gala
2007-10-26 19:40   ` Scott Wood
2007-10-26 20:50     ` Scott Wood
2007-10-26 21:17       ` Kumar Gala
2007-10-26 21:27         ` Scott Wood

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).