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=-6.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 64541C43381 for ; Wed, 10 Feb 2021 00:43:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2C0D264E4F for ; Wed, 10 Feb 2021 00:43:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233760AbhBJAnY (ORCPT ); Tue, 9 Feb 2021 19:43:24 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:54071 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234339AbhBIVM6 (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-kernel@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