All of lore.kernel.org
 help / color / mirror / Atom feed
* Memory Concepts [+Newbie]
@ 2009-05-04 11:44 Marcos Roriz
  2009-05-04 12:28 ` Mark Brown
  2009-05-05  8:05 ` Mulyadi Santosa
  0 siblings, 2 replies; 4+ messages in thread
From: Marcos Roriz @ 2009-05-04 11:44 UTC (permalink / raw)
  To: kernelnewbies, linux-mm

I'm reading Mel Gorman Understating the Linux Virtual Memory Manager and 
also TANENBAUM Modern Operating System I don't get some basic concepts 
of the Memory Management in Linux Kernel.

The first question is, what is a memory bank, It's not clear if its a 
physical section of the memory of if its a chip (physical) itself.

The ZONE_NORMAL zone refer only to kernel direct memory mapped, that 
means only to kernel pages and kernel programs (such as daemons)?

Why is the ZONE_NORMAL so large (896 MB)? How to deal with low memory 
systems?

The ZONE_HIGHMEM zone refer to kernel not mapped directly, so that 
includes userspace programs right?

I googled and searched for all those answers but couldn't find a direct 
and consistent answer, thats why I'm asking for your guys help.

Thanks very much for you time,

Marcos Roriz

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

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

* Re: Memory Concepts [+Newbie]
  2009-05-04 11:44 Memory Concepts [+Newbie] Marcos Roriz
@ 2009-05-04 12:28 ` Mark Brown
  2009-05-05  6:07   ` Pei Lin
  2009-05-05  8:05 ` Mulyadi Santosa
  1 sibling, 1 reply; 4+ messages in thread
From: Mark Brown @ 2009-05-04 12:28 UTC (permalink / raw)
  To: Marcos Roriz; +Cc: kernelnewbies, linux-mm

Hi Marcos,

A memory bank for RAM is just an individual addressable array on a  
memory board. The addressing of the bank is managed by the memory  
controller.

Regards,
-- Mark

On May 4, 2009, at 7:44 AM, Marcos Roriz wrote:

> I'm reading Mel Gorman Understating the Linux Virtual Memory Manager  
> and also TANENBAUM Modern Operating System I don't get some basic  
> concepts of the Memory Management in Linux Kernel.
>
> The first question is, what is a memory bank, It's not clear if its  
> a physical section of the memory of if its a chip (physical) itself.
>
> The ZONE_NORMAL zone refer only to kernel direct memory mapped, that  
> means only to kernel pages and kernel programs (such as daemons)?
>
> Why is the ZONE_NORMAL so large (896 MB)? How to deal with low  
> memory systems?
>
> The ZONE_HIGHMEM zone refer to kernel not mapped directly, so that  
> includes userspace programs right?
>
> I googled and searched for all those answers but couldn't find a  
> direct and consistent answer, thats why I'm asking for your guys help.
>
> Thanks very much for you time,
>
> Marcos Roriz
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@nl.linux.org
> Please read the FAQ at http://kernelnewbies.org/FAQ
>

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

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

* Re: Memory Concepts [+Newbie]
  2009-05-04 12:28 ` Mark Brown
