X-Received: by 2002:a17:90b:4ac4:b0:1ba:3b4:d3c with SMTP id mh4-20020a17090b4ac400b001ba03b40d3cmr9585301pjb.201.1645628445653; Wed, 23 Feb 2022 07:00:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645628445; cv=none; d=google.com; s=arc-20160816; b=STJu7u55KV/jmt8s/d1ZJad86MJ/KFE9TY8Gb9YlZozJIEXpiJaEo+J2EuHtrwvdeC p2z3iIGMg+/jPAW59uW2nQov5adFFVhMgjc9Mc/VW0My0XSf/Mmjh3TYow6AiauXZSZU /NSR5J/UoyVsxf+yEo+f3iplRyKkjZi7yOgz8r0NCFBLazWcVKKaDtXL8yGXK2h7mfLQ C3ioIHosa0XEynEUkbTTvggP98Dk4+oseh0cJGRDUofatwAznD9X7vghrHPTQh9qO+i3 7T5I4XjOIzWqbwg1XsOsKc5yhFutVi0gwnBSnW+9nA+HIQG8A6QOOlSenrSWbaKBYCFu MJpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=2tmmmWUO5SZvwQ8QHXdhpqgufhv6Pim3uNm2gBHidl4=; b=GNxBy1PG3eHCyToYuxUvFnZ2LfObQqab+c1p/IewQKBMsV5PtL3uFSd/iuqBtRpul6 uAlGZSFCMiITDdrnz57Xfw+X6mgtEbwBJ5EOgoUHF9IXHR/uztYcdHVO+DbCy46Vyztu 7vpasvutGfCnvxgyT4Tt1XpXes8UPdE8hlx1aoVdtoKPtJumhWN87/LWY2pJSaj09B2h 3utLvJRmPfD893SmZCihIdYV3j0XMEQ4tYKX62JWO+DB27YPxxsLNgfc6xVSNChrkruO bE4/xyMZZzbWVmTXIN/9I8Y3xvBa8M082vv99O+GUiVtoo6N4KUcUfQcpSQwPzE8gFOC zXtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RblFJDy0; 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a2si15692855pfv.313.2022.02.23.07.00.27; Wed, 23 Feb 2022 07:00:45 -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=@intel.com header.s=Intel header.b=RblFJDy0; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238961AbiBWI21 (ORCPT + 99 others); Wed, 23 Feb 2022 03:28:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237992AbiBWI20 (ORCPT ); Wed, 23 Feb 2022 03:28:26 -0500 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7404D49CA2; Wed, 23 Feb 2022 00:27:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645604879; x=1677140879; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=DE24H48zq69B43+tGDlcfZq6lBNFuEgFAiGCr9dtF4A=; b=RblFJDy0jQ6AxYCZZGu1qNSzEWX5pqT0QZm7cWnAcKDIW2RGQNMPZDxp LdtVxRzzYtfmtVq76hjtZeWAV2aru6NEv2lsZZr8s9sPQgRfM/slkSP/U lLiQeRodaAeNcE0bSPLLTaevsrdg61bj2vlcYNy44RKu4zEoedkwYGk3V U+4uFKiQzxyvwZ62wu+mjm/TH9y1ylTleCeHf3byQTvaDdVN8kkXkscFB v4B4lbp0UglD3UL/FQzukLp0JCcWxozj/3sN9lSSfvDqJtd4GJ9HbQ196 t9UQZFtU+OjVu5Zy0iXWC3SCAwGBlLiwrsCfI2lzNsRclpFsTEIdtm5Jq A==; X-IronPort-AV: E=McAfee;i="6200,9189,10266"; a="232534538" X-IronPort-AV: E=Sophos;i="5.88,390,1635231600"; d="scan'208";a="232534538" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 00:27:59 -0800 X-IronPort-AV: E=Sophos;i="5.88,390,1635231600"; d="scan'208";a="505832311" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.239.13.11]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 00:27:50 -0800 From: "Huang, Ying" To: Yu Zhao 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-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, page-reclaim@google.com, x86@kernel.org, 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 Subject: Re: [PATCH v7 05/12] mm: multigenerational LRU: minimal implementation References: <20220208081902.3550911-1-yuzhao@google.com> <20220208081902.3550911-6-yuzhao@google.com> Date: Wed, 23 Feb 2022 16:27:48 +0800 In-Reply-To: <20220208081902.3550911-6-yuzhao@google.com> (Yu Zhao's message of "Tue, 8 Feb 2022 01:18:55 -0700") Message-ID: <87bkyy56nv.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 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? > +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? commit a2a36488a61cefe3129295c6e75b3987b9d7fd13 Author: Keith Busch Date: Thu Sep 2 14:59:26 2021 -0700 mm/vmscan: Consider anonymous pages without swap Reclaim anonymous pages if a migration path is available now that demotion provides a non-swap recourse for reclaiming anon pages. Note that this check is subtly different from the can_age_anon_pages() checks. This mechanism checks whether a specific page in a specific context can actually be reclaimed, given current swap space and cgroup limits. can_age_anon_pages() is a much simpler and more preliminary check which just says whether there is a possibility of future reclaim. Best Regards, Huang, Ying