[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [patch uq/master 2/2] Add option to use file backed gue
From: |
Marcelo Tosatti |
Subject: |
Re: [Qemu-devel] [patch uq/master 2/2] Add option to use file backed guest memory |
Date: |
Mon, 1 Mar 2010 20:32:39 -0300 |
User-agent: |
Mutt/1.5.20 (2009-08-17) |
On Mon, Mar 01, 2010 at 08:25:08PM -0300, Marcelo Tosatti wrote:
> Hi Paul,
>
> Thank you for reviewing.
>
> On Sun, Feb 28, 2010 at 01:28:16AM +0000, Paul Brook wrote:
> > IMHO it would be better to check the mem_path != NULL here, rather that
> > burying the check in file_ram_alloc.
> >
> > >+ if (memory < hpagesize) {
> > >+ return NULL;
> > >+ }
> >
> > Ah, so it's actually "allocate memory in $path, if you feel like it". Good
> > job
> > we aren't relying on this for correctness. At minimum I recommend
> > documenting
> > this heuristic.
>
> More like "allocate memory in $path, if it its larger than a hugepage."
>
> Huge pages are an optimization.
>
> >
> > >+ if (!new_block->host) {
> > > #if defined(TARGET_S390X) && defined(CONFIG_KVM)
> > >- /* XXX S390 KVM requires the topmost vma of the RAM to be < 256GB */
> >
> > By my reading this implies -mempath is probably broken on s390 KVM?
> >
> > >+DEF("mem-path", HAS_ARG, QEMU_OPTION_mempath,
> > >+ "-mem-path FILE provide backing storage for guest RAM\n")
> > >+STEXI
> > >address@hidden -mem-path @var{path}
> > >+Allocate guest RAM from a temporarily created file in @var{path}.
> > >+ETEXI
> >
> > You should mention that this is only useful when PATH happens to be a linux
> > hugetlbfs mount.
>
> It can be used with a file, since its mapped as MAP_PRIVATE.
I meant non hugetlbfs backed file.