Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp20806ybt; Tue, 30 Jun 2020 13:58:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFJejJwyFixQy1th3kSOADgSkYwKUC8C9K1HB+jhgBjlThv9U3o64TvBbnqFyPxBeQIwVx X-Received: by 2002:a17:906:3b83:: with SMTP id u3mr19289760ejf.207.1593550350599; Tue, 30 Jun 2020 13:52:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593550350; cv=none; d=google.com; s=arc-20160816; b=wG7Di6nLylSsHwy9GitNhas4e9O/BvtdP/7Ny+Jw2UqzIFonVsV0Z9i7IuM7Omz4SA lFe+hX8VNci0pGd3F8Cv1C5gT4VmqDnoG9DJuvS1df1DuzCLxipzWx/D7T4ut8rA3UVI pp772Q+XALTiLkEuD57adHzMPjA5UERwzL0Ln4n0J5uNqVW9sFxqgKFm8Mvv7DIMR589 +Zhf0AfxZqW6V01zflxqsc0AJ6YwbP2T92wm41TvxRa1WaFS0Os0g1JRiI5MefTbWSZe ZrBO/Qzv5LzQgGI7XMhRxiWDDDBr6L3cd4jcfs8pZ1t8Y+i2M6E0PYC/nOpkTs7/qPrx K3iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=zp5IF5vcvuCu2gwgY+TzliRbsIBW1Igf4k0wqLGBZVA=; b=fGPc/J3MSha9uVQGBqc2Wiqr8vM8NMtT9P/Quhczq/Qm8ZoxcQQNg7QhekUE94LlWw HzErYC7F8pto2qt1kcgy3ov4mQasyQcZRnDXoBXQe3YWedDW1H6Q3mMcSq5pvzwUb0Yv HE0FfEoXYh9J+/PlWfPo5RNrAztXePkL2FtCX3S222WMKRSTsSVdVf9rQcHLDTaUh0UE BbzMvelCox7Hh3/FiFjIiISLPVHzVvW4uzI/QEbA16Og053WyXEZlpIcUPJVu02uhOZm 8Mclyl+tshT1hXTxnDr4/ch19sXRV4vm+hw5qsA4iTqLiB56+wMKkLsIMc99dBJ8SBGv UJxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=d+8whJ+C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w23si2418988eds.47.2020.06.30.13.52.08; Tue, 30 Jun 2020 13:52:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=d+8whJ+C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727977AbgF3T0M (ORCPT + 99 others); Tue, 30 Jun 2020 15:26:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726065AbgF3T0L (ORCPT ); Tue, 30 Jun 2020 15:26:11 -0400 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71275C061755 for ; Tue, 30 Jun 2020 12:26:11 -0700 (PDT) Received: by mail-lf1-x143.google.com with SMTP id c11so12063006lfh.8 for ; Tue, 30 Jun 2020 12:26:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zp5IF5vcvuCu2gwgY+TzliRbsIBW1Igf4k0wqLGBZVA=; b=d+8whJ+CDvQp9gSztOTjyISsxB6w/oE1k0dTkyIrGpYzlrO1923v7B0bIv+IZMVGtc dHtFpgYgpYYUSlaPoDeUP9I94LkopNHp2EZ+iFMcvnZA4TB+3hgToQ7S6eDAA1muI9o/ 5UKWmPsC+oibSBac8iv2DnroNKr+dyZkRFHQoQobMflsbEJEscezjSQAYg7aCCfsIWmo 8ykwdNfJY0VYnbwzdHOOUJYRpzDOPDGitc8zLOW5XmPuGnMxgwRcq2xbU59NbAfZY16z 8ffEaE3N2dArYpSp4EMqD4MWE80Fiqpts6cMXsAL+Ke2DDnJAtLKGEeg2ZHlntLKE+Q/ K0nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zp5IF5vcvuCu2gwgY+TzliRbsIBW1Igf4k0wqLGBZVA=; b=GUK1PNk/I9QqlN/2O1zwPaydHJ1cfmJ3qsbhSIJ9h63M1ZS8qRJP/5V/SOIj4ZUWSJ B2btYtitKvbHreOMX2TXVh6y/eorpWrY9nsFxV78B2y3aRd5LCwpOabTxoywiZpGiGmF qN/p4nQ+uXQKnTXUnjuWfmeAe1nJM9NfOt3TjwZdXV5bhOzUbsyXIhQgTiayIjtQHuz0 kZTxeADTdUGjbHQPuyGsmhdTva3NzGD/8Og2VJ3lwelBDUYPJDIIi+r82s8480bZRBmZ l9DbGT9jCz4UumIMmqoZR3+Z22BSb/EHeM2mgnXx/+IWTxRZ6Tku9PAABXI+sJSe3gad Slkw== X-Gm-Message-State: AOAM531mjA38s1Kda8/YqJLrniJDPBizZa9AdTWPsEqzh7BuVScekL3g vsbpDY3cSe8elLX3+uwWL0nXMzr/eTxYbdQdSCLkYg== X-Received: by 2002:a05:6512:482:: with SMTP id v2mr12596062lfq.3.1593545167726; Tue, 30 Jun 2020 12:26:07 -0700 (PDT) MIME-Version: 1.0 References: <20200629234503.749E5340@viggo.jf.intel.com> <654d785f-3fe5-d8bd-86bf-bf7431527184@intel.com> In-Reply-To: <654d785f-3fe5-d8bd-86bf-bf7431527184@intel.com> From: Shakeel Butt Date: Tue, 30 Jun 2020 12:25:56 -0700 Message-ID: Subject: Re: [RFC][PATCH 0/8] Migrate Pages in lieu of discard To: Dave Hansen Cc: Dave Hansen , LKML , Linux MM , Yang Shi , David Rientjes , Huang Ying , Dan Williams Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 30, 2020 at 11:51 AM Dave Hansen wrote: > > On 6/30/20 11:36 AM, Shakeel Butt wrote: > >> This is part of a larger patch set. If you want to apply these or > >> play with them, I'd suggest using the tree from here. It includes > >> autonuma-based hot page promotion back to DRAM: > >> > >> http://lkml.kernel.org/r/c3d6de4d-f7c3-b505-2e64-8ee5f70b2118@intel.com > >> > >> This is also all based on an upstream mechanism that allows > >> persistent memory to be onlined and used as if it were volatile: > >> > >> http://lkml.kernel.org/r/20190124231441.37A4A305@viggo.jf.intel.com > >> > > I have a high level question. Given a reclaim request for a set of > > nodes, if there is no demotion path out of that set, should the kernel > > still consider the migrations within the set of nodes? > > OK, to be specific, we're talking about a case where we've arrived at > try_to_free_pages() Yes. > and, say, all of the nodes on the system are set in > sc->nodemask? Isn't the common case that all nodes are set in > sc->nodemask? Depends on the workload but for normal users, yes. > Since there is never a demotion path out of the set of > all nodes, the common case would be that there is no demotion path out > of a reclaim node set. > > If that's true, I'd say that the kernel still needs to consider > migrations even within the set. In my opinion it should be a user defined policy but I think that discussion is orthogonal to this patch series. As I understand, this patch series aims to add the migration-within-reclaim infrastructure, IMO the policies, optimizations, heuristics can come later. BTW is this proposal only for systems having multi-tiers of memory? Can a multi-node DRAM-only system take advantage of this proposal? For example I have a system with two DRAM nodes running two jobs hardwalled to each node. For each job the other node is kind of low-tier memory. If I can describe the per-job demotion paths then these jobs can take advantage of this proposal during occasional peaks.