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.5 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 7B3E4C2D0A3 for ; Sun, 1 Nov 2020 11:20:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D46322085B for ; Sun, 1 Nov 2020 11:20:39 +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="XpMCbKkN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D46322085B 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 390846B0070; Sun, 1 Nov 2020 06:20:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 342436B0072; Sun, 1 Nov 2020 06:20:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 257A46B0073; Sun, 1 Nov 2020 06:20:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0142.hostedemail.com [216.40.44.142]) by kanga.kvack.org (Postfix) with ESMTP id EDF296B0070 for ; Sun, 1 Nov 2020 06:20:38 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 9ED61181AEF1A for ; Sun, 1 Nov 2020 11:20:38 +0000 (UTC) X-FDA: 77435606556.22.birth46_5f17513272a6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 7A5D218038E60 for ; Sun, 1 Nov 2020 11:20:38 +0000 (UTC) X-HE-Tag: birth46_5f17513272a6 X-Filterd-Recvd-Size: 2265 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Sun, 1 Nov 2020 11:20:36 +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=XP0ktuKFVEjKCr/aKj+0RFycxoJenodAvemu+mBbN+s=; b=XpMCbKkNBAQZfANnvHYW4hKUPw X/J3MGVTBbdZqcROukoYfpxTmrR7kuiX5P59xTHonPZvF74HDYypX9hSYOFU4TlSEiqbUc3oOid24 i98Sh0rpgt8FWSSfDExqzbiH0f2erGcyczwY8qHO3tywOPESRYiaCvOFdcJH7m0cCZuMNjtM9votn D3PqVDJCYVARL6WIHFwql1Up4qMLPJEXX4k8eKIWXtW54axHB0roYgd5cxBMnIPekIr1CJiZknhJL dju1Uf1XMNQEcjLX5NRVCm4IKNyqQjYWiRRUAwGnwsOed6/6arUBRsr0vkOCW4cA7Lj6K2dIq16t4 aYPXyzkQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZBPR-0003vU-Jq; Sun, 01 Nov 2020 11:20:29 +0000 Date: Sun, 1 Nov 2020 11:20:29 +0000 From: Matthew Wilcox To: Christoph Hellwig Cc: Andrew Morton , Kent Overstreet , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 10/13] mm: open code readahead in filemap_new_page Message-ID: <20201101112029.GX27442@casper.infradead.org> References: <20201031090004.452516-1-hch@lst.de> <20201031090004.452516-11-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201031090004.452516-11-hch@lst.de> 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: On Sat, Oct 31, 2020 at 10:00:01AM +0100, Christoph Hellwig wrote: > Calling filemap_make_page_uptodate right after filemap_readpage in > filemap_new_page is rather counterintuitive. The call is in fact > only needed to issue async readahead, and is guaranteed to return > just after that because the page is uptodate. Just open code the > readahead related parts of filemap_make_page_uptodate instead. Oh, you got rid of it again ;-) It's still not possible for this page to have Readahead set on it -- it was only just created, and can't possibly have been created by an earlier readahead call.