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
> > >+...@item -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.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html