Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp681319pxf; Thu, 1 Apr 2021 10:47:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0R2rR9J1SE1Intm97eE8jMYwRi2xuMhGIMzFghuCl0eb3G49FIWGB87FnJeMeoFgj4Z6/ X-Received: by 2002:a05:6402:b2a:: with SMTP id bo10mr11014349edb.144.1617299224487; Thu, 01 Apr 2021 10:47:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617299224; cv=none; d=google.com; s=arc-20160816; b=HeO2JCBw9i+1dcHdnqCaHR+j0sKtbiauN7o0ELdCGn1dRmxJmjvsC4XlZIb3TKJiOR KFvllCBH08SsxBfCLsxuzgyWCP3cZc4+W8zaRtZxfdKbWx+CVAgREfjq1ouTKtZYZlW2 +OHl0kjD3RIQVZH2M2nNx2gXklQFOfjQCV3ypKX5JrukmZ7AzN45V+7322CoNfuDJWP6 Fg347F8JOqvV6JTy+n0RSALnmTwLnDy691ZCtpet5Z2hLjqS24SDhmXzhywg8OKuqws4 18k0PIDI3e0K0agY1Ju0LsvAVSCz5YCJTtDe1fE0736H5o/bUcjxGGlVJsWv0RYIANY9 /U8A== 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=w/7ssEDMUVD4QlYKgBNJoPZ/Vwpdfp7p9SjtiE2HkVw=; b=DXypeOVDntS9hPWE7BJtiDF34bg3GWoCiN4Wfv76WAuI5u49usSPCOWU6gXl/en5EE R08OQE+dy/wevTA4//9jdK7/b1fj6E5VxhNRXimWI6TLtlWl5NJ5t6XqJXu6wzjI6TjA g8/EtvC39uN0PtD7ksxa/6/vAEr25Ze2gNS4CZvIFL2eAqwVpLBJvUJrrmnxCJWViNeq Y2ZibYUEVFOGc/4VxvuK5HIgoSYZEZzbgDWNb1p4UCfJ8td5ZxMdizgr2bQ91n5abMbl ZqrfElsO/tN0zjJhcon6VUxzFkeo7BQuk3bgnSAq8GIRSYF+nwTNUOW9r7T+9mIlRuPB p73g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=W+UTAUw+; 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 b18si4893310edr.358.2021.04.01.10.46.41; Thu, 01 Apr 2021 10:47:04 -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=@ziepe.ca header.s=google header.b=W+UTAUw+; 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 S236189AbhDARnz (ORCPT + 99 others); Thu, 1 Apr 2021 13:43:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234452AbhDARhn (ORCPT ); Thu, 1 Apr 2021 13:37:43 -0400 Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E43B0C08EA7B for ; Thu, 1 Apr 2021 06:30:36 -0700 (PDT) Received: by mail-qk1-x72d.google.com with SMTP id c4so2153581qkg.3 for ; Thu, 01 Apr 2021 06:30:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=w/7ssEDMUVD4QlYKgBNJoPZ/Vwpdfp7p9SjtiE2HkVw=; b=W+UTAUw+g6a1Plj/cURzd01NfugXhFMhp/aCzakOwDQduKQDrdrhO2WSp8U7ct03if nRXnd8lqUvyKe1lFdnCSFrZD/96GhrkvfZ645xfS0tBX8UpkhDrof5joth6ixU7iOuA2 Is/+RK5tJ0Cu42vcARGXUviWPFWGZ+er26s5Y+KqB78x34n9WlbicjIYb6NKvgsrDrsS sc9T+Pxq12aRj0wO6xcnrWIi1JmEssEg6MipVRx/NVsPe7v9dbG8NeNNLqrpmkxLuV80 ZCELs+XTBlo/7PyqylMHVXLf15wzvCqurfYGKuyl4vuoolxyGSNLdPfNt2BZge/u1tH0 RSgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=w/7ssEDMUVD4QlYKgBNJoPZ/Vwpdfp7p9SjtiE2HkVw=; b=FJ3UNCxNYsR0B9KBTvn7AFJey2thJGypHsmxkNWEb6OkaN3YQgjJLijLhexSaIOmv3 jEUmLuUyaOs2ycr4kiVst1RMGPzIfvszJKBJnLAyPZKgsorxVrQmSfSGTdcBzSxjEhg/ V2uOhcMl3wca4lAAxwnSghn8gt6H6VYLQjr0a+lGCy6ace0Qb/1MRBC0F++6S7uJ1arc GXIUGVl1MY6RLOWzN6oKHM+SlNkvNJeSSaMPSZjnihD0dinV1DCrznksF1BAeGdaXqrH gmbrgStz10Vd+TAs8VD78gim4cgEXLtabB0l/hBUwrmLhINUtN7RCdDO5r7sv+XjT/N1 nzsg== X-Gm-Message-State: AOAM530HFBVw25WpofCqDgK/tB3e+lSPS5Wz5+kQgBDfjIahsp1uLw38 FyTYCPIr7bwKJo5AQGjsISXPVg== X-Received: by 2002:a37:596:: with SMTP id 144mr8617287qkf.387.1617283836177; Thu, 01 Apr 2021 06:30:36 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-162-115-133.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.115.133]) by smtp.gmail.com with ESMTPSA id x7sm3413511qtp.10.2021.04.01.06.30.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 06:30:35 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lRxP8-006knq-LW; Thu, 01 Apr 2021 10:30:34 -0300 Date: Thu, 1 Apr 2021 10:30:34 -0300 From: Jason Gunthorpe 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: <20210401133034.GF2710221@ziepe.ca> References: <20210331184728.1188084-1-willy@infradead.org> <20210401070537.GB1363493@infradead.org> <20210401112656.GA351017@casper.infradead.org> <20210401122803.GB2710221@ziepe.ca> <20210401125201.GD351017@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210401125201.GD351017@casper.infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 01, 2021 at 01:52:01PM +0100, Matthew Wilcox wrote: > On Thu, Apr 01, 2021 at 09:28:03AM -0300, Jason Gunthorpe wrote: > > 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/ > > > > Is that gcc structure layout randomization stuff going to be a problem > > here? > > > > Add some > > static_assert(offsetof(struct folio,..) == offsetof(struct page,..)) > > > > tests to force it? > > You sound like the kind of person who hasn't read patch 1. Yes, I missed this hunk :) Jason