Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp411852ybl; Wed, 29 Jan 2020 02:53:17 -0800 (PST) X-Google-Smtp-Source: APXvYqwTkKT8Dn1dhQLhH3jszsMOx1myI6R9sOGNbCgp7mNntqt81csIBTJslmFfrRdpj5/lMeTc X-Received: by 2002:a05:6830:1116:: with SMTP id w22mr2017682otq.216.1580295197792; Wed, 29 Jan 2020 02:53:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580295197; cv=none; d=google.com; s=arc-20160816; b=AIOc0j9mL8zX8owpW/7UnHjFXcpt2q6utfjClNoYbsSFdi+/VCYvY37yfPaIugXOgb LDiOs7sqfkRjr43XnqEZ0EPPIkpIiJVeMY3RE480mNi9va/2LQ3DlmB+Ru5i+NjSqejr dP63CDv+YaJykjRZ7RH7Z1C5SSQ/COi5aV+NXy4M6/B2vPfQJHmhVPxkMKOrvznmQIhx 2jCwL+ytcQvSZQDe7fC2116AUO1QDHhVwIpMjhmC6uMM227rB1zk+s2XwJNT0Nd5SbFH ZdnDxuHuyHVlI8NMAk/yK9boznGY++kRw09WONfZcu/cqHD8ovIzjO4PAObqdjPJFy96 AVsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=xWJyJn0sfT0Zc5yi27vWrHQD81AWkTLfYCa1678fPLo=; b=hGAfc7hu6X2b1CjA3XK9PcrHteQanKWcqkqVCcFSXb87dVISkJttSJFTenYxJtfCwU ghGNq7e1fngMuHCpk6UiJSQLde42Zhe97ctuhRrPJl5Fc7znacCYj8mlLjFDOa12YkZm 4CWtVS+kZYHjy/EEwJ8tMLbUQb3h4IOt0GuKDx0a1TghtdHvtB+mSo9sbHp7kQu034XO r/eNzgZXJMCzSzsXrDz9LvsEOzfXHdOwC1jCLsMPvjC5t7olimJS+g2mLJByGZZ8/X5D j3RclCdrBZlEew5+4vXH7/G8W1TOsUkOBwxCQ7DOAmSgtcqcUZoB9Twr/HmPDzjjBhi3 nQog== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=Gf6CTpyT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r22si888818oic.93.2020.01.29.02.53.06; Wed, 29 Jan 2020 02:53:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=Gf6CTpyT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726067AbgA2Kut (ORCPT + 99 others); Wed, 29 Jan 2020 05:50:49 -0500 Received: from mail-io1-f66.google.com ([209.85.166.66]:46511 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726068AbgA2Kut (ORCPT ); Wed, 29 Jan 2020 05:50:49 -0500 Received: by mail-io1-f66.google.com with SMTP id t26so18059340ioi.13 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=fEbAjxS09WWHOTEfVqfmylmwZvFzxPENsbZtiwDMxgdGSdNQZMZAhVWtBbh0Rbv1Mg 25EUkC3I1W05WOeeBGhq/t8ACcCdOABduf9jWywQ/SGzLUoIK6x9emkePWuwb3Dbn3RZ /nZp83OBnKN0GiTdJ38eMyAEgbe51nIQuLKkyxJzQrNu8vk3yOWw/KFp6hbaIzKMNMhO Yk9YvSA9OTGiN/wMsT6EWqoFb7/ZIAxEwjFm7r+nF7tHMhNR5Bb9/hBrzPpnEg7t88hq vzPOt7xzedAbdOmn393M+orWAXJtTJmPL2ps2o8pN9P6GCFCsygP+7MpOitq7olNYHgW BawQ== X-Gm-Message-State: APjAAAUpqTu/k1b2GdHo9nAKMVuTDTDmC4kyMpHpskQUxi1HIk03Itpj ZDANZq0t8a65fF7IlMjQSvwCAGxdRwRwQFt9tpq2ng== 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" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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