Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4001054yba; Wed, 17 Apr 2019 02:24:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTcePyuAMHTt61b30+57wzprQ/ZJZnNKCQled8xO2RsuGtaytrTopMxZQjk3LpupEqkFCB X-Received: by 2002:a17:902:820c:: with SMTP id x12mr88574244pln.199.1555493070834; Wed, 17 Apr 2019 02:24:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555493070; cv=none; d=google.com; s=arc-20160816; b=qTSLuDFU4o0qx624lvSxlWinj4GNGCCVAZ+mHK2MfJeTjunhDIAeKvh/N5pe/ic8gL y0SzzOi23XDmojys3praK04GSi1ss2/azj82MJNL7VESR2CveM9+58XwDqN8ymTXZ8lA 4IQqk0ZcbaZdJLCmi5AimGxB4V+zklHn29MFQulQjGqHOY6A+uTFv7wNnHnZ7bVsfabx stCGNyjAHRASBfMSIzBBrnbFLOzD4pJKlQtR0waDUaC/7aXi1z986dq4Eqy9tc9J9KQs mO0KG5P7bxBu7WFi2ljY3lLsacHan5ez5/RH6QxIEXyErB2x99VxjKLa0jd4At7Gjr57 l/xw== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=HORiY95GMN/mO773EnGdlQfVVR5Tp0nuHGoBjQjbqhk=; b=D21X4fc+XzXWPerqN8UOOEEMUL2zYLfFyB7QgDgO5FR1Gq/we0Bz09ga+req5lxcKw SufERAM0WvgTeUnvSbmYYSLC2zAINXst0t4WgqbbweOM2lfQ+7zFXk99v8Bmmya2osb6 WWuqrZ4+qsqZfGEWfqr+JSME8JQdJpmjFxysbekSudTdH9L1AuB4BhmafUVL3gM8jkOc 8bWFDDUuJ0heFS85k9PZ+jZTVK/3r8Hgn2/kuVXTxRIwM7qYpMpO8zgK1solk0giPNh/ ZaZ2WzexqLY6BPouRI8j9KAIOQlTxscvlVp2q3afIYkh3vciYgV13pQGB5ko8nu2KxS1 86xQ== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a192si31497621pge.50.2019.04.17.02.24.15; Wed, 17 Apr 2019 02:24:30 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731468AbfDQJXV (ORCPT + 99 others); Wed, 17 Apr 2019 05:23:21 -0400 Received: from mx2.suse.de ([195.135.220.15]:49832 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727282AbfDQJXU (ORCPT ); Wed, 17 Apr 2019 05:23:20 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9FF4CB143; Wed, 17 Apr 2019 09:23:19 +0000 (UTC) Date: Wed, 17 Apr 2019 11:23:18 +0200 From: Michal Hocko To: Dave Hansen Cc: Yang Shi , mgorman@techsingularity.net, riel@surriel.com, hannes@cmpxchg.org, akpm@linux-foundation.org, keith.busch@intel.com, 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: <20190417092318.GG655@dhcp22.suse.cz> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 16-04-19 14:22:33, Dave Hansen wrote: > On 4/16/19 12:19 PM, Yang Shi wrote: > > would we prefer to try all the nodes in the fallback order to find the > > first less contended one (i.e. DRAM0 -> PMEM0 -> DRAM1 -> PMEM1 -> Swap)? > > Once a page went to DRAM1, how would we tell that it originated in DRAM0 > and is following the DRAM0 path rather than the DRAM1 path? > > Memory on DRAM0's path would be: > > DRAM0 -> PMEM0 -> DRAM1 -> PMEM1 -> Swap > > Memory on DRAM1's path would be: > > DRAM1 -> PMEM1 -> DRAM0 -> PMEM0 -> Swap > > 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: I am not a fan of any sysfs "fun" > 1. Pages keep no history of where they have been makes sense > 2. Each node can only demote to one other node Not really, see my other email. I do not really see any strong reason why not use the full zonelist to demote to > 3. The demotion path can not have cycles yes. This could be achieved by GFP_NOWAIT opportunistic allocation for the migration target. That should prevent from loops or artificial nodes exhausting quite naturaly AFAICS. Maybe we will need some tricks to raise the watermark but I am not convinced something like that is really necessary. -- Michal Hocko SUSE Labs