From: ruby young <9907yruby@gmail.com> Subject: difference between DMA heap and dom heap Date: Sat, 8 Aug 2009 17:02:21 +0800 Message-ID: <4046dbfd0908080202u597c2486wb6d97ff4d163031d@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1775912077==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============1775912077== Content-Type: multipart/alternative; boundary=0016e6475c726b1f8004709d9c04 --0016e6475c726b1f8004709d9c04 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi=EF=BC=8Call~ I have a question on machine memory. There is pagealloc_keyhandler function in page_alloc.c file. It has below lines: while ( ++zone < NR_ZONES ) { if ( (zone + PAGE_SHIFT) =3D=3D dma_bitsize ) { printk(" DMA heap: %lukB free\n", total << (PAGE_SHIFT-10)); total =3D 0; } if ( (n =3D avail_heap_pages(zone, zone, -1)) !=3D 0 ) { total +=3D n; printk(" heap[%02u]: %lukB free\n", zone, n << (PAGE_SHIFT-10)); } } printk(" Dom heap: %lukB free\n", total << (PAGE_SHIFT-10)); we can see the free space of DMA heap is the sum of free pages from zone[1] to zone [20], and the dom heap is always 0. How about DMA heap and Dom heap mean? Why should divide the heap into DMA heap and Dom heap? Thanks Ruby Young --=20 Best wishes =E6=9D=A8=E6=BC=BE =E5=8C=97=E4=BA=AC=E8=88=AA=E7=A9=BA=E8=88=AA=E5=A4=A9=E5=A4=A7=E5=AD=A6=E8= =AE=A1=E7=AE=97=E6=9C=BA=E5=AD=A6=E9=99=A2=E4=BD=93=E7=B3=BB=E7=BB=93=E6=9E= =84=E7=A0=94=E7=A9=B6=E6=89=80 =E7=94=B5=E8=AF=9D:010-82338059-132 =E9=82=AE=E4=BB=B6:9907yruby@gmail.com =E5=9C=B0=E5=9D=80=EF=BC=9A=E5=8C=97=E4=BA=AC=E5=B8=82=E6=B5=B7=E6=B7=80=E5= =8C=BA=E5=AD=A6=E9=99=A2=E8=B7=AF37=E5=8F=B7=E5=8C=97=E4=BA=AC=E8=88=AA=E7= =A9=BA=E8=88=AA=E5=A4=A9=E5=A4=A7=E5=AD=A6=E6=96=B0=E4=B8=BB=E6=A5=BC G=E5= =BA=A71026 ---------------------------------------------------------------------------= ----- Yang Yang Institute of Computer Architecture and System BeiHang University=EF=BC=88BUAA=EF=BC=89 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 --0016e6475c726b1f8004709d9c04 Content-Type: text/html; charset=GB2312 Content-Transfer-Encoding: quoted-printable
Hi=A3=ACall~
I have a question on machine memory. There is pagealloc_keyhandler fun= ction in page_alloc.c file. It has below lines:
 
    while ( ++zone < NR_ZONES )
   = ; {
        if ( (zone + PAGE_SHIFT) = =3D=3D dma_bitsize )
        {
&nb= sp;           printk(&quo= t;    DMA heap: %l= ukB free\n", total << (PAGE_SHIFT-10));
            total =3D 0;
  = ;      }
        if ( (n =3D avail_heap_page= s(zone, zone, -1)) !=3D 0 )
        {=
            tota= l +=3D n;
          &n= bsp; printk("    heap[%02u]: %lukB free\n", zone, = n << (PAGE_SHIFT-10));
        = }
    }
    printk(&q= uot;    Dom heap: %lukB free\n", total << (PAGE_S= HIFT-10));

 
we can see the free space of DMA heap is the sum of free pages fr= om zone[1] to zone [20], and the dom heap is always 0.
How about DMA heap and Dom heap mean? Why should divide the heap into = DMA heap and Dom heap?
 
Thanks
 
           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Ruby Young
 

--
Best wishes

=D1=EE=D1=FA
=B1=B1=BE=A9=BA=BD=BF=D5= =BA=BD=CC=EC=B4=F3=D1=A7=BC=C6=CB=E3=BB=FA=D1=A7=D4=BA=CC=E5=CF=B5=BD=E1=B9= =B9=D1=D0=BE=BF=CB=F9
=B5=E7=BB=B0:010-82338059-132
=D3=CA=BC=FE:9907yruby@gmail.com
=B5=D8=D6=B7= =A3=BA=B1=B1=BE=A9=CA=D0=BA=A3=B5=ED=C7=F8=D1=A7=D4=BA=C2=B737=BA=C5=B1=B1= =BE=A9=BA=BD=BF=D5=BA=BD=CC=EC=B4=F3=D1=A7=D0=C2=D6=F7=C2=A5 G=D7=F91026--------------------------------------------------------------------------= ------
Yang Yang
Institute of Computer Architecture and System
BeiHang Univ= ersity=A3=A8BUAA=A3=A9
Tel: (86-10)82338059-132
Email: 9907yruby@gmail.com
Addr: Room 1026,Buildin= g G,The New Main Building,37# Xueyuan Rd.,Haidian District, Beijing 100083,= PRC
--0016e6475c726b1f8004709d9c04-- --===============1775912077== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1775912077==--