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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0AD7C4332F for ; Wed, 23 Feb 2022 08:28:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 63CD38D0002; Wed, 23 Feb 2022 03:28:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5F8A98D0001; Wed, 23 Feb 2022 03:28:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4B45F8D0002; Wed, 23 Feb 2022 03:28:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0234.hostedemail.com [216.40.44.234]) by kanga.kvack.org (Postfix) with ESMTP id 3CF3D8D0001 for ; Wed, 23 Feb 2022 03:28:02 -0500 (EST) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id DDCC09BBA6 for ; Wed, 23 Feb 2022 08:28:01 +0000 (UTC) X-FDA: 79173366762.31.8AC8144 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by imf21.hostedemail.com (Postfix) with ESMTP id CA9A71C000B for ; Wed, 23 Feb 2022 08:28:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645604880; x=1677140880; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=DE24H48zq69B43+tGDlcfZq6lBNFuEgFAiGCr9dtF4A=; b=JPAkBq8l/7bVZikY/S9Y3HFQY+3OCo8v6v7flkMD/FqNa+MdQIDXPWZT rDIcmC3fgyfFcHd/NvngPy+ppIsNbUf/0gaDnL5qZy00In+v2nLCXPLfL hAw2CBMYqFltekEz4NK9CxQXBNHiPI9J2C5MlXgD3I3VGLXsSi0SKz3jx aMw2QRC/A7f8lnp2tSipqPEjCCNC16/QQkIYBXXXycLloWTGRu/NCApux gthzTKBjS+vVz/ZI9ZD/VcLt8Z0hg41gjhowlT+rTJN7ODAxxhbGrVTdE OQlw05pN5kdQ4g0rbTUSBMwqPVxPqk1sbQxbYLuN4jad/MmVXn4ijwmEL A==; X-IronPort-AV: E=McAfee;i="6200,9189,10266"; a="235422260" X-IronPort-AV: E=Sophos;i="5.88,390,1635231600"; d="scan'208";a="235422260" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.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-Stat-Signature: egwm86ortectq5uwnwnyupj6qqjddr41 X-Rspam-User: Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=JPAkBq8l; spf=none (imf21.hostedemail.com: domain of ying.huang@intel.com has no SPF policy when checking 134.134.136.126) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: CA9A71C000B X-HE-Tag: 1645604880-289407 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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