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 B4366C36010 for ; Fri, 4 Apr 2025 18:02:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C3F886B0008; Fri, 4 Apr 2025 14:02:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BF0DC6B000A; Fri, 4 Apr 2025 14:02:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ADDAD6B000C; Fri, 4 Apr 2025 14:02:51 -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 8F4786B0008 for ; Fri, 4 Apr 2025 14:02:51 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id B372F140702 for ; Fri, 4 Apr 2025 18:02:51 +0000 (UTC) X-FDA: 83297132142.03.69CE988 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf05.hostedemail.com (Postfix) with ESMTP id 0472E10001B for ; Fri, 4 Apr 2025 18:02:49 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=oJ3ume4b; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf05.hostedemail.com: domain of mcgrof@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=mcgrof@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1743789770; 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=5CSNp1mSJDrqhI21atgDJJKr2haw0lKPreGsBaj17EU=; b=yXlc19M/a+O+8FG63lwpZGXfzbgwgqoogF9SxZ3F0NBOFihFh6Jzz+waT+NrK7h6MKKXK/ AAYKiRMRnnu3vQF3imwnH/hWxJcTTFlau7r9JdASOTC5X4DikZoCXHiiALHtan73taexVt dsTLeSVZzio7A54Dirbqc/Gn4F0+PsA= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=oJ3ume4b; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf05.hostedemail.com: domain of mcgrof@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=mcgrof@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1743789770; a=rsa-sha256; cv=none; b=b/qlRyKvCeEINUhPfBEdLWlJAKYcGBRF7zePtI+JvOcIcyPfIJYhEIcftKzoBRPo3iNqxE 5p68ncAfEdJQ1eXDhzqqqrrm4D9GWyM4/GRBlJRroq12PnYp3cc8PsMDHNuLKQ+fl1/yKI ssIecfpMwjrN0G6klm6WUY+3eefDgFw= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id CDD405C58F9; Fri, 4 Apr 2025 18:00:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41E7CC4CEDD; Fri, 4 Apr 2025 18:02:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743789768; bh=sIFl/zVo7sWkaJsvC/EhT4RsCFGEr7FaDQFYhwOuRP8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oJ3ume4b0BCSXvxNTZ+zTgH+wga0Rklsamxns/5CUHFZEGqO+gQ1Nr55A90L8Rmpb sN35fYoh5HnL3urNM+wqgOd/x0Sf/ZhY7b+cHyDMRxHdYKmNTP0GS3UHnaZHI/O2NR qBVg5F1USRrvBzh+/6r2Tlk1I7vJI41rkeNTLJ5819saPdBZ/0R4xoWUBLRfjx7zgd Y1/1tfc50NfttM58cJz/3p8bzqv4yv/Cf8mmUbm7tCmdw4uV7IY0d2y1uBb1hhR5Dx 7DUXrVOdXzg3ik3+Ag/l4c2mZMoFBH58X81xidyqF9y4Fj8lnCswE1mOyonNpSvkqB dp3aUCCNjmQQw== Date: Fri, 4 Apr 2025 11:02:46 -0700 From: Luis Chamberlain To: "Pankaj Raghav (Samsung)" Cc: Andrew Morton , Jonathan Corbet , linux-kernel@vger.kernel.org, willy@infradead.org, linux-mm@kvack.org, Bagas Sanjaya , David Hildenbrand , 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 0472E10001B X-Stat-Signature: ufxf8q9i83s3646dkcipgjmf6krxryfh X-Rspam-User: X-HE-Tag: 1743789769-760847 X-HE-Meta: U2FsdGVkX18kxWq1PqNG2mUBGImmc7tsKIoMzmiS5V0ppZ6YOa9yZ0fzCqMUracsapofZbSrqkW8fz6FemaZ2Ueflbh39NZnxPHdMFVu/4mH3lo5yfE3X9dKULkwTcTLGU6qiKMpUEl09/G8rci/LzgFmYgZV6Riz8NEJGbd35cncB642GBfzi3ieJqy9gS6OwJqywf0fBOd0Y6ggwcKqST2/x8TiYweDazaNDvwsRV1E6RP+SsH6MT0UGoZKKeTZ/3IYpcaD6tzU8YXJ6mgnpkx+AhBaOMGjs/0Ig8bdsaSx5BtzBhPhol1SHafPlDVEnR4rgcrSTfdxfetT0xt+dGxtAhT+eb5k+NO/eWOAIWwQjbzAXmhfnqohmD//x3Rp35utYR1B2alQshHAC8+4FJklSOLqcuz0y49u/h9A1qliR70opOMjM+Pzme9kOBZ/U+RyvLlzcug2eZM8isg2uJH/TtgW3BOYkRrJoVR3OcmocMl6+nHg/CJlOBOMQZmSIHAMI9FbZAIKho9o1/rR+K+Bgjzvkg6fWFxGN3cJmIrQnry/sZWPtb+yphw2y4cTRS7c/h/5KmbS6XNjmZ77ObjEyY6mI5tt8j0zaBchnx7E1tHx1sqenc7itEFY9GrtpIFme8q+Q/i24ss2F30bJhzSzvkS0AjdLjzeAz7+66DD6fv+Iu9QeYA3YF5dzkaxqeVVsxA1NO+zJV6w+Lr1EtUYpMBbC/7gmUUuDrK2hh8/iw4N3tyTg2g1FV2JQr3idwtDAosnM0W00FPChKsCAm+UyfOR9CnR1yM4pQMdYYznBjKYOKO80LdFOMfbNyNMHm5TExaUG/fNlYy5OxtxuHYu4DYtgRcGp9/C9PtPyaguE1uY+61A1aDswZ6Jxm8pVBor4VD+3QSGmumc1fm7nQWhpzwDvz27UuWKZmfsGldl+XeI2FXC6uk4A8mWBO7/OoU/Go+uL3Blh1nNEb inJSg/eS XU+XTvGhfCqY+ZnwPJiz6OvdREAHu5N9D2D10vHZNgM6Hi+6F9koW8HQdoZQCgs6hR9fT2Rhi7LaVlqtFpICQjNwnnKQk8rzZHIw0ebBe3FZBw+Wu4TloWKao7dy9K1IEhDdg8SM6G+MIRGfXaXFYCmtCrrvFE4fLD69+2yAjSGkDh6Mmfnol+8vO9h09C9LVRWIRpVinAVPXufe3cHEKXh7aoEsqqsS40AaORt7OJpL2Hk6dFVQtG/JPFpHZ0H09knpE 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:31:16PM +0200, Pankaj Raghav (Samsung) wrote: > On Fri, Apr 04, 2025 at 08:32:15AM -0700, 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 > > But we do allocate a THP in the page cache if we support large folios. > > See [1] where THP was supported through page cache. From what I > understand, THP support was added first to the page cache and then large > folios (orders in between) support came later. I see, yes Do we want to clarify this further? > For example, you can mount XFS and do a simple dd as follows: > > $ dd if=/dev/random of=/mnt/hello bs=1G count=2 > > And if you monitor `FileHugePages` after dd is done, it would have filled > up if THP is enabled. > > > 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: > > There is more work to be done in the filesystems right? Adding large > folio support is the prerequisite here to get the THP support. This would be good to clarify as well. Luis