From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: [PATCH] fs/locks.c: prepare for BKL removal Date: Sat, 18 Sep 2010 07:48:20 -0600 Message-ID: <20100918134819.GB25139@parisc-linux.org> References: <1284815371-5843-1-git-send-email-arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, Matthew Wilcox , Christoph Hellwig , Trond Myklebust , "J. Bruce Fields" , Andrew Morton , Miklos Szeredi , Frederic Weisbecker , Ingo Molnar , John Kacur , Sage Weil , linux-fsdevel@vger.kernel.org To: Arnd Bergmann Return-path: Received: from palinux.external.hp.com ([192.25.206.14]:54029 "EHLO mail.parisc-linux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754220Ab0IRNsW (ORCPT ); Sat, 18 Sep 2010 09:48:22 -0400 Content-Disposition: inline In-Reply-To: <1284815371-5843-1-git-send-email-arnd@arndb.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, Sep 18, 2010 at 03:09:31PM +0200, Arnd Bergmann wrote: > This prepares the removal of the big kernel lock from the > file locking code. We still use the BKL as long as fs/lockd > uses it and ceph might sleep, but we can flip the definition > to a private spinlock as soon as that's done. > All users outside of fs/lockd get converted to use > lock_flocks() instead of lock_kernel() where appropriate. > > Based on an earlier patch to use a spinlock from Matthew > Wilcox, who has attempted this a few times before. An even > earlier attempt to use a semaphore instead of the BKL > apparently was made by Andrew Morton about ten years ago, > but reverted for performance reasons. Actually, I attempted the semaphore conversion ten years ago, but Andrew Morton reverted it due to the performance regression. I believe it was Apache, when it was using file locks to synchronise between threads. Patch looks good; Acked-by: Matthew Wilcox -- Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step."