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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 1FE57C07E99 for ; Mon, 12 Jul 2021 05:46:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1177960FED for ; Mon, 12 Jul 2021 05:46:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1177960FED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 067F36B008A; Mon, 12 Jul 2021 01:46:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 019006B008C; Mon, 12 Jul 2021 01:46:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E22816B0092; Mon, 12 Jul 2021 01:46:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id B61276B008A for ; Mon, 12 Jul 2021 01:46:31 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id C708B8248047 for ; Mon, 12 Jul 2021 05:46:30 +0000 (UTC) X-FDA: 78352850940.26.008B476 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf26.hostedemail.com (Postfix) with ESMTP id 3D06120019D7 for ; Mon, 12 Jul 2021 05:46:30 +0000 (UTC) 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=EIkXxBU1HNV+v3OiQiTyAs5WzjT0C+SmqQB/RpmsElc=; b=E4e3BtdTYiFYE88DGJiQ6Im7M/ MkAELvomPuJ3JAYz/gvicMC9ejtEZqS2GjCh0og0BVaw8BMIHLgJLRv4Wt7dQLmquDobHF8jERFJZ +Rwl8hmtN444tws8aZ08oEEQ7aaI1GVSJsQ3r+wJXNz39bXwk0CuZdkOMJyrJWjxp3/Qm+2LSv2NX PUknx4Z9724IGaEMd5nw8gQMK98429W4eGMY6ZBxf8e1xWKe15lvx/sy4kCO8Ryq5pm625bi1a6b9 WVmgKCSTAauYabRU8J/GZQmbfuNDQa0LNYFc7wwCfnAzv86sgpFeaZx0MjCazMqzj+RBn+o73Cq18 WXR2ytnA==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m2olZ-00Gusn-72; Mon, 12 Jul 2021 05:46:07 +0000 Date: Mon, 12 Jul 2021 06:46:05 +0100 From: Christoph Hellwig To: "Matthew Wilcox (Oracle)" Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v13 000/137] Memory folios Message-ID: References: <20210712030701.4000097-1-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210712030701.4000097-1-willy@infradead.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=E4e3BtdT; spf=none (imf26.hostedemail.com: domain of BATV@casper.srs.infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=BATV@casper.srs.infradead.org; dmarc=none X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 3D06120019D7 X-Stat-Signature: dpkez9odatonoqb8w3rc8zyd9kw83uqj X-HE-Tag: 1626068790-780955 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 Mon, Jul 12, 2021 at 04:04:44AM +0100, Matthew Wilcox (Oracle) wrote: > Managing memory in 4KiB pages is a serious overhead. Many benchmarks > benefit from a larger "page size". As an example, an earlier iteration > of this idea which used compound pages (and wasn't particularly tuned) > got a 7% performance boost when compiling the kernel. > > Using compound pages or THPs exposes a weakness of our type system. > Functions are often unprepared for compound pages to be passed to them, > and may only act on PAGE_SIZE chunks. Even functions which are aware of > compound pages may expect a head page, and do the wrong thing if passed > a tail page. > > We also waste a lot of instructions ensuring that we're not looking at > a tail page. Almost every call to PageFoo() contains one or more hidden > calls to compound_head(). This also happens for get_page(), put_page() > and many more functions. > > This patch series uses a new type, the struct folio, to manage memory. > It converts enough of the page cache, iomap and XFS to use folios instead > of pages, and then adds support for multi-page folios. It passes xfstests > (running on XFS) with no regressions compared to v5.14-rc1. This seems to miss a changelog vs the previous version. It also includes a lot of the follow ups. I think reviewing a series gets rather hard at more than 30-ish patches, so chunking it up a little more would be useful.