qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 1/1] nvdimm: let qemu requiring section alig


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [RFC PATCH 1/1] nvdimm: let qemu requiring section alignment of pmem resource.
Date: Wed, 13 Jun 2018 15:16:05 +0100
User-agent: Mutt/1.9.5 (2018-04-13)

On Tue, Jun 12, 2018 at 11:04:25PM +0800, Haozhong Zhang wrote:
> On 06/11/18 19:55, Dan Williams wrote:
> > On Mon, Jun 11, 2018 at 9:26 AM, Stefan Hajnoczi <address@hidden> wrote:
> > > On Mon, Jun 11, 2018 at 06:54:25PM +0800, Zhang Yi wrote:
> > >> Nvdimm driver use Memory hot-plug APIs to map it's pmem resource,
> > >> which at a section granularity.
> > >>
> > >> When QEMU emulated the vNVDIMM device, decrease the label-storage,
> > >> QEMU will put the vNVDIMMs directly next to one another in physical
> > >> address space, which means that the boundary between them won't
> > >> align to the 128 MB memory section size.
> > >
> > > I'm having a hard time parsing this.
> > >
> > > Where does the "128 MB memory section size" come from?  ACPI?
> > > A chipset-specific value?
> > >
> > 
> > The devm_memremap_pages() implementation use the memory hotplug core
> > to allocate the 'struct page' array/map for persistent memory. Memory
> > hotplug can only be performed in terms of sections, 128MB on x86_64.
> 
> IIUC, it also affects the normal RAM hotplug to a Linux VM on QEMU. If
> that is the case, it will be helpful to lift this option to pc-dimm.

I agree.  There should be one place in QEMU for the machine-specific
hotplug memory alignment value.

It would be best to track down the property of the hardware that
determines these alignment values instead of letting current Linux
software limitations determine QEMU's behavior.  That way we know that
QEMU emulates real hardware accurately and will work with any guest OS.
I imagine it depends on the chipset (i.e. QEMU machine type).

If it proves hard to pinpoint the hardware limit, then please include a
comment in the code explaining that a value that works with Linux guests
is being used for now.  This will allow people reading the code to
understand where this behavior comes from.

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]