Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3599180yba; Tue, 16 Apr 2019 15:00:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwEYA3iAchI3lwTqSKp3uP6kIU8yKo64nNHpUCjueZ2mKENAaGbA9UEc9wZyoB4hqTidw3e X-Received: by 2002:a17:902:4643:: with SMTP id o61mr74393131pld.249.1555452018920; Tue, 16 Apr 2019 15:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555452018; cv=none; d=google.com; s=arc-20160816; b=jpoXwBtWJclM00hfvFJ0ngu8YQXOjeydXHb+gIlTPFbYgsloMz6hCuhayR1d5lcl3v 2bd+n9DWKiElNMTd7YfC25bAL9mfebLZKc39RVWv2qBvc3u1KQNzrf/hkG3L5OJS60Xz VamuabI20WnOPgdg4i0kYMJs8lJ6o1jAbZbKb+5lJGG9nzR4qLUp4T7QSh9YcaPk0zes Q5LEbBbBie91iF+VJ5S0OP5YaECcRKayoH8VCGgbA5j24U7VfRuxnwimJzTVFJrWLG8U 22bkIvnXV800LT4F4CeSI45spXs/u8p6ZX6PCZzgkQyHiBt6ZUfxTee17D8vqGLQjYe7 Ipng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=xGQBUfRiIrm8nMo7bFfbSdzq1yF9X35BP39f6/YJ2p0=; b=nsbHJqqCA1BfwaSGXSQlkxYjZctvb9ir+Mur/Couu0oQxZY5gSvOXkPG3Jf6gAVwlD KnciILkHomI8YUK/35D3nwiUaTqvlznAEqm/Hu3ZJKxiMz2c1YeXqnd+so0DnDlrpbYS i2LfZRDG+y116RcM8U6f4B5xmeD5uGey/Vea87FWHIrVLpMoFCZOeCaRb4cxGICiYtgS r+1R4z6TTW9/PjZcdBy35OavcHpNyi365+nyF1b6C2zUCbhuxcG5WfhE/wzXNROP6U/g kkA/794rx57FPy4vqbyy3WSeoHklHlFeaw3EKhWQP4e6DUg9ErKMrhiIGhY4zADKgunD NegA== 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=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a3si50258431pfc.276.2019.04.16.15.00.02; Tue, 16 Apr 2019 15:00:18 -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=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728883AbfDPV7Y (ORCPT + 99 others); Tue, 16 Apr 2019 17:59:24 -0400 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:37204 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727136AbfDPV7X (ORCPT ); Tue, 16 Apr 2019 17:59:23 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07486;MF=yang.shi@linux.alibaba.com;NM=1;PH=DS;RN=14;SR=0;TI=SMTPD_---0TPUpGFx_1555451951; Received: from US-143344MP.local(mailfrom:yang.shi@linux.alibaba.com fp:SMTPD_---0TPUpGFx_1555451951) by smtp.aliyun-inc.com(127.0.0.1); Wed, 17 Apr 2019 05:59:15 +0800 Subject: Re: [v2 RFC PATCH 0/9] Another Approach to Use PMEM as NUMA Node To: Dave Hansen , Michal Hocko Cc: 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 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> From: Yang Shi Message-ID: <99320338-d9d3-74ca-5b07-6c3ca718800f@linux.alibaba.com> Date: Tue, 16 Apr 2019 14:59:10 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/16/19 2:22 PM, 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: > 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? > 3. The demotion path can not have cycles I agree with these rules, actually my implementation does imply the similar rule. I tried to understand what Michal means. My current implementation expects to have demotion happen from the initiator to the target in the same local pair. But, Michal may expect to be able to demote to remote initiator or target if the local target is contended. IMHO, demotion in the local pair makes things much simpler. > > That ensures that we *can't* follow the paths you described above, if we > follow those rules... Yes, it might create a circle.