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 75A66C02198 for ; Sun, 16 Feb 2025 07:05:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E0475280021; Sun, 16 Feb 2025 02:05:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DB4CB280020; Sun, 16 Feb 2025 02:05:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C7C7D280021; Sun, 16 Feb 2025 02:05:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id A9C31280020 for ; Sun, 16 Feb 2025 02:05:10 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 39AEA162771 for ; Sun, 16 Feb 2025 07:05:10 +0000 (UTC) X-FDA: 83124921180.07.E2A6CD9 Received: from out199-14.us.a.mail.aliyun.com (out199-14.us.a.mail.aliyun.com [47.90.199.14]) by imf10.hostedemail.com (Postfix) with ESMTP id 32567C0002 for ; Sun, 16 Feb 2025 07:05:06 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=linux.alibaba.com header.s=default header.b=rKiCgZzX; spf=pass (imf10.hostedemail.com: domain of ying.huang@linux.alibaba.com designates 47.90.199.14 as permitted sender) smtp.mailfrom=ying.huang@linux.alibaba.com; dmarc=pass (policy=none) header.from=linux.alibaba.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1739689508; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=lBJ47s5NRlrS0cb6wfv64d5UsTFv+6Rba2Bz4U5pMfc=; b=Pd/o+V2bGNjhfrGxMplll2WxDJULnazgRHdb/UtXTpNK0XAnxzMf1CVy/8E/GNi26suMHF u6WY9JUus+NWa1J3pZPbvriTYSEEBlwNaqk2Wysvi0GrHIWX6O7S38DfkeO0eHRysg16wg X7NjndgroBf0ptGJzbP9f/7h3jQeKwI= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=linux.alibaba.com header.s=default header.b=rKiCgZzX; spf=pass (imf10.hostedemail.com: domain of ying.huang@linux.alibaba.com designates 47.90.199.14 as permitted sender) smtp.mailfrom=ying.huang@linux.alibaba.com; dmarc=pass (policy=none) header.from=linux.alibaba.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1739689508; a=rsa-sha256; cv=none; b=aWmdO+Ij8NYgURtin+GOfu2aoqmyPv9cVSNGvoIVn/epFBlyxnY+x+n4VDl3b3/pMpler9 x11WQWMxdM7Xowi3yI1qsL8iUg0+nSlAVOtlFmbabl3TEAIF01c77fKgmzlWNhaIImlx/2 2iR/6Y+wygLZ4ib3aldmf9864QblLQc= DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1739689493; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; bh=lBJ47s5NRlrS0cb6wfv64d5UsTFv+6Rba2Bz4U5pMfc=; b=rKiCgZzX44S5JxcgIETF2tDM7QRr+RL5afkhWQvcrDuxxQ/fR0FtbrBC2CzASJak7Njw81PqJWV8/BgPppGzfsomgSeySP1AuvUCCOUscJFSH6goMkazuZBKwx8yyd56UTYbNACqKQJBhIFs1170WkFX8RMqxmAoNNiVn4N62y8= Received: from DESKTOP-5N7EMDA(mailfrom:ying.huang@linux.alibaba.com fp:SMTPD_---0WPVxozs_1739689489 cluster:ay36) by smtp.aliyun-inc.com; Sun, 16 Feb 2025 15:04:51 +0800 From: "Huang, Ying" To: Bharata B Rao Cc: Jonathan Cameron , Raghavendra K T , linux-mm@kvack.org, akpm@linux-foundation.org, lsf-pc@lists.linux-foundation.org, gourry@gourry.net, nehagholkar@meta.com, abhishekd@meta.com, nphamcs@gmail.com, hannes@cmpxchg.org, feng.tang@intel.com, kbusch@meta.com, Hasan.Maruf@amd.com, sj@kernel.org, david@redhat.com, willy@infradead.org, k.shutemov@gmail.com, mgorman@techsingularity.net, vbabka@suse.cz, hughd@google.com, rientjes@google.com, shy828301@gmail.com, liam.howlett@oracle.com, peterz@infradead.org, mingo@redhat.com, nadav.amit@gmail.com, shivankg@amd.com, ziy@nvidia.com, jhubbard@nvidia.com, AneeshKumar.KizhakeVeetil@arm.com, linux-kernel@vger.kernel.org, jon.grimm@amd.com, santosh.shukla@amd.com, Michael.Day@amd.com, riel@surriel.com, weixugc@google.com, leesuyeon0506@gmail.com, honggyu.kim@sk.com, leillc@google.com, kmanaouil.dev@gmail.com, rppt@kernel.org, dave.hansen@intel.com, yuanchu@google.com Subject: Re: [LSF/MM/BPF TOPIC] Unifying sources of page temperature information - what info is actually wanted? In-Reply-To: (Bharata B. Rao's message of "Wed, 5 Feb 2025 11:54:05 +0530") References: <20250123105721.424117-1-raghavendra.kt@amd.com> <20250131122803.000031aa@huawei.com> <20250131130901.00000dd1@huawei.com> Date: Sun, 16 Feb 2025 15:04:48 +0800 Message-ID: <87bjv22wvj.fsf@DESKTOP-5N7EMDA> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii X-Rspam-User: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 32567C0002 X-Stat-Signature: u6dafit8b4sp1rbzojjp7g4hti97iman X-HE-Tag: 1739689506-707475 X-HE-Meta: U2FsdGVkX1+RcV17F+8lEdlfayCggGD+PVIpWn4r/EKKnO+QJuO8mUakSoxXhSUF/h68m42dkgRYpEcG2K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H2lcaOrGNohONUnRVHO345f4xHFR36c0iRoL535fRJkviBaq4lRm/5sSQUsKWoS4oZ7QxGjIS7WjAdL7ssU8+YIR5u/MJR2lsZAdiuWSW9axwbbq3sp8R6HFSVDg6MtMRmTA7zrCj+merpnyMS3bU97jv1UEm0xT16Q11Lr+5K/YrqjtMX2ypH81+0tKdCA8sqxC4Rwl6nP7hC2IqD95dNWFaf1eiJJfjVJDwyOBLsoEI6wlxzozgONkT2y/ErAj68FliRgysWblpNq+deNH/m2H/RT7sJ/UM8pdM/nOQJQDCbFkeSYlEJLkYsGm4OCf6jB6t7/mXmaWr64wI/LoqiG+M9L7vD6BpHxmH7/VNh3Ue+/h5lxMe/Ze3ERFd X-Bogosity: Ham, tests=bogofilter, spamicity=0.304140, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi, Bharata, Bharata B Rao writes: > On 31-Jan-25 6:39 PM, Jonathan Cameron wrote: >> On Fri, 31 Jan 2025 12:28:03 +0000 >> Jonathan Cameron wrote: >> >>>> Here is the list of potential discussion points: >>> ... >>> >>>> 2. Possibility of maintaining single source of truth for page hotness that would >>>> maintain hot page information from multiple sources and let other sub-systems >>>> use that info. >>> Hi, >>> >>> I was thinking of proposing a separate topic on a single source of hotness, >>> but this question covers it so I'll add some thoughts here instead. >>> I think we are very early, but sharing some experience and thoughts in a >>> session may be useful. >> Thinking more on this over lunch, I think it is worth calling this >> out as a >> potential session topic in it's own right rather than trying to find >> time within other sessions. Hence the title change. >> I think a session would start with a brief listing of the >> temperature sources >> we have and those on the horizon to motivate what we are unifying, then >> discussion to focus on need for such a unification + requirements >> (maybe with a straw man). > > Here is a compilation of available temperature sources and how the > hot/access data is consumed by different subsystems: Thanks for your information! > PA-Physical address available > VA-Virtual address available > AA-Access time available > NA-accessing Node info available > > I have left the slot blank for those which I am not sure about. > ================================================== > Temperature PA VA AA NA > source > ================================================== > PROT_NONE faults Y Y Y Y > -------------------------------------------------- > folio_mark_accessed() Y Y Y > -------------------------------------------------- > PTE A bit Y Y N N We can get some coarse-grained AA from PTE A bit scanning. That is, the page is accessed at least once between two rounds of scanning. The AA is less the scanning interval. IIUC, the similar information is available in Yuanchu's MGLRU periodic aging series [1]. [1] https://lore.kernel.org/all/20221214225123.2770216-1-yuanchu@google.com/ > -------------------------------------------------- > Platform hints Y Y Y Y > (AMD IBS) > -------------------------------------------------- > Device hints Y > (CXL HMU) > ================================================== > > And here is an attempt to compile how different subsystems > use the above data: > ============================================================== > Source Subsystem Consumption > ============================================================== > PROT_NONE faults NUMAB NUMAB=1 locality based > via process pgtable balancing > walk NUMAB=2 hot page > promotion > ============================================================== > folio_mark_accessed() FS/filemap/GUP LRU list activation IIUC, Gregory is working on a patchset to promote unmapped file cache pages via folio_mark_accessed(). > ============================================================== > PTE A bit via Reclaim:LRU LRU list activation, > rmap walk deactivation/demotion > ============================================================== > PTE A bit via Reclaim:MGLRU LRU list activation, > rmap walk and process deactivation/demotion > pgtable walk > ============================================================== > PTE A bit via DAMON LRU activation, > rmap walk hot page promotion, > demotion etc > ============================================================== > Platform hints NUMAB NUMAB=1 Locality based > (AMD IBS) balancing and > NUMAB=2 hot page > promotion > ============================================================== > Device hints NUMAB NUMAB=2 hot page > promotion > ============================================================== > The last two are listed as possibilities. > > Feel free to correct/clarify and add more. --- Best Regards, Huang, Ying