Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2689876pxv; Sun, 11 Jul 2021 22:48:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyX61vDsIxeAPQrGArL/hOgS1B6YkM1s09vfaPikgg8mTmhviKn9CpY7I2177dMMhbdrU7/ X-Received: by 2002:a92:a80e:: with SMTP id o14mr36945568ilh.81.1626068929414; Sun, 11 Jul 2021 22:48:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626068929; cv=none; d=google.com; s=arc-20160816; b=g6nETzDooJ+2GCLCST09ixwiLPUZivIywDaSydjdwxbF0h3FpV28Yj1zcodjCM5/UG b2gQQH9FZIC7F4rhBVLR2ogoV7C6TDwQm4yR6YCgXRXodD9yKuvYSAoNAh1IuoIrLRUt hpKZRQ9XByqanNXCp05LeZjmfcSkGDrQrJzijPaVZmlsWwL92xCt0lCYxuKwOqRHFk0C YnAOONqvhYh8po2FSYeWaa50vNGFiACMO6O5cp+At6x2Qb2zC/hNwPgmMU7kT/vtYfJu p8TP8nTiUihaRv0yjvwiP33b3lC43BfR80R+3JdOT0JACdaCVSXRK5CyEGoC2nDNp8xx M1vg== 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=EIkXxBU1HNV+v3OiQiTyAs5WzjT0C+SmqQB/RpmsElc=; b=mF7FL6/6HKFJdVbBfHi8B/yFzeeZy2oQZhNcr8Qvpp5R45UrtFtgfYR0LGaLWMFGTF pQrhQLYKpbhFbQ5V99LOViMlFQbtWRIy1kUjpYJrTdG590D6ytd/BMUuxGWRHTha4AfX U4qeYAy0Iis1lwIRAdf6Xjp5YGcQ2acSHr0b8yniur33m1VDMOD5d2WPTHkCbjDQjEIq 23s1qmVOuFl84+ujQqHgVW5QQiHXY+FK3ps9MuAbEwhOy4WmNo8yb27pW55CtEPSvMks lgefYOcB9KEJBdDS/fE8U+d36xp1/99Px7hSbqExcyUiEXMmpBVrp34u3T9z3S/uH/at cT6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=E4e3BtdT; 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 z24si6210502jap.49.2021.07.11.22.48.37; Sun, 11 Jul 2021 22:48:49 -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=E4e3BtdT; 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 S231351AbhGLFtS (ORCPT + 99 others); Mon, 12 Jul 2021 01:49:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230107AbhGLFtR (ORCPT ); Mon, 12 Jul 2021 01:49:17 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D532C0613DD; Sun, 11 Jul 2021 22:46:30 -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=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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.