From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4325DC433F5 for ; Wed, 23 Feb 2022 08:28:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238964AbiBWI22 (ORCPT ); Wed, 23 Feb 2022 03:28:28 -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 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