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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8EC73C433F5 for ; Thu, 21 Oct 2021 06:52:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 290B960F50 for ; Thu, 21 Oct 2021 06:52:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 290B960F50 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id B62DB6B0071; Thu, 21 Oct 2021 02:52:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B1323900002; Thu, 21 Oct 2021 02:52:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A012B6B0073; Thu, 21 Oct 2021 02:52:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0117.hostedemail.com [216.40.44.117]) by kanga.kvack.org (Postfix) with ESMTP id 931AB6B0071 for ; Thu, 21 Oct 2021 02:52:07 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 471FC8249980 for ; Thu, 21 Oct 2021 06:52:07 +0000 (UTC) X-FDA: 78719525094.02.F5E556B Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf22.hostedemail.com (Postfix) with ESMTP id 2D1251900 for ; Thu, 21 Oct 2021 06:52:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=C2GrLESxDXsBxKFZvlOYstIpoNYEUDQLI727DbPovXU=; b=TYrAkaXBTNr+gi7RBMQibqZ9UB KqzD6Glbfg9BlshviXhxp3yv+0HgftkgaY9vHc/fOKwUffsfiybdj8EEO4wY7TNHWNXj/gLA0J+ia NWia0Cxl+1wWi2C02fVMGWtiW4SxsKaHaWLXK2fdqVn3L2WcZjJBemlTwtiWQ//Y4bH1GI/CkadsN nSHT6To9Yc6sIHZH54oBreoNiJ0ORfFObC3L11xwgMFaFOizERrE4OtmgU1PZX08DHmltNcDNiP2r kgfPGiSdrY3joe2O1O4zOkpSZFdHH04TAhEyz+ABwz8ylQv6EFrMuWIESyZRlKHDSJ9AcEpU9uOd8 7WmNzpXQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdRvc-006aZH-7q; Thu, 21 Oct 2021 06:51:52 +0000 Date: Wed, 20 Oct 2021 23:51:52 -0700 From: Christoph Hellwig To: David Hildenbrand Cc: Matthew Wilcox , Johannes Weiner , "Kirill A. Shutemov" , Kent Overstreet , Linus Torvalds , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Morton , "Darrick J. Wong" , Christoph Hellwig , David Howells , Hugh Dickins Subject: Re: Folios for 5.15 request - Was: re: Folio discussion recap - Message-ID: References: <20211018231627.kqrnalsi74bgpoxu@box.shutemov.name> <996b3ac4-1536-2152-f947-aad6074b046a@redhat.com> <436a9f9c-d5af-7d12-b7d2-568e45ffe0a0@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <436a9f9c-d5af-7d12-b7d2-568e45ffe0a0@redhat.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Stat-Signature: r6q3pib8u85owoneu1c68aez4ojuie7i X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 2D1251900 Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=TYrAkaXB; dmarc=none; spf=none (imf22.hostedemail.com: domain of BATV+f538400d2eeb65ed2b85+6633+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+f538400d2eeb65ed2b85+6633+infradead.org+hch@bombadil.srs.infradead.org X-HE-Tag: 1634799125-89870 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 Wed, Oct 20, 2021 at 08:04:56PM +0200, David Hildenbrand wrote: > real): assume we have to add a field for handling something about anon > THP in the struct page (let's assume in the head page for simplicity). > Where would we add it? To "struct folio" and expose it to all other > folios that don't really need it because it's so special? To "struct > page" where it actually doesn't belong after all the discussions? And if > we would have to move that field it into a tail page, it would get even > more "tricky". > > Of course, we could let all special types inherit from "struct folio", > which inherit from "struct page" ... but I am not convinced that we > actually want that. After all, we're C programmers ;) > > But enough with another side-discussion :) FYI, with my block and direct I/O developer hat on I really, really want to have the folio for both file and anon pages. Because to make the get_user_pages path a _lot_ more efficient it should store folios. And to make that work I need them to work for file and anon pages because for get_user_pages and related code they are treated exactly the same.