Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5814405yba; Tue, 30 Apr 2019 23:47:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDDuT1B5mHUQSq9id9Q0tE7lr41sFvry8I4/8aKvDfIqJJJOec+FKLkGA3+tjFPM6ZPKzD X-Received: by 2002:a17:902:9a0c:: with SMTP id v12mr76743178plp.184.1556693254765; Tue, 30 Apr 2019 23:47:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556693254; cv=none; d=google.com; s=arc-20160816; b=SGgXaRxrOv2rPoEztVvl8UCTUMjmEvepPRz5ray3Prj5Vub++6qbjmDX0WNeOAo+JN VG63WfUoyC/GbVs/+/GNPmCpcbcFxH98LxT3J7gxfZmrWLq4PjmboTDZNEIMp9rLUZLp JL0ioRWNHAx9ferxUbi7+kqV83VZxfSrJZbEhhNqi+uf/l39q8fSno3zleKsX52+yPms EptCesmD9Jckdw0XzMl/Ruoz4eIIsfrL1jrl50dSor3ROsPJaQ5/9WJUcsYu+hNNSehI D+kkklMaudC7AT1yBbryuOa4WmmJlYoLIW0njVtGGUYLB8o9mXBwq5605eA5lyBV0Otu W6YA== 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:message-id:subject:cc:to:from:date; bh=uYhixpbQX03XTrLnqfSwhW+jaKrgaIjFNeW3Pd+RhQQ=; b=xbcyRlf29VoVMIRXZphZTSOiNimifVhnlyQOgqC2ZhE9pUy4IFEwAjK4nllNpWPQ+Z IV1gPK4EUGqz79Vik/kMtxegU9IA9oX9fc1Yk4UxaCHUNxIJGllqDg3oSNq1vnTDtk4o KOVTWs9ItIDTyq6bcD/+HWU2Tb4eW0dQBPKzWlNHsSu2qZSJREUnpsmxUpl2aqKFMSd9 OGVUOFc4u8ACNLOG157ztYyZuETwpkZK8jHenkqUyrWAmGXMWyFCbQEUjpJC1JfNU839 xSGQrEjnRbaI2tGPOgBFokc2WN1ojWcnmuAMlBJxqyVbuBFJ0B3Xbc0jbaU4OFQdIbxN fxvg== 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 n22si38802768pgk.102.2019.04.30.23.47.19; Tue, 30 Apr 2019 23:47:34 -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 S1726150AbfEAGpN (ORCPT + 99 others); Wed, 1 May 2019 02:45:13 -0400 Received: from mga05.intel.com ([192.55.52.43]:44968 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725776AbfEAGpN (ORCPT ); Wed, 1 May 2019 02:45:13 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Apr 2019 23:45:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,416,1549958400"; d="scan'208";a="147194485" Received: from lixinshe-mobl1.ccr.corp.intel.com (HELO wfg-t570.sh.intel.com) ([10.254.212.94]) by orsmga003.jf.intel.com with ESMTP; 30 Apr 2019 23:45:01 -0700 Received: from wfg by wfg-t570.sh.intel.com with local (Exim 4.89) (envelope-from ) id 1hLixs-0001t9-M9; Wed, 01 May 2019 14:43:36 +0800 Date: Wed, 1 May 2019 14:43:36 +0800 From: Fengguang Wu To: Michal Hocko Cc: Yang Shi , mgorman@techsingularity.net, riel@surriel.com, hannes@cmpxchg.org, akpm@linux-foundation.org, dave.hansen@intel.com, keith.busch@intel.com, dan.j.williams@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: <20190501064336.jktcqkvz27ihpqh3@wfg-t540p.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190417091748.GF655@dhcp22.suse.cz> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 17, 2019 at 11:17:48AM +0200, Michal Hocko wrote: >On Tue 16-04-19 12:19:21, Yang Shi wrote: >> >> >> On 4/16/19 12:47 AM, Michal Hocko wrote: >[...] >> > Why cannot we simply demote in the proximity order? Why do you make >> > cpuless nodes so special? If other close nodes are vacant then just use >> > them. >> >> We could. But, this raises another question, would we prefer to just demote >> to the next fallback node (just try once), if it is contended, then just >> swap (i.e. DRAM0 -> PMEM0 -> Swap); or 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)? > >I would go with the later. Why, because it is more natural. Because that >is the natural allocation path so I do not see why this shouldn't be the >natural demotion path. "Demotion" should be more performance wise by "demoting to the next-level (cheaper/slower) memory". Otherwise something like this may happen. DRAM0 pressured => demote cold pages to DRAM1 DRAM1 pressured => demote cold pages to DRAM0 Kind of DRAM0/DRAM1 exchanged a fraction of the demoted cold pages, which looks not helpful for overall system performance. Over time, it's even possible some cold pages get "demoted" in path DRAM0=>DRAM1=>DRAM0=>DRAM1=>... Thanks, Fengguang