From: Nick Piggin Subject: Re: [PATCH 23/43] CacheFiles: Permit the page lock state to be monitored [ver #46] Date: Fri, 3 Apr 2009 02:37:25 +1100 Message-ID: <200904030237.25893.nickpiggin@yahoo.com.au> References: <20090401230321.28177.12010.stgit@warthog.procyon.org.uk> <20090401230520.28177.61387.stgit@warthog.procyon.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, nfsv4@linux-nfs.org, viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org To: David Howells Return-path: In-Reply-To: <20090401230520.28177.61387.stgit@warthog.procyon.org.uk> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: nfsv4-bounces@linux-nfs.org Errors-To: nfsv4-bounces@linux-nfs.org List-Id: linux-fsdevel.vger.kernel.org On Thursday 02 April 2009 10:05:20 David Howells wrote: > Add a function to install a monitor on the page lock waitqueue for a particular > page, thus allowing the page being unlocked to be detected. > > This is used by CacheFiles to detect read completion on a page in the backing > filesystem so that it can then copy the data to the waiting netfs page. I prefer to nack this because it is exporting details of the page locking mechanism. unlock_page is very heavyweight in large part because of the memory barriers and cacheline required to check the waitqueue. I have patches to avoid all that if the page lock is not contended. What's wrong with using wait_on_page_locked, like everyone else does?