From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71C8EC433F5 for ; Tue, 15 Mar 2022 06:13:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D7E688D0002; Tue, 15 Mar 2022 02:13:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D2E868D0001; Tue, 15 Mar 2022 02:13:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BF5F78D0002; Tue, 15 Mar 2022 02:13:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0046.hostedemail.com [216.40.44.46]) by kanga.kvack.org (Postfix) with ESMTP id B0B3C8D0001 for ; Tue, 15 Mar 2022 02:13:41 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 4CCEB181CA328 for ; Tue, 15 Mar 2022 06:13:41 +0000 (UTC) X-FDA: 79245604242.25.F4EA75A Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf26.hostedemail.com (Postfix) with ESMTP id 8EF3A140007 for ; Tue, 15 Mar 2022 06:13:40 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 531CF210DD; Tue, 15 Mar 2022 06:13:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1647324819; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7OQUAsHYpuDcIcBxp2yn2HNjgjPTj9XE8xl4qxKMMAE=; b=eJHxa5DoERKoyDiKJ4QLQ9YlntA68Gvp6LAseIWjJyldLZ5rwrql0zS3U9Aq8ER3wYGkyP 9RZrwFRfAZBc4z2YpD0Lq+12y+8IKqtVoE/ibRVdvEuEmyi606Xy9u285TQogE47BDwb4w /ibO9TUyY2M4dS5XeOm2Pakvhr3/gnE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1647324819; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7OQUAsHYpuDcIcBxp2yn2HNjgjPTj9XE8xl4qxKMMAE=; b=K6tOVG8A1GNRGorh2XeFUnwOCwRCurUNZ0/tKSqc1uyep3PuPKr5GrgxF1XO/dCU17xAP7 C7RhP90wr3PgBFBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id BFCAE13B4E; Tue, 15 Mar 2022 06:13:38 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id O/0pK5IuMGKMMwAAMHmgww (envelope-from ); Tue, 15 Mar 2022 06:13:38 +0000 Date: Tue, 15 Mar 2022 07:13:37 +0100 From: Oscar Salvador To: Dave Hansen Cc: "Huang, Ying" , Andrew Morton , Dave Hansen , Abhishek Goel , Baolin Wang , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm: Only re-generate demotion targets when a numa node changes its N_CPU state Message-ID: References: <20220310120749.23077-1-osalvador@suse.de> <87mthxb514.fsf@yhuang6-desk2.ccr.corp.intel.com> <87czip73b4.fsf@yhuang6-desk2.ccr.corp.intel.com> <6b63d2ad-9b21-3fd6-37b4-31d7ad804c30@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6b63d2ad-9b21-3fd6-37b4-31d7ad804c30@intel.com> X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 8EF3A140007 X-Stat-Signature: w7dwct57xwyxecq1b7bf3syhmuw34xd9 Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=eJHxa5Do; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=K6tOVG8A; spf=pass (imf26.hostedemail.com: domain of osalvador@suse.de designates 195.135.220.28 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de X-HE-Tag: 1647324820-718398 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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