Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1330635pxf; Fri, 2 Apr 2021 07:39:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0LLWMD4AbZl37HGUnTpgNGqhdMlI8DjZ72umPpuKfhL37Rdlb+h0Sf5f33YFcsLAXwB0y X-Received: by 2002:aa7:d74b:: with SMTP id a11mr15537100eds.92.1617374357532; Fri, 02 Apr 2021 07:39:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617374357; cv=none; d=google.com; s=arc-20160816; b=WSY1j8j7dk3DTT9aZtsQpiTHOeKsSBqndOQU+sZqj4SUVRlEkcWM8Ldh+YRUDxjtEi 1YnJV3px2Cprlsfwie/WCS18skPRMK+FtqJOWNgd4m1F+jf8Nn/uYgAoO8dy6CVRUvNf 1fAB50c5uJX4keHScI842uKoyo/QdN8Z4JUWY06FSgLA56iuyjmwErrvsHmwB6HizwAZ UC1QUs6+XzwJmmSwfLuWy7T7fpaZd+Bjyq7FbwSTLaN4btQvRTvltrTYDJ3dI8XJ4u/c KtvYGt2qs8LHc1i9qg+NudzzMEm9+MyhGaBYfJmlv04d0YJzgeEk5tj9GEbugd7a3jqS 0B2g== 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=IWrrySydU1/oVFGzV/01gHMnlvSDnEBCyFAKBNPbXMQ=; b=Yzur6rQ5G2PthnumueOq0ffJbzDiBpd3e0eWgnCjCCAtUe4MmVcEK8Pk8QLzn9a8m+ AgMxiNmI8aEzuPHs08x3PGtRdt3nxIEQ2hdoLaYioDfJVGa1xcRe1nuXQW6paQEQx9tK 8jOJ4VzheNmP8cCJZDmx1ilD9JD0zo+Fl+Nl41krrMx9TLvvntulvl1UMkS480CHKgSS rzslIsW85f2bhKDWOhiaNnmH4icpegpkXp6EYxC82T333sjw8/ybc66OHaE3F1PFvHmP kGSXF0ds+IaOdAFWSTrXxjMcBvB3bYQNQKYW49MFCAzKEjdq5pt656Ub+Z7AJndhqQny RGjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=QqMeM2Au; 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 e13si6914160edz.432.2021.04.02.07.38.54; Fri, 02 Apr 2021 07:39:17 -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=casper.20170209 header.b=QqMeM2Au; 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 S235836AbhDBOiO (ORCPT + 99 others); Fri, 2 Apr 2021 10:38:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235285AbhDBOiN (ORCPT ); Fri, 2 Apr 2021 10:38:13 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1D00C0613E6; Fri, 2 Apr 2021 07:38:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=IWrrySydU1/oVFGzV/01gHMnlvSDnEBCyFAKBNPbXMQ=; b=QqMeM2AuPHvGbfyV9wRQVNM9Ot HlSIsyvwULnCxg6yeJDvnAz4Vk4gxR6GtNNsb8+EVx0zMfGX7SZvRfSLwdRXJi+cFVl+Jr9B6VoRD PS7Qvs+plQiHH3xE+aD86YOHWR059aKwwblgEI0sCQKVQYpVjypwngD9faNWlTm+aG+S64rq+Qs6q 2EX25gt7pixvKE1OMi9mvDr8WcCLqFWiHsu/Fcjdy/4hT3vOK1vEeDbajhZM6fs4axnzSgzSklC8z XkX/9QF8vFgiTKpI75Mj+5FylRHpL5F33mLI7+czjD/lsim0ghd6z5AP3r9UzNc9yaLFDBGjp9bca Y81fkO5Q==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lSKvr-007k8s-W3; Fri, 02 Apr 2021 14:37:57 +0000 Date: Fri, 2 Apr 2021 15:37:55 +0100 From: Christoph Hellwig To: Matthew Wilcox Cc: Christoph Hellwig , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-cachefs@redhat.com, linux-afs@lists.infradead.org Subject: Re: [PATCH v6 00/27] Memory Folios Message-ID: <20210402143755.GA1843620@infradead.org> References: <20210331184728.1188084-1-willy@infradead.org> <20210401070537.GB1363493@infradead.org> <20210401112656.GA351017@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210401112656.GA351017@casper.infradead.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 01, 2021 at 12:26:56PM +0100, Matthew Wilcox wrote: > On Thu, Apr 01, 2021 at 08:05:37AM +0100, Christoph Hellwig wrote: > > On Wed, Mar 31, 2021 at 07:47:01PM +0100, Matthew Wilcox (Oracle) wrote: > > > - Mirror members of struct page (for pagecache / anon) into struct folio, > > > so (eg) you can use folio->mapping instead of folio->page.mapping > > > > Eww, why? > > So that eventually we can rename page->mapping to page->_mapping and > prevent the bugs from people doing page->mapping on a tail page. eg > https://lore.kernel.org/linux-mm/alpine.LSU.2.11.2103102214170.7159@eggly.anvils/ I'm not sure I like this. This whole concept of structures that do need the same layout is very problematic, even with the safe guards you've added. So if it was up to me I'd prefer the folio as a simple container as it was in the previous revisions. At some point members should move from the page to the folio, but I'd rather do that over a shorter period an in targeted series. We need the basic to go in first.