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=-10.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 00FD5C433E0 for ; Wed, 24 Feb 2021 16:59:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B695264F09 for ; Wed, 24 Feb 2021 16:59:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235960AbhBXQ66 (ORCPT ); Wed, 24 Feb 2021 11:58:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235926AbhBXQ6q (ORCPT ); Wed, 24 Feb 2021 11:58:46 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EF0DC06174A for ; Wed, 24 Feb 2021 08:58:05 -0800 (PST) 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=PfWCmza47JW+IbRVssMx5/wjrLqy2TFMYziwljasB28=; b=YXbmDRERPh7zav8Sh+zSYo4nSV 89ODAQ3f3F1VgFBrZs0EQzknFKdwZYGFkn/vsp0kCxSeJG4lJxKNrbLk6trDujiVZIBAbVuh1b/Ek 52BMp54ALNHrU/FMAaBy1gS0zbe0OBBZMZomKKIn/doB3HulY/0KbRQeQAlBtfC7FFdqtDrdPfe6a ZPLztUdiB7PReoMw9H1S6A15W5HccrhvXmEx8/TLXwNhHrP/XiAv1mk6mctSCjUaqmCglSwCG89Fk E/PdQJBouGPd4/cL5zpB2SXyo+6JaWjqt6tC0dgh6hCzgTgpipldmGBTvi4EgpdfwT7tKWDLdWEk9 kgnlHd6w==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lExTw-009eED-Q2; Wed, 24 Feb 2021 16:57:52 +0000 Date: Wed, 24 Feb 2021 16:57:48 +0000 From: Matthew Wilcox To: Jens Axboe Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org Subject: Re: [PATCH 2/3] mm: use filemap_range_needs_writeback() for O_DIRECT reads Message-ID: <20210224165748.GS2858050@casper.infradead.org> References: <20210224164455.1096727-1-axboe@kernel.dk> <20210224164455.1096727-3-axboe@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210224164455.1096727-3-axboe@kernel.dk> Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed, Feb 24, 2021 at 09:44:54AM -0700, Jens Axboe wrote: > For the generic page cache read helper, use the better variant of checking > for the need to call filemap_write_and_wait_range() when doing O_DIRECT > reads. This avoids falling back to the slow path for IOCB_NOWAIT, if there > are no pages to wait for (or write out). > > Signed-off-by: Jens Axboe Reviewed-by: Matthew Wilcox (Oracle)