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 85306C02181 for ; Wed, 22 Jan 2025 16:48:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1F1C76B0082; Wed, 22 Jan 2025 11:48:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1A2976B0085; Wed, 22 Jan 2025 11:48:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 06A506B0089; Wed, 22 Jan 2025 11:48:55 -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 DDEFA6B0082 for ; Wed, 22 Jan 2025 11:48:54 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 9263C120446 for ; Wed, 22 Jan 2025 16:48:54 +0000 (UTC) X-FDA: 83035672188.17.998B652 Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) by imf15.hostedemail.com (Postfix) with ESMTP id 9A387A0012 for ; Wed, 22 Jan 2025 16:48:52 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=c6pSOhyU; spf=pass (imf15.hostedemail.com: domain of gourry@gourry.net designates 209.85.160.177 as permitted sender) smtp.mailfrom=gourry@gourry.net; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1737564532; 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=kr9/sx5x4FEyt+2JT+grv3uEjQGhYsk9xF3BwrslJ1o=; b=tRojvD7b6rka0ZnWyk3BC7t1tm3Axd9pLceleIlnLerJYgooP36rLbVybLtsGH3GPyfsCd 3MT6bbOom4C+baXVsr3baqOh9nEFGHn9aGeY+1Xp6Izj7RXyXJKxtSRKJjtxPjUTAYLn+T OMKY7guPHYgux4qg3f8XhcdK/53sz5Q= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=c6pSOhyU; spf=pass (imf15.hostedemail.com: domain of gourry@gourry.net designates 209.85.160.177 as permitted sender) smtp.mailfrom=gourry@gourry.net; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1737564532; a=rsa-sha256; cv=none; b=cuwHaW6Ee+HVX68WVUMt+xvkQILYJ+r+dViUsuTgB+/T/YCQm1U8On7Qswhzi+5NfG/qbb l821j/YVCIq9zGF3/axXcf3yR8N6OovrP4ANkcXVyzb2aWpqKGlU8A2uLfm9N2T8qoFOeU cmLVCqVpR+xJi/n0Z7+u4toSg6kP8rs= Received: by mail-qt1-f177.google.com with SMTP id d75a77b69052e-4678664e22fso67183791cf.2 for ; Wed, 22 Jan 2025 08:48:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1737564531; x=1738169331; darn=kvack.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=kr9/sx5x4FEyt+2JT+grv3uEjQGhYsk9xF3BwrslJ1o=; b=c6pSOhyUEOstXKuLNKUd0pi6HBG+S42Re7kjJZ/BLI+fvFujKnkcRnIBe1L7cxEGTJ HoitpaySNbpKOa48TCV9kbed9HVj0/hh2D44oo+nmPFWREd/SC7S+rMc+rJetH6N7Hil uAC6MLANfSJu4ezmQCOEfIM01vFvFSA7BCXmdkc+oDpUDaQa4OqsXdB2j3pDuFJoePjw 3D4U3r2kimYM9sluR03WI3JOqej4NBC0lv5G4YwAe2e+QntUQOdT40qJqzPugoxzW+QS DHCTkQCRC43lOb/qbBdk3vnYpk9AeoW9SQ+FdjH/zreX0vySkI3FfOLjnXWA5cPmgOCh iKHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737564531; x=1738169331; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=kr9/sx5x4FEyt+2JT+grv3uEjQGhYsk9xF3BwrslJ1o=; b=WqGF2z4TZpAbtso6PYyzl0VnwehpMYkQCDhqB7Rnf9hPvyC48qWeASRVD0fi756Tpw gXyQZCJao/VQIKkCxXh+NXd26sZWDCYNrM6LbfozQ4TWFPY7CI9FtXLLNULlw7Nh7Tvt YbXt2K4Rk8deIaoHO9brxtmHZKDIuXlvqpQkBjVoPGTEMhI/S3iQbrez6lVFEmKzWDv7 TyvBVInaIcfVcW6fMaaAA/sLm1/Fte9CKNUEg+a6XcD8w0gnPTVa6DibErL2ACTERm/A otsM+QzfwilLaec12pwDb7ehvLmxk2T9mmRRZdgAcFzJX0onJhvSayIY7oS64GFy05xB QX8w== X-Gm-Message-State: AOJu0YxHUL+2+kmB6x0nBRYk4QurMNFs5zKdfu8iULLPlO/q7M0CTgPt du2Ye79b56RDYofjTsYh/tQi9xbFmaeVwXA0FOzqbKy2RBdwrVpxqISij5DoHhU= X-Gm-Gg: ASbGncsRvUZa9N1g6Qk4CGzAXKdphBNyEumEsZ6NS1JO11F1BOMYazsvhc7pE2cPgtk 1WC+DRrv1eIV7BRllB2/R8Qx5aOEaGpTb6PCgYvDICacuIoHMHAob0aswSLpak3ixjMJMq+hD3i VsSZGVlJFCiD2ieObHcO6wCarEdvSw5FwozdMIV+xsD6wyzv/PL/OIG/MLhkA3dDSb6H61Uo7aZ 0l4NPqZsRiT9bLMSDk9qaqWxreoUZqvm9rixDJOg/khOm1Fhba2cVaeH3XRjaUEwasMj/iITwxd ceoYOoWBpkGQMLz4h6RjTZV3IOmTskysScOHfOf/dHBUnkqrMUQt X-Google-Smtp-Source: AGHT+IGqKeucTA+irku665A+Oijwy7MIpYQ7FIXbCblzZZxXg4bmfGemIEdCXsqh+89fkA+t8kqbpg== X-Received: by 2002:ac8:7d16:0:b0:467:51e6:d861 with SMTP id d75a77b69052e-46e12a9b078mr326867791cf.31.1737564531542; Wed, 22 Jan 2025 08:48:51 -0800 (PST) Received: from gourry-fedora-PF4VCD3F (pool-173-79-56-208.washdc.fios.verizon.net. [173.79.56.208]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6e1afbf3783sm62614876d6.7.2025.01.22.08.48.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jan 2025 08:48:50 -0800 (PST) Date: Wed, 22 Jan 2025 11:48:49 -0500 From: Gregory Price To: "Huang, Ying" Cc: linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, nehagholkar@meta.com, abhishekd@meta.com, david@redhat.com, nphamcs@gmail.com, akpm@linux-foundation.org, hannes@cmpxchg.org, kbusch@meta.com, feng.tang@intel.com, donettom@linux.ibm.com Subject: Re: [RFC v3 PATCH 0/5] Promotion of Unmapped Page Cache Folios. Message-ID: References: <20250107000346.1338481-1-gourry@gourry.net> <87v7u7gkuk.fsf@DESKTOP-5N7EMDA> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87v7u7gkuk.fsf@DESKTOP-5N7EMDA> X-Rspamd-Queue-Id: 9A387A0012 X-Stat-Signature: in4e8q1uuhwq4msdxgzgk1t5j3nmqhhu X-Rspamd-Server: rspam08 X-Rspam-User: X-HE-Tag: 1737564532-958092 X-HE-Meta: U2FsdGVkX197y0nACnmEnAudRLcZcsZEC/IVQuOkJQgw/xtRklWmLbfFufSd+6Zrs4r4JqeuEEJ3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tXybNTh/PzerbHuoRldP2LSe2+si4RKZu9VydA5v6R8lcYqcfFshbOBX1MQPH5YenYPwmGSO5+qnwEh6iX2Ei/ViFnoHsdwWB+5szV7baHMtwiQMypr7WtyTlhRNyafY6/t+BjB36J54uuXhKxUDpAiRi7djRHNqL3XnkQHEofc= 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: List-Subscribe: List-Unsubscribe: On Wed, Jan 22, 2025 at 07:16:03PM +0800, Huang, Ying wrote: > Hi, Gregory, > > Test process: > > In each test, we do a linear read of a 128GB file into a buffer > > in a loop. > > IMHO, the linear reading isn't a very good test case for promotion. You > cannot test the hot-page selection algorithm. I think that it's better > to use something like normal accessing pattern. IIRC, it is available > in fio test suite. > Oh yes, I don't plan to drop RFC until I can get a real workload and probably fio running under this. This patch set is varying priority for me at the moment so the versions will take some time. My goal is to have something a bit more solid by LSF/MM, but not before. > > 1) file allocated in DRAM with mechanisms off > > 2) file allocated in DRAM with balancing on but promotion off > > 3) file allocated in DRAM with balancing and promotion on > > (promotion check is negative because all pages are top tier) > > 4) file allocated in CXL with mechanisms off > > 5) file allocated in CXL with mechanisms on > > > > | 1 | 2 | 3 | 4 | 5 | > > | DRAM Base | Promo On | TopTier Chk | CXL Base | Post-Promotion | > > | 7.5804 | 7.7586 | 7.9726 | 9.75 | 7.8941 | > > For 3, we can check whether the folio is in top-tier as the first step. > Will that introduce measurable overhead? > That is basically what 2 vs 3 is doing. Test 2 shows overhead of TPP on + pagecache promo off Test 3 shows overhead of TPP+Promo on, but all the memory is on top tier This shows the check as to whether the folio is in the top tier is actually somewhat expensive (~5% compared to baseline, ~2.7% compared to TPP-on Promo-off). The goal of this linear, simple test is to isolate test behavior from the overhead - that makes it easy to test each individual variable (TPP, promo, top tier, etc) and see relative overheads. This basically gives us a reasonable floor/ceiling of expected overhead. If we see something wildly different than this during something like FIO or a real workload, then we'll know we missed something. > > > > This could be further limited by limiting the promotion rate via the > > existing knob, or by implementing a new knob detached from the existing > > promotion rate. There are merits to both approach. > > Have you tested with the existing knob? Whether does it help? > Not yet, this fell off my priority list before I could do additional testing. I will add that to my backlog. ~Gregory