From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaustubh Kabra Subject: Bus error while allocating hugepages in domain 0 Date: Fri, 28 Jan 2011 02:07:52 +0530 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2118429860==" 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 List-Id: xen-devel@lists.xenproject.org --===============2118429860== Content-Type: multipart/alternative; boundary=0016362836de79c39e049ad9ec56 --0016362836de79c39e049ad9ec56 Content-Type: text/plain; charset=ISO-8859-1 Hi, My dom 0 is jeremy kernel 2.6.32.27 with 3.5 GB allocated memory. I tried allocating 700 huge pages in domain 0 using- ]echo 700 > /proc/sys/vm/nr_hugepages To verify - ]cat /proc/meminfo |grep Huge HugePages_Total: 700 HugePages_Free: 0 HugePages_Rsvd: 18446744073709551019 HugePages_Surp: 0 Hugepagesize: 2048 kB This memory information is not as per expectation. Can anyone explain whether it has really allocated huge pages as calling mmap with MAP_HUGETLB using ]addr = mmap((void *)0x0UL,600UL*1024*1024 , PROT_WRITE,MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB , 0, 0); also results into a bus error. ]dmesg- Process 4617(a.out) has RLIMIT_CORE set to 0 Aborting core ]strace- --- SIGBUS (Bus error) @ 0 (0) --- +++ killed by SIGBUS +++ Bus error -- Kaustubh Kabra* * --0016362836de79c39e049ad9ec56 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

My dom 0 is jeremy kernel 2.6.32.27 with 3.5 GB allocated memory= . I tried allocating 700 huge pages in domain 0 using-
]echo 700 > /p= roc/sys/vm/nr_hugepages

To verify -
]cat /proc/meminfo |grep Huge=
HugePages_Total:=A0=A0=A0=A0 700
HugePages_Free:=A0=A0=A0=A0=A0=A0=A0 0<= br>HugePages_Rsvd:=A0=A0=A0 18446744073709551019
HugePages_Surp:=A0=A0= =A0=A0=A0=A0=A0 0
Hugepagesize:=A0=A0=A0=A0=A0=A0 2048 kB

This me= mory information is not as per expectation.
Can anyone explain whether i= t has really allocated huge pages as calling mmap with MAP_HUGETLB using
]addr =3D mmap((void *)0x0UL,600UL*1024*1024 , PROT_WRITE,MAP_PRIVATE |= MAP_ANONYMOUS | MAP_HUGETLB , 0, 0);

also results into a bus error.=

]dmesg-
Process 4617(a.out) has RLIMIT_CORE set to 0
Aborting= core

]strace-
--- SIGBUS (Bus error) @ 0 (0) ---
+++ killed by SIGBUS = +++
Bus error

--
Kaustubh Kabra

--0016362836de79c39e049ad9ec56-- --===============2118429860== 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 --===============2118429860==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: Bus error while allocating hugepages in domain 0 Date: Wed, 2 Feb 2011 15:05:02 -0500 Message-ID: <20110202200502.GA19684@dumpdata.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Kaustubh Kabra , dcm@mccr.org Cc: Xen-devel List-Id: xen-devel@lists.xenproject.org On Fri, Jan 28, 2011 at 02:07:52AM +0530, Kaustubh Kabra wrote: > Hi, > > My dom 0 is jeremy kernel 2.6.32.27 with 3.5 GB allocated memory. I tried > allocating 700 huge pages in domain 0 using- > ]echo 700 > /proc/sys/vm/nr_hugepages > > To verify - > ]cat /proc/meminfo |grep Huge > HugePages_Total: 700 > HugePages_Free: 0 > HugePages_Rsvd: 18446744073709551019 > HugePages_Surp: 0 > Hugepagesize: 2048 kB > > This memory information is not as per expectation. > Can anyone explain whether it has really allocated huge pages as calling > mmap with MAP_HUGETLB using I think that is right. You did try this on baremetal and it worked right? It looks as if we just haven't implemented this correctly, but I thought Dave had it fixed at some point? Ah wait.. http://lists.xensource.com/archives/html/xen-devel/2010-04/msg00971.html it even is mentioned in http://wiki.xensource.com/xenwiki/XenUpdate20100423 > > ]addr = mmap((void *)0x0UL,600UL*1024*1024 , PROT_WRITE,MAP_PRIVATE | > MAP_ANONYMOUS | MAP_HUGETLB , 0, 0); > > also results into a bus error. > > ]dmesg- > Process 4617(a.out) has RLIMIT_CORE set to 0 > Aborting core > > ]strace- > --- SIGBUS (Bus error) @ 0 (0) --- > +++ killed by SIGBUS +++ > Bus error > > -- > Kaustubh Kabra* * > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel