From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F3DEEEB5 for ; Sun, 22 Dec 2024 16:22:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734884556; cv=none; b=NNlsKShqmdFVH5hPoXi9E3GskML7+G/9h+X9CojeVX6GFSxjjf7KbFQmfRuTpv3z3AsTMf9yfPuBwi9YzZslFmH5oAsDNVPGOuPhNvG0pBTpk9kBq6c9tMF0fj3IXJtHe6NEZXdlmh+a+DRkL3aX8qqYcq7Wo5aMZHl5KcZopR4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734884556; c=relaxed/simple; bh=f7mGI9VMc25f7Te/3CpBVGvrY0Ihtps7pTBzzVx7NtM=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=F1aeTr/QXFh6lhhAe2J4bbNEEe+qihPwMTrl/0ABmzn+6hFWOmKN6++gmV/ptGZ22IAk/qrTaODW6AFVh6AhnVPfoGAfKxUYU0MSzJm7pG22TV8jbQrjQbI5tvxwLZ4UE22TXOHRx8lMkTiJN8eK9uZfN+BTINHpZYjTlm65gnw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=ihiOh5j0; arc=none smtp.client-ip=209.85.216.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="ihiOh5j0" Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-2f44353649aso2565205a91.0 for ; Sun, 22 Dec 2024 08:22:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1734884554; x=1735489354; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=lhMphLzKVS5f63UvtxZSlRXvAEndXTILEAOG+YUXA3A=; b=ihiOh5j0G2KZeancWnkmyUbD6+HhrD6nN8IG/JlZx9+FNf4e9mNF8B091G0ACYYRTx 2ncO+6/py9Oppt4bzRaN4/gube1w5CwdcufwInEUlD5QIJKwk0XfIHtrZJgU+l1B6jGG uxiDZwnk+4G/lcdWnMPQGIfhdAjoojZGdC9lGFJV5r5o3gDAc68Y/wNBzTAOmhgPH2hw 4jsd5wKxxzdgw7+GKQqmBLjGzqJRMcdB91URpSO1cOjGau69xgX3ZobmmJWuBywYT5A5 NUqdLtZiPZhy0CtuckmJW46nH+PuQUylrB+g/qEzA4BnB5wTpEjzfRIUp4kFbNuEjicI 5/2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734884554; x=1735489354; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=lhMphLzKVS5f63UvtxZSlRXvAEndXTILEAOG+YUXA3A=; b=H9h2ImSFDSaqX27Lu0FEBf9No8Xb3sxqbvzyXg+fXHb1Wkf83p7bo+N1I8WXzsI2hH vUYn0I4CMHGFmIS93P6clP57Vmc4+KrM7rmShU2+NdZZx02ydwm97hRb77naLhJWrYxV 9YSdwbBR63wi7D1KrN3ybAO/O7SiHwsyHYHCYpFU1T23kEY8wV2SOC0eMyBgHYOl+LBm /WQ6NUQUZEcaEOT2Dj0WnRAWRIGIJI4Eg986nePjTwl3dHO5bqg7qnwv8WBZiHrGpDuS hoLjWlAVdaJSMhJ9048yoTClXClJC1UnC1QdHVGtJS6vjqHoG+eUMmajFs0wgekU/xbX yoYA== X-Forwarded-Encrypted: i=1; AJvYcCU6AdqrkFaqoDtMXF8MZP4j+Ejt28D7fwPnMpSOkrmSfFNkMFbEixAyEw6sYhS0OT9TGpTbR8XXki7Ob+E=@vger.kernel.org X-Gm-Message-State: AOJu0YxTZAQfb4QlGsei18s3gYVhyWbkUr57RYP08PytRRl61ODbZgCq bffv86M6TQ9k9vYkpb1y3+aW4LTphMwDnH12yBCTDJxz2M6V0BL1WptA8ifBdjY= X-Gm-Gg: ASbGncvCelvo8C/quAOA7JBV0R3tJ/lCz9szwzzY3Xqb33Nls8FgIXDgJYLHI7kwnUG cm8WHlKT53HnEwXIlHmqnETyYGVsfL8UERVOPDGkfPrINtjDFvfJilEjK2tnmd9tbU12dcGI6gN i5IvtAOsYr4zsZwNZfhU7V1Z8boT6MOPYrKle6PZSgYEJQkn9qgBBCxsMDC6+5mXvQECHlPBSei +gxtAk7QfeyY4qLRzdT1AYnVF3mjYDPBmbrYQx02f617eBVKWRUG8w+qyDNlJ52TzxwiS8C9M4G b9SyVSw= X-Google-Smtp-Source: AGHT+IEKiByCxQcHgBwBzTh9JKARMoGVRZbxO4OzN23uay6InYuUda6DwNVKOm80QUIBp1BHB0RQ5g== X-Received: by 2002:a17:90b:2e0b:b0:2ee:d371:3227 with SMTP id 98e67ed59e1d1-2f452e4b9f2mr15476324a91.17.1734884553672; Sun, 22 Dec 2024 08:22:33 -0800 (PST) Received: from gourry-fedora-PF4VCD3F ([75.167.163.61]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc96e85csm58722735ad.61.2024.12.22.08.22.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Dec 2024 08:22:33 -0800 (PST) From: Gregory Price X-Google-Original-From: Gregory Price Date: Sun, 22 Dec 2024 11:22:30 -0500 To: "Huang, Ying" Cc: Gregory Price , 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. Message-ID: References: <20241210213744.2968-1-gourry@gourry.net> <87o715r4vn.fsf@DESKTOP-5N7EMDA> <87wmfsi47b.fsf@DESKTOP-5N7EMDA> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wmfsi47b.fsf@DESKTOP-5N7EMDA> 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. > > 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. ~Gregory