Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2895368pxv; Mon, 12 Jul 2021 04:41:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9usFKgcrsc5WNfmKCDpUesSsj4QpqfOHBZfNInnV5nSxombiAhQZVINbAHHiaQCzoCCbL X-Received: by 2002:a92:c544:: with SMTP id a4mr39183667ilj.266.1626090060324; Mon, 12 Jul 2021 04:41:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626090060; cv=none; d=google.com; s=arc-20160816; b=xxAu9R8al4Af44xLqCopjdOnbVUp1+LTeFXWDN3EjAHykrssI0cxvJ5GTjsP8SJuje ROfrhDo9Cscl8PN2XlifMAg1za5io6fOpvACyIcoZP1cgvqHkon6uyCgECbBluMLeaFf f2+D0gxyiFfGGasz5akTsl4pli/YBx4fk6m8kw4/KuZHDatjP6DHXzN+PKlatXNbfB7W J4iqxvPJDvuRpo6wdc9wM13+fzN0pQin1IXZeJdH8H7iLG5B78W8HhqFYtn4NZ7TktsZ YKSLvdbD4C9kPTRcEYC2yaw+AukULGE5Scmo1ES215rbHijuZgZ7yB2x4bFS6HVYhju9 6dLQ== 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=D5qx3dVKgrH7eIQyjcDlzzDy7QOQdnxbowoXaJPlgMg=; b=k4Y1ppnNMcVUbRCUOyKh9N/FqD2jfjcmixsIdAUVg3BUL+zbsKtuMWU9WKso9/PW6t MCvlqVipqYIqUucWlXtP1cwruKhkYHQpRsb2nTj9/RGZ2qKS1aO20BNfIy4yi6mqZoPm VlsQuxT4/XFGO/35QaAM6pqKbvyq/DDNcpjnKFYuODHZNEixN9pe7Rb621mzfOofqhf4 NgST5LOAOSPdADn/G4R/CbAkgacVkcUbCAgVLG1OkG7QkxnxUZJBn0b+qnqRJazELZYU BA2+EQLRRMFVywVNPaQShiFYXH6UUpRvw31Dr1+Dz7BznSWiTpwglgEcHBtEGeeP8J3y Z36Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=iblrGfKd; 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 v15si6614557jas.5.2021.07.12.04.40.48; Mon, 12 Jul 2021 04:41:00 -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=iblrGfKd; 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 S230497AbhGLLjH (ORCPT + 99 others); Mon, 12 Jul 2021 07:39:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230144AbhGLLjG (ORCPT ); Mon, 12 Jul 2021 07:39:06 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F55CC0613DD; Mon, 12 Jul 2021 04:36:18 -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=D5qx3dVKgrH7eIQyjcDlzzDy7QOQdnxbowoXaJPlgMg=; b=iblrGfKdeb6Ro1mum0SxNGam0d omVYWRsSb97CvbeOIJvvAlaDSBTMePy5R9s/R4m5pUq4MFYqa+WPxpSHStpTmiCaWOQUpmJL2FrlT d8yEVAcmAeiik2gIVICzs+BMVab1AVPku6G1jjkYwF3Az6+bjtrGfjbDV4ICBtV0Lh3DNv/29dPnH nofbAeZ+HSKFzkDxOAy9OcN7uyjGm3LN7WukrdmYul2G5ed44zzN/ucmvq65RG2hz2SH7WaHYKJ9U SBv8crZhOC4WA0PjOPwOY+j3oud3NG4H0QgW+wZYzAk5rgBpesPt2Xc3ErC8eN7BnD6CpRCZ046w5 oyPCjVxQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m2uE7-00HYKa-C6; Mon, 12 Jul 2021 11:36:01 +0000 Date: Mon, 12 Jul 2021 12:35:55 +0100 From: Matthew Wilcox To: Christoph Hellwig 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 12, 2021 at 06:46:05AM +0100, Christoph Hellwig wrote: > 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. I'm not seriously expecting anybody to review 137 patches. It's more for the bots to chew on (which they have done and I'm about to look at their output). I'll be sending mergable subsets (three rounds; the base code, the memcg series and the pagecache series) later this week, once I've addressed the build bot complaints. You've seen all those patches individually by now. My plan is that once those are merged, the rest can proceed in parallel. The block + iomap series is independent, then there's the second pagecache series. The last dozen or so patches still need a bit of work as they were pulled across from the THP tree and at least need better changelogs. Since this works for me, I'm hoping some people will also test and confirm it works for them, and maybe post their own performance numbers to justify all this.