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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 D56A1C433C1 for ; Sat, 27 Mar 2021 14:07:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A2987619DC for ; Sat, 27 Mar 2021 14:07:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229990AbhC0N5h (ORCPT ); Sat, 27 Mar 2021 09:57:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbhC0N5Q (ORCPT ); Sat, 27 Mar 2021 09:57:16 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCA6AC0613B1 for ; Sat, 27 Mar 2021 06:57:14 -0700 (PDT) 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=ZnPJEvg720MqsJlu1D8oGiNufauXiPNX/u3K2X67tWw=; b=mcXByG8FDJfjeqSYIAx3laXuS4 golaKZklplYatYpR85nYqfLrKp0hCqhu9EjIOsqg6Da+FpmWdJifFe5b09KRugbuhtByXQEtzQPXI fF4+NFTTyVK2nQMsCPkjFs6NgiUX0XJn0IfNVACTWID0pJw5xZRkkZFtZ6VnMu09kFoXS/xy8kXTF CLuLgooznMnM7NgJQxypg4VBgTFZkZp4FBohKhTcBateFn3CPEzCvmJtrfzMzE9slLSf4H55X7xgJ qfxsT6DTpPKvL05gUnMuc7jcwnKIllCpbGE3qmEUUJZz8m3fVKAxtLPb9RMjyKU91LPu7R9Kq+NKn pDWZwxLA==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lQ9Qy-00GR9P-0U; Sat, 27 Mar 2021 13:57:04 +0000 Date: Sat, 27 Mar 2021 13:56:59 +0000 From: Matthew Wilcox To: David Howells Cc: Mike Marshall , linux-fsdevel Subject: Re: [RFC PATCH v2] implement orangefs_readahead Message-ID: <20210327135659.GH1719932@casper.infradead.org> References: <20210327035019.GG1719932@casper.infradead.org> <20210201130800.GP308988@casper.infradead.org> <2884397.1616584210@warthog.procyon.org.uk> <1507388.1616833898@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1507388.1616833898@warthog.procyon.org.uk> Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Sat, Mar 27, 2021 at 08:31:38AM +0000, David Howells wrote: > However, in Mike's orangefs_readahead_cleanup(), he could replace: > > rcu_read_lock(); > xas_for_each(&xas, page, last) { > page_endio(page, false, 0); > put_page(page); > } > rcu_read_unlock(); > > with: > > while ((page = readahead_page(ractl))) { > page_endio(page, false, 0); > put_page(page); > } > > maybe? I'd rather see that than open-coded use of the XArray. It's mildly slower, but given that we're talking about doing I/O, probably not enough to care about.