Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4284035yba; Wed, 17 Apr 2019 08:21:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMHbth5yA/HWzwpwui3J5SJPdzg4rdDczAvF1WVpBuHZDm2xqVLTZr9G5mSTLotpZlo+Wx X-Received: by 2002:a17:902:1621:: with SMTP id g30mr57182172plg.168.1555514492971; Wed, 17 Apr 2019 08:21:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555514492; cv=none; d=google.com; s=arc-20160816; b=qS+YS9eRO95xRCDcqZ+1u5RHRmlffZXCTWrH/IU18nhg87riArpZWFAwouA0ROO7QC 0RtVKeXXZMqH1qG6dZDp5ZrMJsV70Z4rC7v8yR39BMVi2X6sdd5Xa7gj7l9mFGtPdaBj pOHLcdvI2g6qfqjPf6yjXGGrozSJLuAE0uC4gmZHIfymWT6v3rC9+InZjgAAzEGS8CdX pZeAr2ANwwEiD5XPTEpl8O8S5AguyqzjfW5is6VH8hNgDgai9pWYo9uoUuBJrd5vSuTj SryC7G5/7F+gQDbqIZkn0q0QTKZ5+79y3dciChh0w4dgblydceFQpZnu1h06BYSiLb7x 6ROQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Twk2K+2igBzjl+TRSdTc/mSY+wKHlj/1n/pzYuuisuU=; b=tsHVVy6Jz+7rvWlv2hRWO6X6kmGFw7bqK2UD5voxafHJS0SoAonrGzvdi7QeVApCJJ fKRkpId0z4wD1g2qHqFMBQwY83oAZ5tSti5MT1czcOW2R0Ml1TTsdC5DfBx4zrsS/0q6 kztHCBe5WYnhr1Cf6jZ/mbeN/SMwScX81Vi6NJwVTPvjQR0w86T7CPKpueBZmfueX2S5 DFjpKK1Z+JJndvg54oMF/hMHFFHawjqN0pVyDM0ikh3Q5FO59BDDKSWR7btUKl9Qv2QE aNRg9shs5we8sqxPtwIlbI/N9Aayi0Z76/pCkyEefj2MBxd/6D0bhAERMlQ2XOjgoMoL 5t3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f7si51455244pgg.234.2019.04.17.08.21.17; Wed, 17 Apr 2019 08:21:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732587AbfDQPUE (ORCPT + 99 others); Wed, 17 Apr 2019 11:20:04 -0400 Received: from mga04.intel.com ([192.55.52.120]:5654 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729940AbfDQPUE (ORCPT ); Wed, 17 Apr 2019 11:20:04 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Apr 2019 08:20:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,362,1549958400"; d="scan'208";a="316758568" Received: from unknown (HELO localhost.localdomain) ([10.232.112.69]) by orsmga005.jf.intel.com with ESMTP; 17 Apr 2019 08:20:02 -0700 Date: Wed, 17 Apr 2019 09:13:47 -0600 From: Keith Busch To: Yang Shi Cc: Dave Hansen , Michal Hocko , mgorman@techsingularity.net, riel@surriel.com, hannes@cmpxchg.org, akpm@linux-foundation.org, dan.j.williams@intel.com, fengguang.wu@intel.com, fan.du@intel.com, ying.huang@intel.com, ziy@nvidia.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [v2 RFC PATCH 0/9] Another Approach to Use PMEM as NUMA Node Message-ID: <20190417151347.GA4786@localhost.localdomain> References: <1554955019-29472-1-git-send-email-yang.shi@linux.alibaba.com> <20190412084702.GD13373@dhcp22.suse.cz> <20190416074714.GD11561@dhcp22.suse.cz> <876768ad-a63a-99c3-59de-458403f008c4@linux.alibaba.com> <99320338-d9d3-74ca-5b07-6c3ca718800f@linux.alibaba.com> <1556283f-de69-ce65-abf8-22f6f8d7d358@intel.com> <8bc32012-b747-3827-1814-91942357d170@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8bc32012-b747-3827-1814-91942357d170@linux.alibaba.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 16, 2019 at 04:17:44PM -0700, Yang Shi wrote: > On 4/16/19 4:04 PM, Dave Hansen wrote: > > On 4/16/19 2:59 PM, Yang Shi wrote: > > > On 4/16/19 2:22 PM, Dave Hansen wrote: > > > > Keith Busch had a set of patches to let you specify the demotion order > > > > via sysfs for fun.? The rules we came up with were: > > > > 1. Pages keep no history of where they have been > > > > 2. Each node can only demote to one other node > > > Does this mean any remote node? Or just DRAM to PMEM, but remote PMEM > > > might be ok? > > In Keith's code, I don't think we differentiated. We let any node > > demote to any other node you want, as long as it follows the cycle rule. > > I recall Keith's code let the userspace define the target node. Right, you have to opt-in in my original proposal since it may be a bit presumptuous of the kernel to decide how a node's memory is going to be used. User applications have other intentions for it. It wouldn't be too difficult to make HMAT to create a reasonable initial migration graph too, and that can also make that an opt-in user choice. > Anyway, we may need add one rule: not migrate-on-reclaim from PMEM > node. Demoting from PMEM to DRAM sounds pointless. I really don't think we should be making such hard rules on PMEM. It makes more sense to consider performance and locality for migration rules than on a persistence attribute.