@ 2009-05-05  6:07   ` Pei Lin
  0 siblings, 0 replies; 4+ messages in thread
From: Pei Lin @ 2009-05-05  6:07 UTC (permalink / raw)
  To: Mark Brown; +Cc: Marcos Roriz, kernelnewbies, linux-mm

That book << Understating the Linux Virtual Memory Manager>> clearly
elaborate why ZONE_NORMAL is 896 on the section 4.1 Linear Address
Space.

SEE  the comment about ZONE_HIGHMEM,  include/linux/mmzone.h

#ifdef CONFIG_HIGHMEM
        /*
         * A memory area that is only addressable by the kernel through
         * mapping portions into its own address space. This is for example
         * used by i386 to allow the kernel to address the memory beyond
         * 900MB. The kernel will set up special mappings (page
         * table entries on i386) for each page that the kernel needs to
         * access.
         */
        ZONE_HIGHMEM,
#endif


2009/5/4 Mark Brown <markb@marksmachinations.com>:
> Hi Marcos,
>
> A memory bank for RAM is just an individual addressable array on a memory
> board. The addressing of the bank is managed by the memory controller.
>
> Regards,
> -- Mark
>
> On May 4, 2009, at 7:44 AM, Marcos Roriz wrote:
>
>> I'm reading Mel Gorman Understating the Linux Virtual Memory Manager and
>> also TANENBAUM Modern Operating System I don't get some basic concepts of
>> the Memory Management in Linux Kernel.
>>
>> The first question is, what is a memory bank, It's not clear if its a
>> physical section of the memory of if its a chip (physical) itself.
>>
>> The ZONE_NORMAL zone refer only to kernel direct memory mapped, that means
>> only to kernel pages and kernel programs (such as daemons)?
>>
>> Why is the ZONE_NORMAL so large (896 MB)? How to deal with low memory
>> systems?
>>
>> The ZONE_HIGHMEM zone refer to kernel not mapped directly, so that
>> includes userspace programs right?
>>
>> I googled and searched for all those answers but couldn't find a direct
>> and consistent answer, thats why I'm asking for your guys help.
>>
>> Thanks very much for you time,
>>
>> Marcos Roriz
>>
>> --
>> To unsubscribe from this list: send an email with
>> "unsubscribe kernelnewbies" to ecartis@nl.linux.org
>> Please read the FAQ at http://kernelnewbies.org/FAQ
>>
>
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@nl.linux.org
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>

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

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

* Re: Memory Concepts [+Newbie]
  2009-05-04 11:44 Memory Concepts [+Newbie] Marcos Roriz
  2009-05-04 12:28 ` Mark Brown
@ 2009-05-05  8:05 ` Mulyadi Santosa
  1 sibling, 0 replies; 4+ messages in thread
From: Mulyadi Santosa @ 2009-05-05  8:05 UTC (permalink / raw)
  To: Marcos Roriz; +Cc: kernelnewbies, linux-mm

Hi...

On Mon, May 4, 2009 at 6:44 PM, Marcos Roriz <marcosrorizinf@gmail.com> wrote:
> The ZONE_NORMAL zone refer only to kernel direct memory mapped, that means
> only to kernel pages and kernel programs (such as daemons)?

as the name implies, it means a memory area where kernel can directly
address it without a need to do temporary mapping.

For the user space programs, it has somewhat loose connection. When
kernel try to serve memory request from user space, it could get free
pages from either zone normal or highmem (depending on the priority).
Once these oages are "connected " to user space via PTE (page table
entry), they are directly accessible by user space program.


> Why is the ZONE_NORMAL so large (896 MB)? How to deal with low memory
> systems?

first of all, you need to understand the default virtual memory split
for x86 32 bit system, that is 3:1. Meaning, user mode has 3 GB, while
kernel has 1 GB. Inside this 1GB address space, not all address range
can be used. Some of them are used for temporary mapping, vmalloc
mapping and so on. Short story, you're left with 896 MB address space.

For low memory system, the address space is still 1 GB. But in
reality, only a little is used to map the RAM. So in hand we have
large address space, but it doesn't mean all those addresses are used.

> The ZONE_HIGHMEM zone refer to kernel not mapped directly, so that includes
> userspace programs right?

Kindly refer to my explanations above :) Again, user space program
doesn't really care about zone normal or highmem.

regards,

Mulyadi.

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

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

end of thread, other threads:[~2009-05-05  8:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-04 11:44 Memory Concepts [+Newbie] Marcos Roriz
2009-05-04 12:28 ` Mark Brown
2009-05-05  6:07   ` Pei Lin
2009-05-05  8:05 ` Mulyadi Santosa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.