All of lore.kernel.org
 help / color / mirror / Atom feed
* Questions about memory zone
@ 2009-05-05  8:05 ruby young
  2009-05-05  8:25 ` Jan Beulich
  0 siblings, 1 reply; 2+ messages in thread
From: ruby young @ 2009-05-05  8:05 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1034 bytes --]

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.
But Why does Xen Zone organize like this? And What does the Zone mean?

Best Wishes!


Ruby Young

-- 
Best wishes

杨漾
北京航空航天大学计算机学院体系结构研究所
电话:010-82338059-132
邮件:9907yruby@gmail.com
地址:北京市海淀区学院路37号北京航空航天大学新主楼 G座1026
--------------------------------------------------------------------------------
Yang Yang
Institute of Computer Architecture and System
BeiHang University(BUAA)
Tel: (86-10)82338059-132
Email: 9907yruby@gmail.com
Addr: Room 1026,Building G,The New Main Building,37# Xueyuan Rd.,Haidian
District, Beijing 100083, PRC

[-- Attachment #1.2: Type: text/html, Size: 2066 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

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

* Re: Questions about memory zone
  2009-05-05  8:05 Questions about memory zone ruby young
@ 2009-05-05  8:25 ` Jan Beulich
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Beulich @ 2009-05-05  8:25 UTC (permalink / raw)
  To: ruby young; +Cc: xen-devel

>>> ruby young <yangyang@les.buaa.edu.cn> 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

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-05  8:05 Questions about memory zone ruby young
2009-05-05  8:25 ` Jan Beulich

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.