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 X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 451CDC433DB for ; Sun, 14 Mar 2021 03:09:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9271A64ECB for ; Sun, 14 Mar 2021 03:09:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9271A64ECB Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9EFA66B0006; Sat, 13 Mar 2021 22:09:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 99FDA6B006E; Sat, 13 Mar 2021 22:09:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 819FA6B0070; Sat, 13 Mar 2021 22:09:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0019.hostedemail.com [216.40.44.19]) by kanga.kvack.org (Postfix) with ESMTP id 6432D6B0006 for ; Sat, 13 Mar 2021 22:09:14 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 12374824999B for ; Sun, 14 Mar 2021 03:09:14 +0000 (UTC) X-FDA: 77916998628.06.6A41231 Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) by imf20.hostedemail.com (Postfix) with ESMTP id 94FB1132 for ; Sun, 14 Mar 2021 03:09:13 +0000 (UTC) Received: by mail-qk1-f174.google.com with SMTP id g185so28522367qkf.6 for ; Sat, 13 Mar 2021 19:09:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=d9FM6L9sZAo2rrsIX+LBkCTa7GLlkoS/+ZnZfUaJPW8=; b=VpsaiAIWuDHqnqNjIwqWIdgZ3uD96X9TvSKxh2jm8AqRS6twpL3tMOYYyiMPjjyaSX X1iZYqFZpd9Ru5UC/aV+3hWz1zhi/EBXS2fbo9aqMqLkW2G8zPBx4j+pnTL5RoSjwoXq 2nS4KkEguec2wegxlVY60mtloR+mRxUaT/GHPGzVchLzNNRrRZr1jS6kdT3/xyfjX5RK G4DyE1rFaWofqZIDLwmBUmRs8dND6RWFbkNxkBHfk2lwXVMXRx97FGGNY4WGvz2l4LIR fGip9daBy/n4030RhjMLcDPbLcqdC0rnt8F167J+v5fmsHE6kmeApRIKvCNVbY/GF8cK roiA== 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:in-reply-to:message-id :references:user-agent:mime-version; bh=d9FM6L9sZAo2rrsIX+LBkCTa7GLlkoS/+ZnZfUaJPW8=; b=DLe9yMM1ja3PbHH8cwDIgMN2/BqJij2xc2eAf4w1jqcyyH5ntVy9wvPtNdtudXaBXK 9wQVb/F0E5rlfX/Rqxh4VF2+/7p+yMExQeW3TJ4L1rh/s2UgkUG65mUiAoMFzJ9l5JFh VO2L6JRUOTnlB568gOG4psZdTe/saMqIVjba+KUsXye0jVtlDeiwCoIFsGH4qZn6GxkJ t01np99xM8P/vIp7jiW4kfCL8tYuqkjnL2rYCK3iOjiD8IYYbxXvb+Eo/fgzryLpqlL3 RfvpuxjrX45kZ/z1zP6M4J1/CYoZSlKoVP/3XXqsexHRgl89kmkFwOoWgZqHmZbldDWP GfWQ== X-Gm-Message-State: AOAM531f/xbOC1DY7AXLNCUb4hHX79gm5usz/09SA6oky+TUnIDGw7vG m9qeFHew8sQuZgSYLfarzmH3mA== X-Google-Smtp-Source: ABdhPJzdU3lQ5tIu1bVYMh+3OU6wsyRZYbsmX/y79oqjN5rzA3naQ/csu0IRHznx8ME2dAElOZLjgQ== X-Received: by 2002:a37:5007:: with SMTP id e7mr19793266qkb.184.1615691352628; Sat, 13 Mar 2021 19:09:12 -0800 (PST) Received: from eggly.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id s2sm7557978qti.54.2021.03.13.19.09.11 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Sat, 13 Mar 2021 19:09:12 -0800 (PST) Date: Sat, 13 Mar 2021 19:09:01 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Andrew Morton cc: "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 In-Reply-To: <20210313123658.ad2dcf79a113a8619c19c33b@linux-foundation.org> Message-ID: References: <20210305041901.2396498-1-willy@infradead.org> <20210313123658.ad2dcf79a113a8619c19c33b@linux-foundation.org> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Stat-Signature: nxwio6xudqfepjpbfey4dret8wnxfcst X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 94FB1132 Received-SPF: none (google.com>: No applicable sender policy available) receiver=imf20; identity=mailfrom; envelope-from=""; helo=mail-qk1-f174.google.com; client-ip=209.85.222.174 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615691353-533106 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 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. Hugh