Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3225972pxf; Mon, 15 Mar 2021 04:56:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6KRtOB50UhdTv5SH04hNfVBIOaf/MBvEhCRuHZqPp3ABIc3crFYabT/CXx0F9SpkzC6C9 X-Received: by 2002:a17:906:f1d6:: with SMTP id gx22mr23239257ejb.59.1615809388274; Mon, 15 Mar 2021 04:56:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615809388; cv=none; d=google.com; s=arc-20160816; b=UukFfr9pcioZXJPJLgMVNHDVCmjkihYzF31Y6ZjBOsqEPl+tdO1LOuPyZUfYBzQ6UD LNOgpSjwYnJjlYBbyqqyJzBH5a9Y6oY8Ug75a74i/xa/WmoWPxP2ImEvEd29sh1r/WEP 2NdJQdEmyifOdyvhGH/xF/SSRt3I6k4MqLwnSC8aevqL5FHFLbpxNDfz8ygyuwGZ7XhC YugjFZDsl99WL1DXdBGrBKS/2IDL+mZnO0SkCnFpPEuo2ZvhjAzlysj8z7X6HRQa7CbX ekYRAZSEy55n9GWwmGAQPbZAna8IY0npbyvh7zJ8FVG3EydMYZJ2vz7bM5cofPdgnj4m L5Hw== 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=TCKES4KspyjNo/wG6JlZwaabmOGw2Jey0GicXPV904o=; b=kDZBwi9J2jwQNWchE4AKHBZFxif5+9tMkYjti+Lgy4kEO/r8X/UAHZybt4qduz5RF7 UEwyCAwYJ2rDipc6n1wD9ENlHpKUc7+NWEA87GFFYEqtuogxtMGvGNzMiJf4ln3ar3HM PyEP7MwRmeay4b8BwdBvnDXod1WA3Sb0ycByEC6q9OCQ5fi9SixqEi+BAIkmk4pCtsxM TXCIpjR1q+c8yQYjb2IZLDt2zF52fW/PhQrAJule2EVi070RbIpk9vkP7WZbWbJ1LN/Y d9Jab2gSklQZqD1HLP9xd6dDkpbdBK29zNBhk3vtinWb8xPsB/tB3JbCwv//Ewn2MJNE PK1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=QofG4+vX; 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 dd3si10531718edb.360.2021.03.15.04.56.05; Mon, 15 Mar 2021 04:56:28 -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=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=QofG4+vX; 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 S229518AbhCOLzI (ORCPT + 99 others); Mon, 15 Mar 2021 07:55:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229754AbhCOLy7 (ORCPT ); Mon, 15 Mar 2021 07:54:59 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F3E5C06175F for ; Mon, 15 Mar 2021 04:54:59 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id u4so15850062ljo.6 for ; Mon, 15 Mar 2021 04:54:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=TCKES4KspyjNo/wG6JlZwaabmOGw2Jey0GicXPV904o=; b=QofG4+vX6fm1lS8Ti+Sc8uYu9K3mrAW/Zt51ntjHYb7oPYBEuUa71SJMW6Ix65YfHf h6Rm2mkTYqfNHKZ63Wub4y/6rJxNGW4xwmcCNRbzKugLnrgiuDJEgNHFSktztrcSMzPh wAV+TvvaV1AOZNYHNLrh3/M/iFG76m88mZied3mCZoXjYAZleUbSq0jKDWQOoUyoh8+C ppMf6KNdOyBhWJr8W8V2O5SPmTfEb1wWRUQBVsD3tcQm/RNNemAqj9EFTS5MlCOzR/mE x4lUP098Rcwiru++abTAX+uLsKMIuunUctiLmlUfWO+oqBWRGLVfdcbKQO6SK1XUinXY OVOw== 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=TCKES4KspyjNo/wG6JlZwaabmOGw2Jey0GicXPV904o=; b=oEg2DXawdaXeU9gDZh5+vHPHODwO7HT4ZOnZDBlTJs+PjhjgBj55IzEaMLE6TG2z85 b62KAyxhTNpZ+mceV447b1dV677LdsSVofiVLmqkK3ng9jAqbktib2tkdKLkXzzOWc/m 2ybzvzvP9R/hvCT0mUK119R6Dc5lX8ZxZBdvxj4J/R1XP2DL/InK/yNn/81A3XGp3KX8 a05GGm+nuWAARpGRZXt3K6BKKL8CMqJf4vn/uc3P3LxC6JRPpnrKQm5RMUUZEgCWE3fJ r55XXcdYc/0tuTwWMA6IeZizdlG/wI8FH5Lf/pKBfe4ytnAjyJcc89rtgjeGYQK7WLYG CtAg== X-Gm-Message-State: AOAM530EEtNSMXRwsxrV6Ba3skE90VGLhubpjEZd+Q4PbCAZu/uDOcBu NSBCFSjy++aLBS/XR0AeJs6RN5qV/KCU3Q== X-Received: by 2002:a2e:9a4e:: with SMTP id k14mr10494828ljj.116.1615809297641; Mon, 15 Mar 2021 04:54:57 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id 200sm2688793lfl.2.2021.03.15.04.54.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 04:54:57 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id 40B4A10246E; Mon, 15 Mar 2021 14:55:01 +0300 (+03) Date: Mon, 15 Mar 2021 14:55:01 +0300 From: "Kirill A. Shutemov" To: Hugh Dickins Cc: Andrew Morton , "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v4 00/25] Page folios Message-ID: <20210315115501.7rmzaan2hxsqowgq@box> References: <20210305041901.2396498-1-willy@infradead.org> <20210313123658.ad2dcf79a113a8619c19c33b@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 13, 2021 at 07:09:01PM -0800, Hugh Dickins wrote: > On Sat, 13 Mar 2021, Andrew Morton wrote: > > On Fri, 5 Mar 2021 04:18:36 +0000 "Matthew Wilcox (Oracle)" wrote: > > > > > Our type system does not currently distinguish between tail pages and > > > head or single pages. This is a problem because we call compound_head() > > > multiple times (and the compiler cannot optimise it out), bloating the > > > kernel. It also makes programming hard as it is often unclear whether > > > a function operates on an individual page, or an entire compound page. > > > > > > This patch series introduces the struct folio, which is a type that > > > represents an entire compound page. This initial set reduces the kernel > > > size by approximately 6kB, although its real purpose is adding > > > infrastructure to enable further use of the folio. > > > > Geeze it's a lot of noise. More things to remember and we'll forever > > have a mismash of `page' and `folio' and code everywhere converting > > from one to the other. Ongoing addition of folio > > accessors/manipulators to overlay the existing page > > accessors/manipulators, etc. > > > > It's unclear to me that it's all really worth it. What feedback have > > you seen from others? > > My own feeling and feedback have been much like yours. > > I don't get very excited by type safety at this level; and although > I protested back when all those compound_head()s got tucked into the > *PageFlag() functions, the text size increase was not very much, and > I never noticed any adverse performance reports. > > To me, it's distraction, churn and friction, ongoing for years; but > that's just me, and I'm resigned to the possibility that it will go in. > Matthew is not alone in wanting to pursue it: let others speak. I'm with Matthew on this. I would really want to drop the number of places where we call compoud_head(). I hope we can get rid of the page flag policy hack I made. -- Kirill A. Shutemov