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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 C15B3C388F9 for ; Tue, 3 Nov 2020 17:14:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E27E321556 for ; Tue, 3 Nov 2020 17:14:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E27E321556 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 187AD6B0068; Tue, 3 Nov 2020 12:14:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1120E6B006E; Tue, 3 Nov 2020 12:14:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 04EAA6B0070; Tue, 3 Nov 2020 12:14:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0179.hostedemail.com [216.40.44.179]) by kanga.kvack.org (Postfix) with ESMTP id C6D536B0068 for ; Tue, 3 Nov 2020 12:14:00 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 52294362D for ; Tue, 3 Nov 2020 17:14:00 +0000 (UTC) X-FDA: 77443754640.21.beast48_4f136c3272ba Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin21.hostedemail.com (Postfix) with ESMTP id 23241180442C7 for ; Tue, 3 Nov 2020 17:14:00 +0000 (UTC) X-HE-Tag: beast48_4f136c3272ba X-Filterd-Recvd-Size: 1928 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Tue, 3 Nov 2020 17:13:59 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id A38BA6736F; Tue, 3 Nov 2020 18:13:56 +0100 (CET) Date: Tue, 3 Nov 2020 18:13:56 +0100 From: Christoph Hellwig To: Matthew Wilcox Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, kent.overstreet@gmail.com Subject: Re: [PATCH 15/17] mm/filemap: Don't relock the page after calling readpage Message-ID: <20201103171356.GA18303@lst.de> References: <20201102184312.25926-1-willy@infradead.org> <20201102184312.25926-16-willy@infradead.org> <20201103080045.GN8389@lst.de> <20201103152436.GA27442@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201103152436.GA27442@casper.infradead.org> User-Agent: Mutt/1.5.17 (2007-11-01) 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 Tue, Nov 03, 2020 at 03:24:36PM +0000, Matthew Wilcox wrote: > On Tue, Nov 03, 2020 at 09:00:45AM +0100, Christoph Hellwig wrote: > > On Mon, Nov 02, 2020 at 06:43:10PM +0000, Matthew Wilcox (Oracle) wrote: > > > We don't need to get the page lock again; we just need to wait for > > > the I/O to finish, so use wait_on_page_locked_killable() like the > > > other callers of ->readpage. > > > > As that isn't entirely obvious, what about adding a comment next to > > the wait_on_page_locked_killable call to document it? > > The other callers of ->readpage don't document that, so not sure why > we should here? The callers of ->readpage are a mess :( Many use lock_page or trylock_page, one uses wait_on_page_locked directly, another one uses the wait_on_page_read helper. I think we need a good helper here, and I think it looks a lot like filemap_read_page in your tree..