From patchwork Sun Jan 16 12:18:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 12714550 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7968C433EF for ; Sun, 16 Jan 2022 12:38:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5E10D6B0071; Sun, 16 Jan 2022 07:38:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 58F976B0073; Sun, 16 Jan 2022 07:38:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 47E656B0074; Sun, 16 Jan 2022 07:38:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0225.hostedemail.com [216.40.44.225]) by kanga.kvack.org (Postfix) with ESMTP id 366376B0071 for ; Sun, 16 Jan 2022 07:38:07 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id D632F18210E84 for ; Sun, 16 Jan 2022 12:38:06 +0000 (UTC) X-FDA: 79036102572.29.5C70652 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf30.hostedemail.com (Postfix) with ESMTP id 8BE1880006 for ; Sun, 16 Jan 2022 12:38:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=eO9Mbt8wibF1aSfmoc1KUz0XgzLpgN1Osvl8mSoNdKw=; b=bYZOQ3nmJ8TB9PORAKFQM7uOcs rtzNKqVnVthwUurVGvB5vq+GZ0mpyx4qjPedhwptW1akVFzlVV7j87JYRzbmdN4s4ZHcF+aDA5qOz avTlIvyaKK2dT/LXlCQogCXFbmFMj7ioQC1NT/mXAAMhOJnCI6EXdkHr4Ro7r/2U8ycmpT2K4LyrR Q0f2wggr38mmzXLDt/Cmi88NfQgCNrbon6HQDsOMdThYWNWd4G8GY4GEwV0GtG8x3M+IaSiWxwbud smL7ADwVAA8UMo8SRShmSGVmiyeHEilX22JsQ7R7zeJDXVcZ50Lx1yM1YJzez/NoH8//Od1a1EuDj bwim/oWA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1n94UM-007FU9-3f; Sun, 16 Jan 2022 12:18:26 +0000 From: "Matthew Wilcox (Oracle)" To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" Subject: [PATCH 00/12] Enabling large folios for 5.17 Date: Sun, 16 Jan 2022 12:18:10 +0000 Message-Id: <20220116121822.1727633-1-willy@infradead.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Rspamd-Queue-Id: 8BE1880006 X-Stat-Signature: h8mthbundfzuzthhf6w7d316jpfu8f9b Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=bYZOQ3nm; dmarc=none; spf=none (imf30.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspamd-Server: rspam08 X-HE-Tag: 1642336686-847608 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: Is Linux just too stable for you? Tired of not having your data eaten by a grue? Then it's time to experiment with enabling large folios! You will need: - A recent Linus tree (I used a33f5c380c4b) - To enable CONFIG_TRANSPARENT_HUGEPAGE - An XFS filesystem - Your favourite workload These patches create large folios in the readahead and fault paths. They do not create large folios in the write path; that is future work. For most workloads, this is quite sufficient. You can monitor the sizes of folios being added to the page cache with the mm_filemap_add_to_page_cache tracepoint. As mentioned in the 'Add large folio readahead' commit message, the heuristic for deciding when to enlarge the size of the folio being created is stupid. I'm sure somebody out there can do better. This patchset is not (as far as I'm concerned) a candidate for merging into 5.17. It hasn't been in linux-next, and while it does not introduce any regressions in my testing, I'd be uncomfortable seeing it merged before 5.18. Matthew Wilcox (Oracle) (11): mm: Add folio_put_refs() filemap: Use folio_put_refs() in filemap_free_folio() filemap: Allow large folios to be added to the page cache mm/vmscan: Free non-shmem folios without splitting them mm: Fix READ_ONLY_THP warning mm/vmscan: Optimise shrink_page_list for non-PMD-sized folios mm: Make large folios depend on THP mm/readahead: Add large folio readahead mm/readahead: Switch to page_cache_ra_order mm/filemap: Support VM_HUGEPAGE for file mappings selftests/vm/transhuge-stress: Support file-backed PMD folios William Kucharski (1): mm/readahead: Align file mappings for non-DAX include/linux/mm.h | 20 ++++ include/linux/pagemap.h | 11 +- mm/filemap.c | 69 +++++++---- mm/huge_memory.c | 5 +- mm/internal.h | 4 +- mm/readahead.c | 108 ++++++++++++++++-- mm/vmscan.c | 7 +- tools/testing/selftests/vm/transhuge-stress.c | 35 ++++-- 8 files changed, 204 insertions(+), 55 deletions(-)