lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YjAukR2aPkZ0z7Z9@localhost.localdomain>
Date:   Tue, 15 Mar 2022 07:13:37 +0100
From:   Oscar Salvador <osalvador@...e.de>
To:     Dave Hansen <dave.hansen@...el.com>
Cc:     "Huang, Ying" <ying.huang@...el.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Abhishek Goel <huntbag@...ux.vnet.ibm.com>,
        Baolin Wang <baolin.wang@...ux.alibaba.com>,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mm: Only re-generate demotion targets when a numa
 node changes its N_CPU state

On Mon, Mar 14, 2022 at 08:20:57AM -0700, Dave Hansen wrote:
> Qemu, for instance, has a "mem-path" argument.  It's typically used for
> using hugetlbfs as guest memory.  But, there's nothing stopping you from
> pointing it to a DAX device or a file on a DAX filesystem that's backed
> by pmem.

Thanks Dave.

But that is somehow different, is not it?
When you use pmem backed memory as a RAM for the guest, the guest is not
seeing that as PMEM, but just as a normal RAM, right?
IOW, the guest cannot use that memory for demotion, as we can use it in
the host when configured.

I might be missing something, I am using this qemu cmdline:

        $QEMU -enable-kvm -machine pc -smp 4 -cpu host -monitor pty -m 5G \
	-object memory-backend-file,id=pc.ram,size=5G,mem-path=/mnt/pmem,share=off -machine memory-backend=pc.ram \
	$IMAGE -boot c -vnc :0 

(/mnt/pmem was mounted with "mount -o dax /dev/pmem1 /mnt/pmem/")

My point is, if it is really true that the guest cannot use that memory for
demotion, then we would still need CONFIG_MEMORY_HOTPLUG, as that is the
only way to expose PMEM to any system to be used as a demotion option
(via add_memory_driver_managed() through kmem driver).

Or am I missing some qemu magic to use that memory as demotion in the
guest as well?


-- 
Oscar Salvador
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