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 83419C388F7 for ; Thu, 12 Nov 2020 21:27:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EDD0A2225B for ; Thu, 12 Nov 2020 21:27:25 +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="CrGfwCIv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EDD0A2225B 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 D478E6B0088; Thu, 12 Nov 2020 16:27:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CD0E96B0089; Thu, 12 Nov 2020 16:27:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B24D06B008A; Thu, 12 Nov 2020 16:27:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0199.hostedemail.com [216.40.44.199]) by kanga.kvack.org (Postfix) with ESMTP id 8209D6B0089 for ; Thu, 12 Nov 2020 16:27:10 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 296FC8249980 for ; Thu, 12 Nov 2020 21:27:10 +0000 (UTC) X-FDA: 77477051820.23.girl29_4504d1527309 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id 0779E37606 for ; Thu, 12 Nov 2020 21:27:10 +0000 (UTC) X-HE-Tag: girl29_4504d1527309 X-Filterd-Recvd-Size: 3690 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Thu, 12 Nov 2020 21:27:09 +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=8axyOdS5T903WsgMUOPiWyL+TAWT7lLkDYHasIa5tYA=; b=CrGfwCIv5OsRz2rMW/f1C6GreK 8WiKFwpQ52dYowy5mI7ySWoPoieMlBqoUFlncoa3wFNS6q14Wo52TdrWfhAwxbilawrg+qJRI/8jo SveEmdGtLKoG5/r4RQEmxI4g4dhVRa2YwsRhiU1Vnr7cSK41k6yUCHW6eSHFGszeMoFVVCD9Nxcuq YcX4UtU8UzWgoAyJqU1YbmYY0UgvLX1oysfgHLw/idfKlXoWqkM3iI0xG9WUp810R4Ip7pCRwIIZP ySX3cg0xMCYf2pXWvrmQgFg8jYO+Mz9/JEJLU3ZBczC0dZVZ3YOc7CzxRVxSfoG8TlyGsZIhlF/JW ct2/vhAA==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdK79-0007G0-Hm; Thu, 12 Nov 2020 21:26:43 +0000 From: "Matthew Wilcox (Oracle)" To: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" , akpm@linux-foundation.org, hughd@google.com, hch@lst.de, hannes@cmpxchg.org, yang.shi@linux.alibaba.com, dchinner@redhat.com, linux-kernel@vger.kernel.org Subject: [PATCH v4 00/16] Overhaul multi-page lookups for THP Date: Thu, 12 Nov 2020 21:26:25 +0000 Message-Id: <20201112212641.27837-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. v4: - Add FGP_ENTRY, remove find_get_entry and find_lock_entry - Rename xas_find_get_entry to find_get_entry - Add "Optimise get_shadow_from_swap_cache" - Move "iomap: Use mapping_seek_hole_data" to this patch series - Rebase against next-20201112 Matthew Wilcox (Oracle) (16): mm: Make pagecache tagged lookups return only head pages mm/shmem: Use pagevec_lookup in shmem_unlock_mapping mm/swap: Optimise get_shadow_from_swap_cache mm: Add FGP_ENTRY mm/filemap: Rename find_get_entry to mapping_get_entry mm/filemap: Add helper for finding pages mm/filemap: Add mapping_seek_hole_data iomap: Use 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 fs/iomap/seek.c | 125 ++------------ include/linux/pagemap.h | 6 +- include/linux/pagevec.h | 4 - mm/filemap.c | 351 +++++++++++++++++++++++++--------------- mm/internal.h | 7 +- mm/shmem.c | 218 ++++++------------------- mm/swap.c | 38 +---- mm/swap_state.c | 7 +- mm/truncate.c | 249 +++++++++++----------------- 9 files changed, 390 insertions(+), 615 deletions(-) --=20 2.28.0