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 1D8BAE77188 for ; Fri, 27 Dec 2024 02:16:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8BB2B6B007B; Thu, 26 Dec 2024 21:16:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 86A6F6B0082; Thu, 26 Dec 2024 21:16:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 759546B0083; Thu, 26 Dec 2024 21:16:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 57E096B007B for ; Thu, 26 Dec 2024 21:16:51 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id C35DB141B6D for ; Fri, 27 Dec 2024 02:16:50 +0000 (UTC) X-FDA: 82939124982.16.6C62BBF Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by imf15.hostedemail.com (Postfix) with ESMTP id 0B8F6A0003 for ; Fri, 27 Dec 2024 02:15:34 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=linux.alibaba.com header.s=default header.b="cF/hwPp3"; spf=pass (imf15.hostedemail.com: domain of ying.huang@linux.alibaba.com designates 115.124.30.130 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=1735265760; 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=4s85B918jL386HalEmDQaG9nvXObcVt3lF2Icu3gthc=; b=6JBzkzPFyd8+EO9c2rbG1hI14gVknzF8f+Jcsl7dBOjwB7qnNEkNJ/t1IBNCE4zokVy1mB AAQUEz15zG/IP5cllojcMdxx4PvrpyeFRRuxwnoizW5lfxhOecf7dryTUKlZC88gSQDQhs OWxUN1j9GLHcB1ii86DAZCJlb4zDeCU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1735265760; a=rsa-sha256; cv=none; b=mITCYkiKN2RQ+/nleWXDj4uTrYQ0bu7Qimpo/4YT6nkauFWVzgr1n7phdWm97bIUkfi4GG Dad20zJ23XKJDEadFJjdn/12w01wlnXlht14ilW46RKMfNmVc0DHBF1SIAPEepOzYTPFxM TcwuaPLDiEnb0/vENkxTglboEalwERU= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=linux.alibaba.com header.s=default header.b="cF/hwPp3"; spf=pass (imf15.hostedemail.com: domain of ying.huang@linux.alibaba.com designates 115.124.30.130 as permitted sender) smtp.mailfrom=ying.huang@linux.alibaba.com; dmarc=pass (policy=none) header.from=linux.alibaba.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1735265804; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; bh=4s85B918jL386HalEmDQaG9nvXObcVt3lF2Icu3gthc=; b=cF/hwPp3c7dUPuVBtXKWuPmyxxcN+GRxqg91sgjXVtJvh6PJVID4rjss1RfRx1loM5V/a27W4YeCbiXGe38LSNGSi66l37LogNbUEG94X1sdDes6WoxfHhtILSwpLcRhFoO7PDyj5ZmNC8MPD970vBTj+CwcHCkYYCtMJeKAPQY= Received: from DESKTOP-5N7EMDA(mailfrom:ying.huang@linux.alibaba.com fp:SMTPD_---0WMJiNpc_1735265802 cluster:ay36) by smtp.aliyun-inc.com; Fri, 27 Dec 2024 10:16:43 +0800 From: "Huang, Ying" To: Gregory Price Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, nehagholkar@meta.com, abhishekd@meta.com, kernel-team@meta.com, david@redhat.com, nphamcs@gmail.com, akpm@linux-foundation.org, hannes@cmpxchg.org, kbusch@meta.com Subject: Re: [RFC v2 PATCH 0/5] Promotion of Unmapped Page Cache Folios. In-Reply-To: (Gregory Price's message of "Sun, 22 Dec 2024 11:22:30 -0500") References: <20241210213744.2968-1-gourry@gourry.net> <87o715r4vn.fsf@DESKTOP-5N7EMDA> <87wmfsi47b.fsf@DESKTOP-5N7EMDA> Date: Fri, 27 Dec 2024 10:16:42 +0800 Message-ID: <87v7v5g99x.fsf@DESKTOP-5N7EMDA> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii X-Rspamd-Queue-Id: 0B8F6A0003 X-Rspam-User: X-Rspamd-Server: rspam07 X-Stat-Signature: az19htehnfh5tdhoz3nnd93aojw11zqa X-HE-Tag: 1735265734-531892 X-HE-Meta: U2FsdGVkX1/BgYPPOz9PI8yqyoB2lkEAWXKoq4glZZN8PMi7Pgz6TOwQbRi7nX4xKeAMK+KVrqx+sVprx42vg14wjVBbkChTACfM/7omKQ1vtFAC6gBB0ytr+eFVC+DHGxo/N6f2tOgSSFFamQ3HisUk+dsLsfwZaIpt0FFHi/Bi9hthVMAf6YCsEYH/NjQ9hQBOuJfT9OSAiMdVmsr34K2mIDBVeaeDw1m7+xlUzY2/NOVpCVUl4+WYdcSJtqgLqb7kca4qnm3bIojWgqO3//0fmgmfTqgqHs5qLhWhxuiSbEjjeCi6J5yyaA8kucqhcPlwbcrWuO0Lfzl4hUNxMC8Lvp3F06paJDB1fCf/cznewK7eSQgwqFAUbFgpkArerI8wno10d3F7w5NkhA6HwxV9d4WvsRyt04Dr7JFtvUs+Q6DzZU0l+ytA1dYYcX4Z9rKmOgY+/EKBiwMJFIHsH/+hUd+5yzFnVmR4UKijSb404AGZWgq6QVWpOYsBCvMuufOMdZiStNBwttBVHpGPYKez/U4uYQ0A/z6tLxEJ0Fs7svvjIkHr9sj02prDN6wvx24KP9TUuaiF+iH4m0Z8biulc7lfkZLtJDsAYffoy8DTWVk8VdW5f5x5rEbmne2o1e8s8oHU9xCr7dRJ4BUYIXbmolyjWFKfrO7Ww72ptIPtkpqnEZ613dOu2yIMPHrTkW4fr0MIdwEgFPfBwFhpvOENo8Iif3vFbA9dCdm/Bt/lzHClX4yFV8rnTzT3eT/1kjumpeLUxevxRaILtFyYBxgcunFM8dIcZot2dkt67L/K2UJR23MP2tbO9WPWvp1DftfhRcDj95cSJKjep3ZtYmgekBm599d5oFLHZUQR2XCEGxPHPCHql6khQx15l2RjovWLbYl+wG9XFr2Iey42FcvaYdoZUkUt8SGDzafsB5aiZAvqxhL1WOJPUHNW+/zRIXxamr2qw3OVXbCQ90Z gOyU8CLX 9honbbJCTLsftw5poixGnaVwcY4dnUOX7BSK/xoYn8kARMJQ8bh8Ks+Mob2ec5eDApJAZoR7al/DiMmGaFv7rnnMlo2BvuMfRfuoeh+YSnWQduXcYbSqvyFPmiSHPR7tpF00XTEJ7rGHykxAdPhrwNB+5uatG0HpZ/N4/tAYCUkQlaYTUf2yThT/nCzHX1z/wFguNKXreAMjfw4PDYowCJ6pz664GEOvPyqBbvIggWg8MXsA04N02sltvMEFQVtwYrZVbj+mdmw2FAac= X-Bogosity: Ham, tests=bogofilter, spamicity=0.014389, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Gregory Price writes: > On Sun, Dec 22, 2024 at 03:09:44PM +0800, Huang, Ying wrote: >> Gregory Price writes: >> > That's 3-6% performance in this contrived case. >> >> This is small too. >> > > Small is relative. 3-6% performance increase across millions of servers > across a year is a non trivial speedup for such a common operation. If we cannot only get 3-6% performance increase in a micro-benchmark, how much can we get from a real life workloads? Anyway, we need to prove the usefulness of the change via data. 3-6% isn't some strong data. Can we measure the largest improvement? For example, run the benchmark with all file pages in DRAM and CXL.mem via numa binding, and compare. >> > Can easily piggyback on that, just wasn't sure if overloading it was >> > an acceptable idea. >> >> It's the recommended setup in the original PMEM promotion >> implementation. Please check commit c959924b0dc5 ("memory tiering: >> adjust hot threshold automatically"). >> >> > Although since that promotion rate limit is also >> > per-task (as far as I know, will need to read into it a bit more) this >> > is probably fine. >> >> It's not per-task. Please read the code, especially >> should_numa_migrate_memory(). > > Oh, then this is already throttled. We call mpol_misplaced which calls > should_numa_migrate_memory. > > There's some duplication of candidate selection logic between > promotion_candidate and should_numa_migrate_memory, but it may be > beneficial to keep it that way. I'll have to look. --- Best Regards, Huang, Ying