From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail137.messagelabs.com (mail137.messagelabs.com [216.82.249.19]) by kanga.kvack.org (Postfix) with SMTP id 4C79B6B0093 for ; Mon, 4 May 2009 07:44:22 -0400 (EDT) Received: by qw-out-1920.google.com with SMTP id 4so2927516qwk.44 for ; Mon, 04 May 2009 04:45:02 -0700 (PDT) Message-ID: <49FED524.9020602@gmail.com> Date: Mon, 04 May 2009 08:44:36 -0300 From: Marcos Roriz MIME-Version: 1.0 Subject: Memory Concepts [+Newbie] Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: kernelnewbies@nl.linux.org, linux-mm@kvack.org List-ID: 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: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail137.messagelabs.com (mail137.messagelabs.com [216.82.249.19]) by kanga.kvack.org (Postfix) with SMTP id CD76F6B0096 for ; Mon, 4 May 2009 08:26:55 -0400 (EDT) Message-Id: <82459C1E-87E6-497C-8D09-21FD5FA5709E@marksmachinations.com> From: Mark Brown In-Reply-To: <49FED524.9020602@gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: Memory Concepts [+Newbie] Date: Mon, 4 May 2009 08:28:43 -0400 References: <49FED524.9020602@gmail.com> Sender: owner-linux-mm@kvack.org To: Marcos Roriz Cc: kernelnewbies@nl.linux.org, linux-mm@kvack.org List-ID: 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: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail137.messagelabs.com (mail137.messagelabs.com [216.82.249.19]) by kanga.kvack.org (Postfix) with SMTP id 1CE8A6B003D for ; Tue, 5 May 2009 02:07:26 -0400 (EDT) Received: by yw-out-1718.google.com with SMTP id 5so2366821ywm.26 for ; Mon, 04 May 2009 23:07:32 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <82459C1E-87E6-497C-8D09-21FD5FA5709E@marksmachinations.com> References: <49FED524.9020602@gmail.com> <82459C1E-87E6-497C-8D09-21FD5FA5709E@marksmachinations.com> Date: Tue, 5 May 2009 14:07:31 +0800 Message-ID: <41d311580905042307t75ad393eo35e9b90aa15486b2@mail.gmail.com> Subject: Re: Memory Concepts [+Newbie] From: Pei Lin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: Mark Brown Cc: Marcos Roriz , kernelnewbies@nl.linux.org, linux-mm@kvack.org List-ID: 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 : > 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: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail143.messagelabs.com (mail143.messagelabs.com [216.82.254.35]) by kanga.kvack.org (Postfix) with SMTP id D9A5B6B004D for ; Tue, 5 May 2009 04:05:54 -0400 (EDT) Received: by rv-out-0708.google.com with SMTP id f25so2923801rvb.26 for ; Tue, 05 May 2009 01:05:59 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <49FED524.9020602@gmail.com> References: <49FED524.9020602@gmail.com> Date: Tue, 5 May 2009 15:05:58 +0700 Message-ID: Subject: Re: Memory Concepts [+Newbie] From: Mulyadi Santosa Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: Marcos Roriz Cc: kernelnewbies@nl.linux.org, linux-mm@kvack.org List-ID: Hi... On Mon, May 4, 2009 at 6:44 PM, Marcos Roriz 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: email@kvack.org