From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: Questions about memory zone Date: Tue, 05 May 2009 09:25:32 +0100 Message-ID: <4A00141C.76EA.0078.0@novell.com> References: <4046dbfd0905050105l1054343ch6bac7b30eb0dde2c@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4046dbfd0905050105l1054343ch6bac7b30eb0dde2c@mail.gmail.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: ruby young Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> ruby young 05.05.09 10:05 >>> >Hi, all~ >I'm interested in memory of xen. And I wondered what does the real mean = of >xen 'zone'. It seems different from linux 'zone'. >In the source code of xen-3.3.0/xen/common/page_alloc.c, there is = defined: >#define pfn_dom_zone_type(_pfn) (fls(_pfn)-1) > >and NR_ZONES is defined: >#define NR_ZONES (PADDR_BITS - PAGE_SHIFT) > >It seems Zone in xen set up as physic address and are separate by the = last >pfn bit set. Correct. >But Why does Xen Zone organize like this? And What does the Zone mean? In order to be able to allocate memory based on address width restrictions,= without adding overhead on sorting memory as it gets (or after it got) = freed. Jan