Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp4046175pxp; Tue, 15 Mar 2022 11:17:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJXSskgY+IPC6NeMcyh/kq4bz+dodRndDfV+Fdoq4w8Fr6rX/7OSXbn1gRp7vsBookR9ZY X-Received: by 2002:a17:90a:4682:b0:1bc:236:7e46 with SMTP id z2-20020a17090a468200b001bc02367e46mr5899160pjf.212.1647368236918; Tue, 15 Mar 2022 11:17:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647368236; cv=none; d=google.com; s=arc-20160816; b=fEl1wsg/QPU+tKRc+TAhHXnV72viNMG8I6Ydo/1sYx6LGx9yAXl4QTFV99Zu4oeR5K X8j4PNHcjCOJ/rtZmyx2GSk3ySkxEFwn2BWWIEb7KfP5diFED1vfdoPi+qV/uOOXPkgW 8UI92Epgu0/eADP2bUovseQfvqIDBnbHN4/hwY1aI5eA7uMEGE0LVpYo4EakJaAgi+US qx1urls3LzO8PEAOAUvj+PtTdndg2PBlmuzf9y8O9qoCRxfOvJgFnEPWbYIe9mtuOEc3 /j2z+PpfPJD76SfYXovh8KuQU1Q7teWpARRZKBpjzWeNDHhPKK/IS7KdcusMg5sJhiZN Kv0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=7OQUAsHYpuDcIcBxp2yn2HNjgjPTj9XE8xl4qxKMMAE=; b=fup1SKOislFGVGjC6RJZvWRJVwuAoF3w+jDayKxK0x7Cc9ATqOsNKwhPOV3MbuQx8V /y/7rOEH0udDG6AnHmvK6IHZnKo9HsQXF1GdI4HO2tgjtqIy4PfFB57WooLXom6hdYXs wGjn6PVdF1QLSO7JKUnh8nL/m8lWWRqBUGnSx2IvRKrRsBxXvq/ILVTK9KyXK/4M2NZo yTSQ0zVjSsjZgNLygGXgbe9wOK3UFqsPQHEz2GqCEnn+AWCFpRU0GzSLVZrrQyX4hXvp mnWIjQgPBDaT66k4DSn/e7Hq/+XrS2JZjkgBtv0S2oRmhyijojci5pHyeThtNOFPSs5H 5dhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=eJHxa5Do; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j62-20020a638041000000b0037db5bbedeesi7123611pgd.557.2022.03.15.11.17.03; Tue, 15 Mar 2022 11:17:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=eJHxa5Do; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237819AbiCOGOy (ORCPT + 99 others); Tue, 15 Mar 2022 02:14:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232012AbiCOGOv (ORCPT ); Tue, 15 Mar 2022 02:14:51 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B92973A71E for ; Mon, 14 Mar 2022 23:13:40 -0700 (PDT) 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-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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