X-Received: by 2002:a17:903:244c:b0:14f:fa5e:fe81 with SMTP id l12-20020a170903244c00b0014ffa5efe81mr79226pls.120.1645629702859; Wed, 23 Feb 2022 07:21:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645629702; cv=none; d=google.com; s=arc-20160816; b=iE4r5C7awQW9ChDyTxXFHUHpgZ5shcieAsGBA5TBD5eYImTZU/nnea+6hZs7WKZNdA iZTwDVThYmAJ2nQ59g8Z1pCln9hm8QNlYMhq1QsKzjb2oSz5a1e0kTybNfUMKnmWUVez Diuaj0xeja7Sw2IEsWzTRuBExJCrmwH8jBAlETWOxPfYXuln91vEc+6V/3rcjOCqoMSB kfIfYLaMagaICUtPRMSgoR8cEOfVyFvwKoTBwoc9vwAR03jFo9f4RmUbY8wgTJZIuFmt +h7rZF8dFYpIE0Ha4qM/6PvxOVSvMXo5x+XhIgqg64kDUXjJiN1EXpqkFBChymv+pj/L W0tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=RNctXvz/+pBy9XAX0EqBi4IREn0H0T0ytHG6ULPDoI0=; b=O708hy3xsHFNJG5pNc5QlXcjlewBGMGDPxNTgR/klRf3H2UeHfXhb7sEhbx6huwKx2 70NCnlPOrYdWXcB4FN+DOnB1nAkwnlxbQ1ZW8KBj72snBZZwuunrigZ60v2kpd+g97kE 5rWxsbo9KRFNGkurBJqwuq9qURsQo6H2flXeaSs3Mhew6inz0NI4VFjngLs2bb2R22Kf 0Yn7JZWqO5I+ubN78BernFQqATdsx1YNwp4J3VQ3/ok2tQwWqTTRhmLZuigzTcdTVbka k6q7iGvkXacdjQ5kE/i5/caIl0h1Xo7mAmpG6OOZJm/ujZsOWlQn6lHnSuXHFZrK3FbZ LJRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=V3LuRwEp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u5si41669171plh.357.2022.02.23.07.21.26; Wed, 23 Feb 2022 07:21:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=V3LuRwEp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S239307AbiBWJgy (ORCPT + 99 others); Wed, 23 Feb 2022 04:36:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239303AbiBWJgx (ORCPT ); Wed, 23 Feb 2022 04:36:53 -0500 Received: from mail-vs1-xe31.google.com (mail-vs1-xe31.google.com [IPv6:2607:f8b0:4864:20::e31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01421593B2 for ; Wed, 23 Feb 2022 01:36:26 -0800 (PST) Received: by mail-vs1-xe31.google.com with SMTP id t22so2473772vsa.4 for ; Wed, 23 Feb 2022 01:36:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RNctXvz/+pBy9XAX0EqBi4IREn0H0T0ytHG6ULPDoI0=; b=V3LuRwEpxHob6IJLmsHbuhIouyLQNrSHcNT4Snuspt5KDa5sThyfL2rrzDDYtjjzBa K9IO34tFfrQD5KR9tgEfdY6KkjuUTZfC6TSAWolAfHbVKCZ0l+jFZMRE6ZcGxff71UY2 vvBhV5Ji9qT2q145R46bknnHaiSo21b1UU2GyBnXm//3H7jko5nnzW00cwOW+Q/Cvq9Y Ol1VIZkRuHYq/9moH6ihYLZt9xQzvhkErQNAfQ0nOyzLf+0qRkPXD/UPZ8NBff8WWLUV XsGzsdFcnAufwM56SI1jh4ipBUd3Yxvv+hlUpdktOcDmn9L9UEZ4yL7ultE9dL7sCjdI CiNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RNctXvz/+pBy9XAX0EqBi4IREn0H0T0ytHG6ULPDoI0=; b=BHunDg/dwWnSJcTPbR/vkTWZbvGXw1ueH4dpGNDRU8IOdkDz9/7vnRbi2cD9sLSSd+ xhYa+wiev7gbgVVLJaN4IMRKWxuWCGD6nr3LyP6TzTE64h2RBDdBcerfe9VUsFb5EbaK CBB2jTXemAgUKCHGlHXo3zAaLPHcxJEOxbK8DTBiA1wuMXR7f36JWOtLUv+oG76IM1W4 D5Vdz165XnPtPQVMdcuKeWmSSpu3zUyF3rfz4LvlRzLgzXQETLxFJ0mkzRmLawS6ocJ8 iP/IdBYU0daqANTcshM7DS+yoDtkMSNT3GkPxnfoo/oBTcZWyKvR4ojitscGIlK7GLsu ANlA== X-Gm-Message-State: AOAM533x+S90hiQfSYt7MPvw6xiyAQ0gRzO6AIhLkZnmB9bYk1UM8obh 8rpPwJwvGaF9+rajuhxZ+IPNV71gXrhamzpSzXFeaw== X-Received: by 2002:a05:6102:3a06:b0:31b:d9c6:c169 with SMTP id b6-20020a0561023a0600b0031bd9c6c169mr11510124vsu.22.1645608984949; Wed, 23 Feb 2022 01:36:24 -0800 (PST) MIME-Version: 1.0 References: <20220208081902.3550911-1-yuzhao@google.com> <20220208081902.3550911-6-yuzhao@google.com> <87bkyy56nv.fsf@yhuang6-desk2.ccr.corp.intel.com> In-Reply-To: <87bkyy56nv.fsf@yhuang6-desk2.ccr.corp.intel.com> From: Yu Zhao Date: Wed, 23 Feb 2022 02:36:13 -0700 Message-ID: Subject: Re: [PATCH v7 05/12] mm: multigenerational LRU: minimal implementation To: "Huang, Ying" Cc: Andrew Morton , Johannes Weiner , Mel Gorman , Michal Hocko , Andi Kleen , Aneesh Kumar , Barry Song <21cnbao@gmail.com>, Catalin Marinas , Dave Hansen , Hillf Danton , Jens Axboe , Jesse Barnes , Jonathan Corbet , Linus Torvalds , Matthew Wilcox , Michael Larabel , Mike Rapoport , Rik van Riel , Vlastimil Babka , Will Deacon , Linux ARM , "open list:DOCUMENTATION" , linux-kernel , Linux-MM , Kernel Page Reclaim v2 , "the arch/x86 maintainers" , Brian Geffon , Jan Alexander Steffens , Oleksandr Natalenko , Steven Barrett , Suleiman Souhlal , Daniel Byrne , Donald Carr , =?UTF-8?Q?Holger_Hoffst=C3=A4tte?= , Konstantin Kharlamov , Shuang Zhai , Sofia Trinh Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 23, 2022 at 1:28 AM Huang, Ying wrote: > > Hi, Yu, > > Yu Zhao writes: > > > To avoid confusions, the terms "promotion" and "demotion" will be > > applied to the multigenerational LRU, as a new convention; the terms > > "activation" and "deactivation" will be applied to the active/inactive > > LRU, as usual. > > In the memory tiering related commits and patchset, for example as follows, > > commit 668e4147d8850df32ca41e28f52c146025ca45c6 > Author: Yang Shi > Date: Thu Sep 2 14:59:19 2021 -0700 > > mm/vmscan: add page demotion counter > > https://lore.kernel.org/linux-mm/20220221084529.1052339-1-ying.huang@intel.com/ > > "demote" and "promote" is used for migrating pages between different > types of memory. Is it better for us to avoid overloading these words > too much to avoid the possible confusion? Given that LRU and migration are usually different contexts, I think we'd be fine, unless we want a third pair of terms. > > +static int get_swappiness(struct mem_cgroup *memcg) > > +{ > > + return mem_cgroup_get_nr_swap_pages(memcg) >= MIN_LRU_BATCH ? > > + mem_cgroup_swappiness(memcg) : 0; > > +} > > After we introduced demotion support in Linux kernel. The anonymous > pages in the fast memory node could be demoted to the slow memory node > via the page reclaiming mechanism as in the following commit. Can you > consider that too? Sure. How do I check whether there is still space on the slow node?