|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] Hugepage support
I am using DOM0 as 2.6.32.27 jermey kernel. Fedora x86_64 (2.6.33.3-85.fc13.x86_64) as PV guest.
In DOM0 kernel when I requested hugepage, kernel didnt crashed but terminal got hanged. Initially this was the status for hugepage #cat /proc/meminfo | grep Huge HugePages_Total: 10 HugePages_Free: 10 HugePages_Rsvd: 0 HugePages_Surp: 2048
After running C-Code (given at end of this mail),I got following result but unfortunately terminal got hanged. #cat /proc/meminfo | grep Huge
HugePages_Total: 10
HugePages_Free: 9
HugePages_Rsvd: 3
HugePages_Surp: 2048
I even checked dmesg but there was no error related to page fault for DOM0.
Me and my team would like to enable support of hugepage in PV-DOMU if
its not present. Please let me know the status or any development
related to this project.
C-Code : #include <stdio.h> #include <sys/ipc.h> #include <sys/shm.h> #include <stdlib.h>
#define MB_1 (1024*1024) #define MB_8 (8*MB_1)
char *a; int shmid1;
void init_hugetlb_seg()
{ shmid1 = shmget(2, MB_8, SHM_HUGETLB | IPC_CREAT | SHM_R | SHM_W); if ( shmid1 < 0 ) { perror("shmget"); exit(1); } printf("HugeTLB shmid: 0x%x\n", shmid1);
a = shmat(shmid1, 0, 0); if (a == (char *)-1) { perror("Shared memory attach failure"); shmctl(shmid1, IPC_RMID, NULL); exit(2); } }
void wr_to_array() { int i;
for( i=0 ; i<MB_8 ; i++) { a[i] = 'A'; } }
void rd_from_array() { int i, count = 0; for( i=0 ; i<MB_8 ; i++) if (a[i] == 'A') count++; if (count==i)
printf("HugeTLB read success :-)\n"); else printf("HugeTLB read failed :-(\n"); }
int main(int argc, char *argv[]) { init_hugetlb_seg(); printf("HugeTLB memory segment initialized !\n");
printf("Press any key to write to memory area\n"); getchar(); wr_to_array(); printf("Press any key to rd from memory area\n"); getchar(); rd_from_array(); shmctl(shmid1, IPC_RMID, NULL);
return 0; }
--- On Mon, 1/10/11, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> wrote:
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Subject: Re: [Xen-devel] Hugepage support To: "Keshav Darak" <keshav_darak@xxxxxxxxx> Cc: xen-devel@xxxxxxxxxxxxxxxxxxx Date: Monday, January 10, 2011, 4:46 PM
On Mon, Jan 10, 2011 at 08:33:41AM -0800, Keshav Darak wrote: > hi, > > I tried to make huge page request in Fedora x86_64 PV guest using xen 4.1 unstable and it crashed(crash info given below) Had you tried this with the supported kernels (which actually is just one right now). That is the 2.6.32 kernels in Jeremy's git tree? _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxhttp://lists.xensource.com/xen-devel
|
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|