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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 85A98C4727C for ; Mon, 28 Sep 2020 20:13:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C9CFB205ED for ; Mon, 28 Sep 2020 20:13:40 +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="Hh0jWyOL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C9CFB205ED 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 460036B005D; Mon, 28 Sep 2020 16:13:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 40FB26B006E; Mon, 28 Sep 2020 16:13:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 325886B0070; Mon, 28 Sep 2020 16:13:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0222.hostedemail.com [216.40.44.222]) by kanga.kvack.org (Postfix) with ESMTP id 1AF1B6B005D for ; Mon, 28 Sep 2020 16:13:40 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id C8B89364C for ; Mon, 28 Sep 2020 20:13:39 +0000 (UTC) X-FDA: 77313570558.22.bear52_050441327184 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 7CC6918038E60 for ; Mon, 28 Sep 2020 20:13:39 +0000 (UTC) X-HE-Tag: bear52_050441327184 X-Filterd-Recvd-Size: 3972 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Mon, 28 Sep 2020 20:13:38 +0000 (UTC) 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=t2Q0uIBZ/RzOgL5GzysOkr7fCQhRlmEFsQdJ/RR5oT0=; b=Hh0jWyOLmF2ubwBcGSJg9VHd0c 00enI/j0nkFWm9hZNU3/FCYw7ZgJ0g8eCVenH3BCTKdaYtaTQFNYEveagYc51mzw+FQiUPpLgkWJH FZARv2Fb0LOfTartGA6NV2F1P5kRnIAR3ZfizO1mWvGGG8jN+HcuFWhwYvBY8yxXon7TJzLXirxGJ KxkwaeI7DYNuwgI6LOEsAURn4Z7d8PZmnBMiLrm4AFjuhl5NdBeL/NQm41JtJrJ0ENMIIsWFFZyEv EltP7D0BscL07X6zUliaCskgs24B2vaeSADDRMdPyBKk01rEH9lZ2BuxT+y1JwRYg8rVw2Oc7neIW 32u1/wOQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kMzWg-00022X-DV; Mon, 28 Sep 2020 20:13:34 +0000 Date: Mon, 28 Sep 2020 21:13:34 +0100 From: Matthew Wilcox To: linux-mm@kvack.org Cc: Andrew Morton , Hugh Dickins , William Kucharski , Johannes Weiner , Jan Kara , Yang Shi , Dave Chinner , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 00/12] Overhaul multi-page lookups for THP Message-ID: <20200928201334.GC30994@casper.infradead.org> References: <20200914130042.11442-1-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200914130042.11442-1-willy@infradead.org> 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: ping On Mon, Sep 14, 2020 at 02:00:30PM +0100, Matthew Wilcox (Oracle) wrote: > 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@infradead.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(-) > > -- > 2.28.0 >