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 X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03D63C433E1 for ; Fri, 22 May 2020 00:04:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A6CBF207D8 for ; Fri, 22 May 2020 00:04:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="hphFGtYd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A6CBF207D8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 336D180008; Thu, 21 May 2020 20:04:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2E6F280007; Thu, 21 May 2020 20:04:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1D5EF80008; Thu, 21 May 2020 20:04:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0207.hostedemail.com [216.40.44.207]) by kanga.kvack.org (Postfix) with ESMTP id 0066980007 for ; Thu, 21 May 2020 20:04:12 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id A046C8248047 for ; Fri, 22 May 2020 00:04:12 +0000 (UTC) X-FDA: 76842407544.17.chair23_7c0ac441d545b X-HE-Tag: chair23_7c0ac441d545b X-Filterd-Recvd-Size: 3358 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Fri, 22 May 2020 00:04:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=0gOUmHtpRYnz9Bbg3v6tj1lTQPoZ+mPSDaF1xLyFN8Q=; b=hphFGtYd2XgvPWK2bd4ZFV2Zff s0fSDoF5bcuq6Ip8kbmfxp5C4RG/dlRBr/JPiabV4setjPWs/bvYeKsshWTD98xFdy+YM741kCdg5 2Yxbkd/theGLA/emkM3D8R1a8z36VfNmuy9dlpki8MDOC1Qapr2wkOTM1WeY7RKzrYuMljuUJJq6D fbT7tFjCC7Re9X6P+70BTd+SOxIOQsjeZocUSxgyOwii/+rjJcu1n6tzxIupmp1ywzBmcGvZ4oUKn VVG85WOLyJFoHubusHO8EqJx0YzBDyLLLYaumyzwpHS4DjMn0XOsFEtsYEUOw1S9iAPqnC/Tt7Bcn 6VMpqXYg==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jbvAZ-0002Qg-5D; Fri, 22 May 2020 00:04:11 +0000 Date: Thu, 21 May 2020 17:04:11 -0700 From: Matthew Wilcox To: Dave Chinner Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 00/36] Large pages in the page cache Message-ID: <20200522000411.GI28818@bombadil.infradead.org> References: <20200515131656.12890-1-willy@infradead.org> <20200521224906.GU2005@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200521224906.GU2005@dread.disaster.area> 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: On Fri, May 22, 2020 at 08:49:06AM +1000, Dave Chinner wrote: > Ok, so the main issue I have with the filesystem/iomap side of > things is that it appears to be adding "transparent huge page" > awareness to the filesysetm code, not "large page support". > > For people that aren't aware of the difference between the > transparent huge and and a normal compound page (e.g. I have no idea > what the difference is), this is likely to cause problems, > especially as you haven't explained at all in this description why > transparent huge pages are being used rather than bog standard > compound pages. The primary reason to use a different name from compound_* is so that it can be compiled out for systems that don't enable CONFIG_TRANSPARENT_HUGEPAGE. So THPs are compound pages, as they always have been, but for a filesystem, using thp_size() will compile to either page_size() or PAGE_SIZE depending on CONFIG_TRANSPARENT_HUGEPAGE. Now, maybe thp_size() is the wrong name, but then you need to suggest a better name ;-) > And, really, why should iomap or the filesystems care if the large > page is a THP or just a high order compound page? The interface > for operating on these things at the page cache level should be the > same. We already have page_size() and friends for operating on > high order compound pages, yet the iomap stuff has this new > thp_size() function instead of just using page_size(). THis is going > to lead to confusion and future bugs when people who don't know the > difference use the wrong page size function in their filesystem > code. There is no wrong function to use -- just one that expands to more code in the case where CONFIG_TRANSPARENT_HUGEPAGE is disabled.