From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Wagner Subject: Re: [RFC v1 0/5] fs/locks: Use plain percpu spinlocks instead of lglock to protect file_lock Date: Tue, 24 Feb 2015 16:58:26 +0100 Message-ID: <54EC9FA2.1030000@bmw-carit.de> References: <1424443195-18676-1-git-send-email-daniel.wagner@bmw-carit.de> <87vbiwwotb.fsf@tassilo.jf.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Cc: Jeff Layton , , , John Kacur , Alexander Viro , "J. Bruce Fields" To: Andi Kleen Return-path: In-Reply-To: <87vbiwwotb.fsf@tassilo.jf.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 02/20/2015 05:05 PM, Andi Kleen wrote: > Daniel Wagner writes: >> >> I am looking at how to get rid of lglock. Reason being -rt is not too >> happy with that lock, especially that it uses arch_spinlock_t and > > AFAIK it could just use normal spinlock. Have you tried that? I have tried it. At least fs/locks.c didn't blow up. The benchmark results (lockperf) indicated that using normal spinlocks is even slightly faster. Simply converting felt like cheating. It might be necessary for the other user (kernel/stop_machine.c). Currently it looks like there is some additional benefit getting lglock away in fs/locks.c. cheers, daniel