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 F2BE3C36010 for ; Fri, 4 Apr 2025 17:58:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C0D056B000D; Fri, 4 Apr 2025 13:58:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BBB806B000E; Fri, 4 Apr 2025 13:58:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A844C6B0010; Fri, 4 Apr 2025 13:58:43 -0400 (EDT) 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 8A2736B000D for ; Fri, 4 Apr 2025 13:58:43 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id D7E00C066C for ; Fri, 4 Apr 2025 17:58:44 +0000 (UTC) X-FDA: 83297121768.29.66CCF5E Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by imf28.hostedemail.com (Postfix) with ESMTP id 17737C000C for ; Fri, 4 Apr 2025 17:58:42 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=JiX1ifeV; spf=pass (imf28.hostedemail.com: domain of mcgrof@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=mcgrof@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1743789523; 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=IzpIlL/H265jfsVylw5bFkZ6RAq2WM3Mn8KC4iuWKCw=; b=ppT1bwW9OdOepixtZnISPo/iXJTsgRVIrjx5KWy50nWs43eV30kGaU6aLIvitey0pbj6ss DjLOBPRQ4W92685yiByU1v6GSbjMZMB9w/mMrRKyEyTnHMexjrDCyigHZqHOxvw/Y4sfPc UIRM70FfTtOzQfN7HlcFTxuhXWtOVi8= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=JiX1ifeV; spf=pass (imf28.hostedemail.com: domain of mcgrof@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=mcgrof@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1743789523; a=rsa-sha256; cv=none; b=gxXMEECYr/yrYhqmDyJ25TwOzdmOOPQppvRI4LonMYN9n37UMdmlWAqY6Ji5euqILQzJY0 FhZA0MRk7/A1wCwL5K3s7XavTUVMoEu5y5WfY8M/Cvtwd6eYi5IH+sR9lg/go3tyoPyWT/ GFJfnYD/gktB9HzLCr6qe70jwKIZilk= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 684084503E; Fri, 4 Apr 2025 17:58:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C85BC4CEDD; Fri, 4 Apr 2025 17:58:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743789521; bh=kXWX8iGOo5w4zb1Q/Je7jBtB4FirWWX7B0zJrCIyQBg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JiX1ifeVQbKug/tHRjikELcVbedy3Ku+s4ib7INNE4bXave6l39vLMZJf3/ML/opW MEInsd1PIGDw94WoJY3/WEJb2oyV138yEp3LoB1N3zCAqqDDFKqL0kuUcrfTNmZkSL 5Wt/B/QRNmDZU4iQ8Qm1yiASVtL96waQL7ZIMW7ADvoOz19ClmGmml809M5sD6m3D2 uhma+HKF7Qe1MXK7XbnkRG3cHEQ6cxKyt9dzuhe3sGMhSo4pa7fJeO9Khgiix1jyV1 1ruqQnSsstmDy7lNMoqrxDluUNNK9JkJRtSAQ76KQH+LXN4HPjEZ3+cosA1h1S4Wae ga5x9Eo6cTdZg== Date: Fri, 4 Apr 2025 10:58:40 -0700 From: Luis Chamberlain To: David Hildenbrand Cc: "Pankaj Raghav (Samsung)" , Andrew Morton , Jonathan Corbet , linux-kernel@vger.kernel.org, willy@infradead.org, linux-mm@kvack.org, Bagas Sanjaya , da.gomez@kernel.org, gost.dev@samsung.com, linux-doc@vger.kernel.org, Pankaj Raghav Subject: Re: [PATCH v3] docs: update THP admin guide about non-tmpfs filesystem support Message-ID: References: <20250404140657.29285-1-kernel@pankajraghav.com> <09c13770-4d62-430a-827d-6ad35411d18c@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <09c13770-4d62-430a-827d-6ad35411d18c@redhat.com> X-Rspamd-Queue-Id: 17737C000C X-Rspamd-Server: rspam05 X-Rspam-User: X-Stat-Signature: fwagaxfisds87kbzr6me6bx7ofrymmjn X-HE-Tag: 1743789522-68607 X-HE-Meta: U2FsdGVkX1+bCWgcxAGdLpHrnjc1NT8GwdjyUdaEQZtqV/sUSSNOKnJ+PDMWrzPWTPoY26WCaK4OloUWo59x+cq6742WlgRZ/ZbDX8/5W8cKqWdZ9NkmBlGQCxO1YjhJ6yrDRlrEn4EVZfBmCrP7OrJSHWmDr2JI6MnShXmFuhPS/sD7Qr3tRfaIgY88Wghktv7NPVg5tG6i875jT5VnnvWw8FQUHTtjtw4skOLiICLD7PoJiptP+MDhNjBGjzlVf9OvS93ZVGIja4uQ2ulF6d4TVLezE7752xbT3vnU4rTii9Gib+96ZPrQu12Z13QAFMaWx6xvbSIhRgidiInDPzt9IuidPitHzE0Br9HNZ7lknkNEJuAEU9V+ORSPxeKPsQTqctLl+Rd1IsukBWHSqbNWLMgDVlxS6fhexTdjoAPm98u+gb15LvqDidcauWq1yyD4ookm6/ZNo8gUgUvpdwGU0VeCUwvNcrPCJuxP1fLNFe1v1ZovkMbthu61W6PDG6ho8s/rdeVtaVJIG2Gv7Clby22Y3AqC6cLwbODB9KqvGPFL4uh1K9Ww/HyFHfOeI7K5erUb6kX2mZQX9BF/oc4YhGf6mb+bGDHJIprzhNnzovOpjpUFZP5QKga+2CnHACRFnSBUYnmQdmzdyvALmZ3XJflQBClZeQFOC1tpJWoZ35qXGxUiQLKCDLFSoMVU9QpvEpg/tTn+ZwZQ+CoUK81mb7Y8XsH7hTj9+2wzm3Otaf5UQJUWuiBwYks7w7jrG9k8FrndxDrNMO4evZzXGrhDd8uOKmHlsL/gfj2Igx1rQ2qXF2F5JneX4OnpqvL7auMQb1DX7SEriYnEM3Ox2q0nkAexNNTHitNTkCwIKMof//twFn4V1gABRuV9XPvedw3nGujJZmLqD/G3XqWZ0YQDz1vkS4D9aozbN54GL0XsC4vRTaloqSlhf9ACJuyJLBQayFgcWPR6AyMsoM3 agO4tZf5 RTJrklacRwFionA7ZNc8aVO5uTL+vsV/DQuH2fXBGdOUkbChKQqwIPd05Kw/Glv9hVZ+y+dWSfNG4uJS8FduHD+92VDUIHgoG/e2P3D8kKIiBuxduZmmbLu5UM2Rg88UhinEJ9yhEPYItPAgvGiuPefM4+KoTWGLE03kR5wytcMEByZ9WoxcKItOY6GJ9DTmQElI3AmzqWXTJlMbmz863ZdA1i07617GeGmY0i8MHIc5YUbAwi9YnpAdFqj7+H4ONonHv 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 Fri, Apr 04, 2025 at 06:18:12PM +0200, David Hildenbrand wrote: > On 04.04.25 17:32, Luis Chamberlain wrote: > > On Fri, Apr 04, 2025 at 04:06:57PM +0200, Pankaj Raghav (Samsung) wrote: > > > From: Pankaj Raghav > > > > > > THP support for non-tmpfs filesystem has been around for some time now. > > > Update the admin guide to reflect it. > > > > > > While we are at it, move FilePmdMapped to previous paragraph for clarity, > > > and clarify ShmemPmdMapped & ShmemHugePage. > > > > > > Signed-off-by: Pankaj Raghav > > > Acked-by: David Hildenbrand > > > --- > > > > > > Changes since v2: > > > - Address comment from Bagas Sanjaya > > > - Squash commits and Ack from David > > > > > > Documentation/admin-guide/mm/transhuge.rst | 22 +++++++++++++++------- > > > 1 file changed, 15 insertions(+), 7 deletions(-) > > > > > > diff --git a/Documentation/admin-guide/mm/transhuge.rst b/Documentation/admin-guide/mm/transhuge.rst > > > index dff8d5985f0f..f8aae64e38d0 100644 > > > --- a/Documentation/admin-guide/mm/transhuge.rst > > > +++ b/Documentation/admin-guide/mm/transhuge.rst > > > @@ -12,8 +12,8 @@ using huge pages for the backing of virtual memory with huge pages > > > that supports the automatic promotion and demotion of page sizes and > > > without the shortcomings of hugetlbfs. > > > -Currently THP only works for anonymous memory mappings and tmpfs/shmem. > > > -But in the future it can expand to other filesystems. > > > +Currently, THP only works for anonymous memory mappings, tmpfs/shmem and > > > +filesystems that support large folios. > > > > That seems to allude that THP can be supported on filesystems > > that suppor large folios. I don't think we want to call that THP > > and that can confuse folks. Leaving "currently" also seems to > > indicate that there is more work to be done for THP for filesystems > > but that's not true as well. So how about something like: > > > > THP only works for anonymous memory mappings, and the tmpfs/shmem is the only > > filesystem to support it. The alternative to THP for other filesystems is to > > support large folios and with it you can end up using huge pages > > That makes things more complicated without a good reason. > > See CONFIG_READ_ONLY_THP_FOR_FS as an early usage of the term "THP" for > stuff we have in the pagecache. OK. > (with large folios we now properly implement > this concept, and support more than only PMD size) Do we really want to call large folio support on filesystems THP? Luis