Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp681991pxf; Thu, 1 Apr 2021 10:48:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcdYEmVAGfUYOoWPmzLAAG/BoAXNI9EPp23A7nJX90ptxuFNmQJhZZy3Gj6CHmuw5tWFxg X-Received: by 2002:a6b:7a4d:: with SMTP id k13mr7720612iop.39.1617299284243; Thu, 01 Apr 2021 10:48:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617299284; cv=none; d=google.com; s=arc-20160816; b=0cKleN6JLMr3dMiU/JT0OKHTTrIaWFJfZfM7WZteUh7UxGtPK1A3GTEP+xXmue3k09 wJhyK0tLDcIgRKa3NO/eQMMhRVktoqLSWr+BIkLzmAe7XIM8zy4TOabhODnRcOt94hPC iY/2y8sow3u3k98eRQ17vgh7Ta8Krpy80tEreplwhrR1z4UhsQTUjzDXjwesg4XtpyLZ HQIbhEk0fsOyMRp/O0IiKUdfB9EbalFO1B54cv/nNMbOEMRY1Wu89xr4q2SjbKmBI3Rs TdmyVk47bJMaOFKJlcxzhXVt0V1UFS3Qy1xA2w9EQAqJx/qGkilsWXyOHa5QgobF/92J jk8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=WvQa+OFrW5Va5fKOaEC+GHMYXi23ytEjTAR9F/0dm5w=; b=XcZ4fURDiH8cxhmk1pjaLDE/WYQM0wkwqbz1qUDqYJaOfVy88f43ndWlviCSIl7etW 84b0uPUXnFQqz4tH6sIpeypvwANbpyv+Dw6Z9fLlE7ikVxjcwCtOeWbBYKGPS7mDWMhY x8y50t8tU1kLQImywME8dkIAYITrdRyb5HbYDYF/CQlY8leRs180CD0cT4qrqxFhZYO4 B9Yb0fm+wDkpkm+NB4nJxyg4D0uBeRI+24iBHkzOlfWto4K0+GhNaq4E256xI58kLCE7 p8OdKl10L3oQfAIxr9L4PK85UKWaZ62SPwfdoXpfwBdRmGobo/HYEgY6IhaiC68VJEOq AtkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="dS5/st8L"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u6si5722500jad.31.2021.04.01.10.47.49; Thu, 01 Apr 2021 10:48:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="dS5/st8L"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234912AbhDARrj (ORCPT + 99 others); Thu, 1 Apr 2021 13:47:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:51308 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234276AbhDARmQ (ORCPT ); Thu, 1 Apr 2021 13:42:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617298936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WvQa+OFrW5Va5fKOaEC+GHMYXi23ytEjTAR9F/0dm5w=; b=dS5/st8LlnzfBjdUjhyQjDAxhP3/ADkgUncgvw2cral1oyyOKTv7+v46rGXun0mUaYbfnR f/BYLE4Wpliti/PXLkd1brJvuBRSiL3d5Oe6VcenO6j98AadAhvkhRUCceDzkvVSAiZWUw pxCR8i/7wl4KaG/qfDoc2/pPfLOl4Ro= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-561-1JSlI9TwOUazfMMSGAgqbA-1; Thu, 01 Apr 2021 11:41:45 -0400 X-MC-Unique: 1JSlI9TwOUazfMMSGAgqbA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0188F108BD06; Thu, 1 Apr 2021 15:41:44 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-112-58.rdu2.redhat.com [10.10.112.58]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6006D5C237; Thu, 1 Apr 2021 15:41:42 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20210401151339.GE351017@casper.infradead.org> References: <20210401151339.GE351017@casper.infradead.org> <49e123c6702cb6b27f114dfa64157d9a73463fad.camel@hammerspace.com> <3727198.1617285066@warthog.procyon.org.uk> To: Matthew Wilcox Cc: dhowells@redhat.com, Trond Myklebust , "dwysocha@redhat.com" , "linux-nfs@vger.kernel.org" , "Anna.Schumaker@netapp.com" , jlayton@kernel.org, Steve French Subject: Re: RFC: Approaches to resolve netfs API interface to NFS multiple completions problem MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3737151.1617291701.1@warthog.procyon.org.uk> Date: Thu, 01 Apr 2021 16:41:41 +0100 Message-ID: <3737152.1617291701@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Matthew Wilcox wrote: > - I don't understand how a folio gets to be partially cached. Cached > should be tracked on a per-folio basis (like dirty or uptodate), not > on a per-page basis. The point of the folio work is that managing > memory in page-sized chunks is now too small for good performance. Consider the following scenario: (1) You read two 256K chunks from an nfs file. These are downloaded from the server and cached. (2) The nfs inode is dropped from the cache. (3) You do a 1M read that includes both 256K chunks. The VM might create a 1M folio to handle (3) that covers the entire read, but only half of the data is in the cache; the other half has to be fetched from the server. David