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=2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,URIBL_DBL_ABUSE_MALW 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 468A0C35240 for ; Wed, 29 Jan 2020 10:50:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E962720732 for ; Wed, 29 Jan 2020 10:50:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b="Gf6CTpyT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E962720732 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=szeredi.hu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 658EB6B0007; Wed, 29 Jan 2020 05:50:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 609BF6B0008; Wed, 29 Jan 2020 05:50:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4F8B96B000A; Wed, 29 Jan 2020 05:50:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0008.hostedemail.com [216.40.44.8]) by kanga.kvack.org (Postfix) with ESMTP id 39C546B0007 for ; Wed, 29 Jan 2020 05:50:50 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id EF0382DFD for ; Wed, 29 Jan 2020 10:50:49 +0000 (UTC) X-FDA: 76430353818.23.plate11_7315c747c84e X-HE-Tag: plate11_7315c747c84e X-Filterd-Recvd-Size: 3332 Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Wed, 29 Jan 2020 10:50:49 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id c16so18058049ioh.6 for ; Wed, 29 Jan 2020 02:50:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xWJyJn0sfT0Zc5yi27vWrHQD81AWkTLfYCa1678fPLo=; b=Gf6CTpyTECKUTC/bnNsYZb4GH5leoYRRcnPTp/KFi5JNN2XMLYSfBihxGeTsEnp2ln C44X0C640MPWJZyTWqRyHbZRRHCdrh4gjmkUk63NkrWuXsI505/vERefKnBHYvNT0O3u n8U5fx/OyDpaZcvna3pGyEuw8SqEvSaEVn+Ic= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xWJyJn0sfT0Zc5yi27vWrHQD81AWkTLfYCa1678fPLo=; b=E46y9XT32w82VAlKc1vTBUXkohrT7NPddFkxlP7d/zXMHVxmIWI0fA3XVG4YUNj3sm nTFkl7f8qA6GT56N8U+55NBIkhYUb82lX91BiWkrqF3Pm1i/kRSj9HUsAWk7iHQv4lG4 X3EWU3aINO+PG6PMGuVsX85g5juS3ZOKVaLzVHgFok2/07WQ/b7gcy+FyS5yEWokWOAz CSIwXKZl1cA8JdNzaufx7ZcAPBE1hTfjWFZez15Jo86Af6XxhrXZFMAnDMfBhastslfe Gakk4z3vCT1ZNbV85WYF+k1OgWf6G7FEVN0OUo4UPKaBe1O505p821UtEyH7lUaWPi6s eJ4w== X-Gm-Message-State: APjAAAX5rsFEDHopDn7xd2K1zECLuem1sgrOuKztppBx0ctcfjw4kHP9 z4dSe/W3WEL7d7HX5YGU6A7OT07qKA0QVmO3xuqYCQ== X-Google-Smtp-Source: APXvYqyMwMa1EZLvilOnOqucjHfFowYylcPwKRIaPLXouVwygD13i61Qx/FolEShfxCTy2yX3s8VN1aTQydpbYCRsB8= X-Received: by 2002:a05:6638:3b6:: with SMTP id z22mr21031873jap.35.1580295048355; Wed, 29 Jan 2020 02:50:48 -0800 (PST) MIME-Version: 1.0 References: <20200125013553.24899-1-willy@infradead.org> <20200125013553.24899-12-willy@infradead.org> In-Reply-To: <20200125013553.24899-12-willy@infradead.org> From: Miklos Szeredi Date: Wed, 29 Jan 2020 11:50:37 +0100 Message-ID: Subject: Re: [PATCH 11/12] fuse: Convert from readpages to readahead To: Matthew Wilcox Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000065, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, Jan 25, 2020 at 2:36 AM Matthew Wilcox wrote: > > From: "Matthew Wilcox (Oracle)" > > Use the new readahead operation in fuse. Switching away from the > read_cache_pages() helper gets rid of an implicit call to put_page(), > so we can get rid of the get_page() call in fuse_readpages_fill(). > We can also get rid of the call to fuse_wait_on_page_writeback() as > this page is newly allocated and so cannot be under writeback. Not sure. fuse_wait_on_page_writeback() waits not on the page but the byte range indicated by the index. Fuse writeback goes through some hoops to prevent reclaim related deadlocks, which means that the byte range could still be under writeback, yet the page belonging to that range be already reclaimed. This fuse_wait_on_page_writeback() is trying to serialize reads against such writes. Thanks, Miklos