Re: [Qemu-devel] Virtual memory question

2010-08-09 Thread Dennis
On Mon, Aug 9, 2010 at 9:41 PM, Stefan Hajnoczi wrote: > On Mon, Aug 9, 2010 at 7:49 PM, Dennis wrote: >> I have an application that takes up over 2 GB of memory but is >> otherwise demanding virtually no other resources at all. >> Running multiple instances of the application using physical memo

Re: [Qemu-devel] Virtual memory question

2010-08-09 Thread Stefan Hajnoczi
On Mon, Aug 9, 2010 at 7:49 PM, Dennis wrote: > I have an application that takes up over 2 GB of memory but is > otherwise demanding virtually no other resources at all. > Running multiple instances of the application using physical memory > isn't an option. Would it be hard to change Qemu's > phy

Re: [Qemu-devel] Virtual memory question

2010-08-09 Thread Michael Roth
On 08/09/2010 11:46 AM, Michael Roth wrote: 2) exec.c:file_ram_alloc() assumes you're allocating off a hugetlbfs and makes some system calls to get the block/hugepage size. A quick hack might be to comment out the following in exec.c:gethugepagesize(): if (fs.f_type != HUGETLBFS_MAGIC) fprintf(

Re: [Qemu-devel] Virtual memory question

2010-08-09 Thread Dennis
On Mon, Aug 9, 2010 at 2:03 AM, Dennis wrote: >> >> Hi, >> >> I've been looking at the qemu source code but couldn't find anything >> that would suit my needs. >> Basically I'm looking for a way to use a file on disk as physical >> memory inside Qemu. >> >> Before I attempt to reinvent the wheel,

Re: [Qemu-devel] Virtual memory question

2010-08-09 Thread Michael Roth
On 08/09/2010 03:17 AM, Stefan Hajnoczi wrote: Use -mem-path /path/to/directory. It's used for hugetlbfs support on Linux but it should work on a normal filesystem too. Stefan It *almost* works, except for some minor obstacles: 1) Normally the pages get mmap()'d with MAP_PRIVATE so they CO

Re: [Qemu-devel] Virtual memory question

2010-08-09 Thread Stefan Hajnoczi
On Mon, Aug 9, 2010 at 7:15 AM, Mulyadi Santosa wrote: > On Mon, Aug 9, 2010 at 03:33, Dennis wrote: >> Hi, >> >> I've been looking at the qemu source code but couldn't find anything >> that would suit my needs. >> Basically I'm looking for a way to use a file on disk as physical >> memory inside

Re: [Qemu-devel] Virtual memory question

2010-08-08 Thread Mulyadi Santosa
Hi.. On Mon, Aug 9, 2010 at 03:33, Dennis wrote: > Hi, > > I've been looking at the qemu source code but couldn't find anything > that would suit my needs. > Basically I'm looking for a way to use a file on disk as physical > memory inside Qemu. Once when I did code adventure in Qemu, I conclude

Re: [Qemu-devel] Virtual memory question

2010-08-08 Thread C K Kashyap
I am curious to know why you'd want to do it? On Mon, Aug 9, 2010 at 2:03 AM, Dennis wrote: > Hi, > > I've been looking at the qemu source code but couldn't find anything > that would suit my needs. > Basically I'm looking for a way to use a file on disk as physical > memory inside Qemu. > > Bef

[Qemu-devel] Virtual memory question

2010-08-08 Thread Dennis
Hi, I've been looking at the qemu source code but couldn't find anything that would suit my needs. Basically I'm looking for a way to use a file on disk as physical memory inside Qemu. Before I attempt to reinvent the wheel, has someone ever hacked in similar functionality and if so is there a di