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.6 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 37C65C433E2 for ; Mon, 14 Sep 2020 13:00:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B50C620672 for ; Mon, 14 Sep 2020 13:00:56 +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="tEJgbqYF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B50C620672 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 71B176B0037; Mon, 14 Sep 2020 09:00:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6C8846B0055; Mon, 14 Sep 2020 09:00:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 598726B005A; Mon, 14 Sep 2020 09:00:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0212.hostedemail.com [216.40.44.212]) by kanga.kvack.org (Postfix) with ESMTP id 3F49C6B0037 for ; Mon, 14 Sep 2020 09:00:54 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C06E71803A9E6 for ; Mon, 14 Sep 2020 13:00:53 +0000 (UTC) X-FDA: 77261676786.28.trade40_1410d7c27108 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id CFEFB1922D for ; Mon, 14 Sep 2020 13:00:50 +0000 (UTC) X-HE-Tag: trade40_1410d7c27108 X-Filterd-Recvd-Size: 3731 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Mon, 14 Sep 2020 13:00:50 +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=GWRJyLjdVO4jgh6/sQUjrWOKvqlBp8yIabvH26g1NiE=; b=tEJgbqYFKOssFq0pkK5lWbH6zX fO5X9lF44IVizTHlGGmSxUN+1X7nITBfnKhefQfHkHEkOYr35lniISV2d98LBmUMkKaW3DuqfFLXT qX8AkKNGfddwwixbtmuWresJPjdrvR6m9Y4JyXs2Zuj1EFihMA75ej4/WbM5mkGUgAdfEWRYwdiLp blH5zvYXCoJKadsG8SE6xqeLp9stc4TMFVZJp0pFTK0P0/nZnaWEb3WKvgXplrDz5cbEjKgYHLjt0 8YpSR7LeH6Qvwgbm3GbdYLoupRBLZdWYTu89VZ7AeH+JDS7Q7sDRReNyC0TR1HukUJiMdgNvtV3l7 eLCOBEmA==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHo67-0002zf-Ev; Mon, 14 Sep 2020 13:00:44 +0000 From: "Matthew Wilcox (Oracle)" To: linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" , Andrew Morton , Hugh Dickins , William Kucharski , Johannes Weiner , Jan Kara , Yang Shi , Dave Chinner , linux-kernel@vger.kernel.org Subject: [PATCH v2 00/12] Overhaul multi-page lookups for THP Date: Mon, 14 Sep 2020 14:00:30 +0100 Message-Id: <20200914130042.11442-1-willy@infradead.org> X-Mailer: git-send-email 2.21.3 MIME-Version: 1.0 X-Rspamd-Queue-Id: CFEFB1922D X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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: The critical patch to review here is patch 11, "Handle truncates that split THPs". This code is shared with shmem, and while xfstests passes (both with the tmpfs filesystem and with THPs enabled for XFS), it is terribly subtle. I posted a similar patch series a few weeks ago [1], but this goes a few steps further than that one did. In addition to the unification of find_get_entries() and pagevec_lookup_entries(), this patch series includes: - Only return the head pages from tagged lookups - Factor a lot of common code out of the various batch lookup routines - Add mapping_seek_hole_data() - Only return head pages from find_get_entries I also have a patch to iomap to use mapping_seek_hole_data(), but I'm not including that as part of this batch of patches -- I'll send it through the iomap tree once mapping_seek_hole_data() lands upstream. [1] https://lore.kernel.org/linux-mm/20200819184850.24779-1-willy@infrade= ad.org/ 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 | 267 +++++++++++++++++++++++++++------------- mm/internal.h | 5 + mm/shmem.c | 214 +++++++------------------------- mm/swap.c | 38 +----- mm/truncate.c | 249 ++++++++++++++----------------------- 7 files changed, 329 insertions(+), 453 deletions(-) --=20 2.28.0