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=-6.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT 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 638A8C388F9 for ; Mon, 26 Oct 2020 04:15:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C7ABB2076A for ; Mon, 26 Oct 2020 04:14:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="iGOYd9CB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C7ABB2076A 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 1F3ED6B0078; Mon, 26 Oct 2020 00:14:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 129AB6B0073; Mon, 26 Oct 2020 00:14:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EC3106B0078; Mon, 26 Oct 2020 00:14:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0083.hostedemail.com [216.40.44.83]) by kanga.kvack.org (Postfix) with ESMTP id B1E956B0073 for ; Mon, 26 Oct 2020 00:14:27 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 570C2181AC9CB for ; Mon, 26 Oct 2020 04:14:27 +0000 (UTC) X-FDA: 77412759774.03.spoon08_3503a9f27270 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id 3C83028A4E8 for ; Mon, 26 Oct 2020 04:14:27 +0000 (UTC) X-HE-Tag: spoon08_3503a9f27270 X-Filterd-Recvd-Size: 3340 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Mon, 26 Oct 2020 04:14:26 +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=pxEXet7MGL+dPnK3y9N8fU3daWL9JbWFkgKOPtlkptM=; b=iGOYd9CBbXIgHNstxbpWvXuMMn GqHz0Sp4oTweX01lrIEM9Yo3LHZHGOhlomvPCbGgiaOs1ORNj1MvEDmDXZcLYrtiBiVSm2UIgNdPA SA96euAaRO9BxOlVxo1u9QTQSEtj3MrB/Gwvbqps+iB2Uff+KCHwFnQFXPbqGBLx+ZMNIbBSHzmTa wZ+yXY3r20PxmC6dThHpvHR+MTNgiABqVIRnOh62xOfj+gTph7Kwoq0YQUufdltkwwg5gWfFXTRU6 YzrX2WMTjID57kfmoEcevRt76izVSV1sCsFTNnYUPP6C2iuBJUPaIn6/4te//In87HmwfBEEoEAtO gsG47Bhw==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kWtta-0006Zg-8y; Mon, 26 Oct 2020 04:14:10 +0000 From: "Matthew Wilcox (Oracle)" To: linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" , linux-fsdevel@vger.kernel.org, Andrew Morton , Hugh Dickins , Johannes Weiner , Yang Shi , Dave Chinner , linux-kernel@vger.kernel.org Subject: [PATCH v3 00/12] Overhaul multi-page lookups for THP Date: Mon, 26 Oct 2020 04:13:56 +0000 Message-Id: <20201026041408.25230-1-willy@infradead.org> X-Mailer: git-send-email 2.21.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: This THP prep patchset changes several page cache iteration APIs to only return head pages. - It's only possible to tag head pages in the page cache, so only return head pages, not all their subpages. - Factor a lot of common code out of the various batch lookup routines - Add mapping_seek_hole_data() - Unify find_get_entries() and pagevec_lookup_entries() - Make find_get_entries only return head pages, like find_get_entry(). These are only loosely connected, but they seem to make sense together as a series. Another ~30 MM patches to come after this batch to enable THPs for filesystems. Matthew Wilcox (Oracle) (12): mm: Make pagecache tagged lookups return only head pages mm/shmem: Use pagevec_lookup in shmem_unlock_mapping mm/filemap: Add helper for finding pages mm/filemap: Add mapping_seek_hole_data mm: Add and use find_lock_entries mm: Add an 'end' parameter to find_get_entries mm: Add an 'end' parameter to pagevec_lookup_entries mm: Remove nr_entries parameter from pagevec_lookup_entries mm: Pass pvec directly to find_get_entries mm: Remove pagevec_lookup_entries mm/truncate,shmem: Handle truncates that split THPs mm/filemap: Return only head pages from find_get_entries include/linux/pagemap.h | 5 +- include/linux/pagevec.h | 4 - mm/filemap.c | 275 +++++++++++++++++++++++++++------------- mm/internal.h | 5 + mm/shmem.c | 213 +++++++------------------------ mm/swap.c | 38 +----- mm/truncate.c | 249 ++++++++++++++---------------------- 7 files changed, 335 insertions(+), 454 deletions(-) --=20 2.28.0