Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp335772pxb; Wed, 20 Oct 2021 23:57:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJoDMOScTGv/kludD+4u8fnZuwIw3kCeOrfwJlisH18ppyH38hKK+cQfTAHdj9PEfibC6Y X-Received: by 2002:a17:907:98fc:: with SMTP id ke28mr5174172ejc.57.1634799452224; Wed, 20 Oct 2021 23:57:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634799452; cv=none; d=google.com; s=arc-20160816; b=k3KeK9DArZ5NsFMrf+MaV0q+P0co2yTXxuLeNF4XYwgDrpWTJ0ZgX6EhHWh/LDbViZ F6G662cQcaYOrCGkeEPTaWkfw4baKqF85UAZsxonklJWfmI6V5ZnVhqio2yIkik2MIfC a2OrXGlCQZ2OwmctpjzM/iey0nMZF06un3Tpam3fiA1oA+q+3P8hE7LSejs7teb1NL0L dakNdAZ1HZ48e3yKBwC0sXjUDQJjGEJM59ZzbCfBdWF3mFIdRHPTm3jGMHxybGzGRPmc t+Kn/dCdUnEx88Lz5Pbu52h40ehnmyzVr0ssC3PdQxOBylL8BktT/yLPigP7MmO8IdIR aypw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=C2GrLESxDXsBxKFZvlOYstIpoNYEUDQLI727DbPovXU=; b=PZU3mI2ZB1xIOE6bh3WAHk4uIEfwZGdm3C54++4aHorOT0IP0VFk4pKm+Jh7G6Lo7k /JcyopX2/+pRQofqC4npC7ik/A3LgDpJmDIFfVPjJg/n7tu0CgyWbAFQJTxt0cdYNKin rfaW4i+Ds3mDUH9oYz0E8yzKPdkbVbUCGuu+Bh3DLL1jWZNQSBEWjRc7sjHBvTEu+M0z pKPnpD5uKru9i+c9iVschjwrmkwcfQ2u4xayYG7B5r9B7KfIjN4HUUxSImQoEVz8jYRE zbx69b5Rvdvf3Ge9u5sSfiuTwCp96MrGre89OusHHcezqIEkMZmaVcKVCgxrsbWYlMGp vY+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=TYrAkaXB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 28si5490036ejb.46.2021.10.20.23.57.08; Wed, 20 Oct 2021 23:57:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=TYrAkaXB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231282AbhJUGyX (ORCPT + 99 others); Thu, 21 Oct 2021 02:54:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229854AbhJUGyW (ORCPT ); Thu, 21 Oct 2021 02:54:22 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7737CC06161C; Wed, 20 Oct 2021 23:52:07 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.