Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2269686pxv; Sat, 24 Jul 2021 10:31:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0gGFZdn4FrxEkWGyM2ecy6dir4KUsB/qWiz5PMrmzXcYkScJgUp1gR202gH+inhangsIK X-Received: by 2002:a17:906:eda7:: with SMTP id sa7mr9930594ejb.135.1627147875444; Sat, 24 Jul 2021 10:31:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627147875; cv=none; d=google.com; s=arc-20160816; b=sRQ9ld8ovPQM1SGTXDaLDkUkxnvN9/EVkOl8/M5gRQC1nRg9hvst59U40A7zZyT0Mr knYbr5pLuIhwcr6aHrXUDqzkWXrWbLskNrMDOvhSR1vx9JEOXbfOnuaTx7CyhZCU7kiz 5zqewqnR+OgV1dXkduBsRGKBKIgLnBkauXNoKzXfZD8PHE3+50t/gheSoPm0d1pnFS59 lJfZrYH/qJBoCMbUXVIh6+RDUgW6KO9PLj62F9PBDCQCHswNvYcbwwM9k/VKOt//tiAw LB0eDcIkYeVC0I7zg3TTOarsGfA4jxIgHi1Abs6pkFkFHLeo5u4hHbo7kLsCSvTHPtsT fb0A== 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=R/q2OUFHGHnNOj2YWSRkzWiiQH0hVUMtLRqj4jzPJgI=; b=e3VBxMlubXDt8eDOa7zoKXjs7+m1gT3tJuf+mnrWRnaKsL1C5bumfu+hRq8bXcu7ir mw2I05Ui5xIKja1vYILJ6y5R71Sfkpd1ZjQveJHg3l777VCySpS0LmX77LpNn37BJlcr cK6j7RPhB2SeuU/ieu4wE+arOvscg3MvNz0q90YNI818TijBKDAo2B9n5qlv5WQy+Drf 1o5qbGttwJsCYe8R7WH3w8QXE7CL/makCEmC6azKjIkiIAjcrxkeAteUE++LVlVv1Fyx TGU8UTXD++KkHKHN6VCy+WSzW+B3FGE3tbktyxYoEpGsFLNeJPaXLfx8jYH4QHgnMAzT Yp1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=gky8adRO; 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 s18si43538115eji.655.2021.07.24.10.30.52; Sat, 24 Jul 2021 10:31:15 -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=gky8adRO; 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 S229733AbhGXQri (ORCPT + 99 others); Sat, 24 Jul 2021 12:47:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbhGXQri (ORCPT ); Sat, 24 Jul 2021 12:47:38 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D640C061575; Sat, 24 Jul 2021 10:28:10 -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=R/q2OUFHGHnNOj2YWSRkzWiiQH0hVUMtLRqj4jzPJgI=; b=gky8adROBWilg+idqPXV+hW/r0 G/T/24vDtwXzirAYXoSMJL0OFgxbeHHb9dBijq4Hdx5aE6ruopVRBxiNXg2Ru35hosdK1HjAHxn/L joFlAgkSTuo3tM9QI2DL+fMGt/rqtTCt10rMHmMv2Ze0SqKAqsm66VYhMw0/sCZmm7L6yObMp6Qfr /GrFP39f5wcfT8XHXRgyZRasl1YekSlNMRiLjuKPKh23854ciMhfGFy+3C8SeaFYhPyWbChjaQMNY SfiprTA4hFxIL3DoJyBPydDPdFdnOpj5u5AXMLIbMVm50LnUiwZe204L/IG6oW/40+uEkeuSnX2gr rtbRNriA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m7LRB-00CQK6-H6; Sat, 24 Jul 2021 17:28:00 +0000 Date: Sat, 24 Jul 2021 18:27:45 +0100 From: Matthew Wilcox To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Linus Torvalds , Andrew Morton , "Darrick J. Wong" , Christoph Hellwig , Andres Freund , Michael Larabel Subject: Folios give an 80% performance win Message-ID: References: <20210715033704.692967-1-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210715033704.692967-1-willy@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 15, 2021 at 04:34:46AM +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. I want to thank Michael Larabel for his benchmarking effort: https://www.phoronix.com/scan.php?page=news_item&px=Folios-v14-Testing-AMD-Linux I'm not too surprised by the lack of performance change on the majority of benchmarks. This patch series is only going to change things for heavy users of the page cache (ie it'll do nothing for anon memory users), and it's only really a benefit for programs that have good locality. What blows me away is the 80% performance improvement for PostgreSQL. I know they use the page cache extensively, so it's plausibly real. I'm a bit surprised that it has such good locality, and the size of the win far exceeds my expectations. We should probably dive into it and figure out exactly what's going on. Should we accelerate inclusion of this patchset? Right now, I have 89 mm patches queued up for the 5.15 merge window. My plan was to get the 17 iomap + block patches, plus another 18 page cache patches into 5.16 and then get the 14 multi-page folio patches into 5.17. But I'm mindful of the longterm release coming up "soon", and I'm not sure we're best served by multiple distros trying to backport the multi-page folio patches to either 5.15 or 5.16.