Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp894949pxb; Tue, 9 Feb 2021 15:54:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzEEfWFY9pFltFE/49XiSnO7ERHvYC8y8/tw2T4Viq/CzlP8Q7o6nWSs3NTQ4HfpLZO13eT X-Received: by 2002:a05:6402:164a:: with SMTP id s10mr627141edx.37.1612914889487; Tue, 09 Feb 2021 15:54:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612914889; cv=none; d=google.com; s=arc-20160816; b=gqLICyaJ+ytp6GY8Nni6ongecEaw8dXy1O6Y3/aBRJGBVoTWUM+N4a02lyJYnm1/BC Rb1FuWZH4rPR89AattUrLfhlg4TWyxgqU2gm+eMMDZAuVqqV5tkkgEmR3CzQdCV5sCPu js/cKzpLJKZqeVywtCzmhE0AjSBH9SCw30hdb4/8gRKDI4Q+Of6AdCzVWX3e+Nzi8Rid o5pqkf1QS6HgL1caWtpUKXrHxSwunhfRqOhgXOgpqAkiaQ07pAcSpe/tTlQPsFFLojSv hg32HV8il8gH4odtMDfrsES+3gpcMXFAo/6XLseALb3OjiquqpvKJoBnmlm1EBVCoz2G 4msQ== 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=njyj2XCXYGtI5AX/JV14IYXR8Ipi7RDaSVkhJ8oSglg=; b=WAvgtmpQbbvNgdKFBH8T+i4UhKBYMx9dFtuoEIyI9MhLuFaqbaMGR4aC+xmECWjDW6 ioSk4QTMuUM1zkZ7dH+x3EyMDLmwZmCLY8y69gyAPj57YCLiy0KIzqO8Y/keHICfdTY+ E94BEHlqCb6e/WyZcOTfYNYaZoA+ndVc6JaKHclNT2ZrDleIx1t8H5f6od3gjsWWEKrf cRmw0rhE/NgxMsooVs7WRE3XPCXH2UcpdOVaYwQ5Wi4+YOvF+3zLpgWPGLfNC0GEQLaZ 9hE8hlgzwtaxqseuMWUSRan5jVmy/0D3MV6/OAEzroFODMVplFFpL8MXgAkZvcDJhtS6 uA1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UefyHNbY; 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 gz20si125007ejb.241.2021.02.09.15.54.16; Tue, 09 Feb 2021 15:54:49 -0800 (PST) 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=UefyHNbY; 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 S234129AbhBIXwD (ORCPT + 99 others); Tue, 9 Feb 2021 18:52:03 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:50090 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234138AbhBIWOy (ORCPT ); Tue, 9 Feb 2021 17:14:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612908799; 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=njyj2XCXYGtI5AX/JV14IYXR8Ipi7RDaSVkhJ8oSglg=; b=UefyHNbYqf67ArC+LWa8eLd98C3qghKmJwIrkefcPmete97BHKJ8kVaCMYTUlVKaKp6JDm 4lxRpzoN4OOZBsbR6GWx29Hw1owF5xXPS/OD4rB8zFQCBoCyTfCQLpyAPtcXjtXwjDWKFs lLYV+clM+k6eG4raJ1cb+/XmpjJVLnI= 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-166-Ez0mEz_fP32izAfxafFp3w-1; Tue, 09 Feb 2021 16:25:32 -0500 X-MC-Unique: Ez0mEz_fP32izAfxafFp3w-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B7E8FCC626; Tue, 9 Feb 2021 21:25:30 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-115-23.rdu2.redhat.com [10.10.115.23]) by smtp.corp.redhat.com (Postfix) with ESMTP id E044519C78; Tue, 9 Feb 2021 21:25:23 +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: <20210209202134.GA308988@casper.infradead.org> References: <20210209202134.GA308988@casper.infradead.org> <591237.1612886997@warthog.procyon.org.uk> To: Matthew Wilcox Cc: dhowells@redhat.com, Linus Torvalds , Jeff Layton , David Wysochanski , Anna Schumaker , Trond Myklebust , Steve French , Dominique Martinet , Alexander Viro , ceph-devel@vger.kernel.org, linux-afs@lists.infradead.org, linux-cachefs@redhat.com, CIFS , linux-fsdevel , "open list:NFS, SUNRPC, AND..." , v9fs-developer@lists.sourceforge.net, Linux Kernel Mailing List Subject: Re: [GIT PULL] fscache: I/O API modernisation and netfs helper library MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <618608.1612905923.1@warthog.procyon.org.uk> Date: Tue, 09 Feb 2021 21:25:23 +0000 Message-ID: <618609.1612905923@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Matthew Wilcox wrote: > Yeah, I have trouble with the private2 vs fscache bit too. I've been > trying to persuade David that he doesn't actually need an fscache > bit at all; he can just increment the page's refcount to prevent it > from being freed while he writes data to the cache. That's not what the bit is primarily being used for. It's being used to prevent the starting of a second write to the cache whilst the first is in progress and also to prevent modification whilst DMA to the cache is in progress. This isn't so obvious in this cut-down patchset, but comes more in to play with full caching of local writes in my fscache-iter branch. I can't easily share PG_writeback for this because each bit covers a write to a different place. PG_writeback covers the write to the server and PG_fscache the write to the cache. These writes may get split up differently and will most likely finish at different times. If I have to share PG_writeback, that will mean storing both states for each page somewhere else and then "OR'ing" them together to drive PG_writeback. David