Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp834014pxb; Tue, 9 Feb 2021 13:55:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJxWaylPFNfDR4Ogeiy4uKoCHHaK5xQx+sO3HkFOugl6wveL/mTztcRe6wF1nBgD/tTIor9h X-Received: by 2002:aa7:d3c7:: with SMTP id o7mr125684edr.23.1612907727591; Tue, 09 Feb 2021 13:55:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612907727; cv=none; d=google.com; s=arc-20160816; b=JJuhPSQSdla+i15glpMSNpDYpWISAACW+OBAY+pqOVAt5JrtG/t1D6bJvPAR0FRhuC o7PjKBxpsXcmHTygcQRTTN2ynhFvniv+dm2E8KxD1+t0Esd9hIHOKRMe3FENQLX8qX4Y PYACCWIAW9IcFLcgjGxnF+GBQxv9IS4t30i1KOtRk4KTDCO8tAM2+smhZf2vDjpoZ/9f 8kvny/XBUq4zmbCoc4OK9q80gYbfwuGNP1A70/z2n/IATOGIkNMbYRQd1nyj5e0Z8kWz y3RZvXnHvw8BKa7cE21SmyKL3Q93/SUQyIoeCn+5SJTUzLgdD16zon6GASFidbSbSsar N91A== 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=GNTsEzyoPupLf8uFnqlZZbYFAgQKr7S0geejlS5p7yc=; b=BlpSs+uj3mK3YFOfILbOqIIeugB+0zDzhm1cCvQwT/bQvoJlHDwksPH+T+eD9PiBq9 7xEjrkWZBkxSHb5SR3G78m5ZrSFEYytOZ4CJER49TAPDn2h4Cb9Oe973KmBvB3SKG9Ch QxEWaWMEJkrksUeXU2T+dImR336M5YJs2+Kn2LgDJp2X3UayPLGF944e+EPD6DBrUcCc EmfKxYnzognady87UNgmSft/LPyy0xVWlJZ0JWbWwi4aylWTPwXv91epFdQSpd5CbLHL tqyBSuAjdi6L3/Tp4h9PnhD1tmkVZdz5Rp56Is0DAA7xwEYzWiHr9avqjM8ztKGSUlMh G3fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NwE00wUn; 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 n26si14300058ejg.362.2021.02.09.13.54.51; Tue, 09 Feb 2021 13:55:27 -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=NwE00wUn; 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 S234041AbhBIVvV (ORCPT + 99 others); Tue, 9 Feb 2021 16:51:21 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:36074 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234341AbhBIVM6 (ORCPT ); Tue, 9 Feb 2021 16:12:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612905054; 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=GNTsEzyoPupLf8uFnqlZZbYFAgQKr7S0geejlS5p7yc=; b=NwE00wUnTmWinZOjuNB7AiatJFzVCKQi/g/j2s0gQNgywvudSlMJZXBX6n38eKXCOEIEQA b4bmeBRtFIS1tACYOp3auadFwW5C56pMwASewTgi0M9CL/oBieKXFJ1XL1/jmBBljWTUuM vAbkGn9//QMfcqSTpgvbAyWK98Sgs5Y= 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-246-zfMDn4FfM1uj1j28ps60sQ-1; Tue, 09 Feb 2021 16:10:52 -0500 X-MC-Unique: zfMDn4FfM1uj1j28ps60sQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 199F0107ACC7; Tue, 9 Feb 2021 21:10:50 +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 BDE796062F; Tue, 9 Feb 2021 21:10:43 +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: References: <591237.1612886997@warthog.procyon.org.uk> To: Linus Torvalds Cc: dhowells@redhat.com, Matthew Wilcox , 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: <617684.1612905042.1@warthog.procyon.org.uk> Date: Tue, 09 Feb 2021 21:10:42 +0000 Message-ID: <617685.1612905042@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Linus Torvalds wrote: > The PG_fscache bit waiting functions are completely crazy. The comment > about "this will wake up others" is actively wrong, You mean this? /** * unlock_page_fscache - Unlock a page pinned with PG_fscache * @page: The page * * Unlocks the page and wakes up sleepers in wait_on_page_fscache(). Also * wakes those waiting for the lock and writeback bits because the wakeup * mechanism is shared. But that's OK - those sleepers will just go back to * sleep. */ Actually, you're right. The wakeup check func is evaluated by the waker-upper. I can fix the comment with a patch. > and the waiting function looks insane, because you're mixing the two names > for "fscache" which makes the code look totally incomprehensible. Why would > we wait for PF_fscache, when PG_private_2 was set? Yes, I know why, but the > code looks entirely nonsensical. IIRC someone insisted that I should make it a generic name and put the accessor functions in the fscache headers (which means they aren't available to core code), but I don't remember who (maybe Andrew? it was before mid-2007) - kind of like PG_checked is an alias for PG_owner_priv_1. I'd be quite happy to move the accessors for PG_fscache to the linux/page-flags.h as that would simplify things. David