From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765493AbYEGSDo (ORCPT ); Wed, 7 May 2008 14:03:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755757AbYEGSD3 (ORCPT ); Wed, 7 May 2008 14:03:29 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:48256 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755886AbYEGSD0 (ORCPT ); Wed, 7 May 2008 14:03:26 -0400 Date: Wed, 7 May 2008 11:02:30 -0700 (PDT) From: Linus Torvalds To: Ingo Molnar cc: Matthew Wilcox , Andrew Morton , "J. Bruce Fields" , "Zhang, Yanmin" , LKML , Alexander Viro , linux-fsdevel@vger.kernel.org Subject: Re: AIM7 40% regression with 2.6.26-rc1 In-Reply-To: <20080507174900.GB13591@elte.hu> Message-ID: References: <1210052904.3453.30.camel@ymzhang> <20080506114449.GC32591@elte.hu> <20080506120934.GH19219@parisc-linux.org> <20080506162332.GI19219@parisc-linux.org> <20080506102153.5484c6ac.akpm@linux-foundation.org> <20080507163811.GY19219@parisc-linux.org> <20080507172246.GA13262@elte.hu> <20080507174900.GB13591@elte.hu> User-Agent: Alpine 1.10 (LFD 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 7 May 2008, Ingo Molnar wrote: > > another idea: my trial-baloon patch should test your theory too, because > the generic down_trylock() is still the 'fat' version, it does: I agree that your trial-balloon should likely get rid of the big regression, since it avoids the scheduler. So with your patch, lock_kernel() ends up being just a rather expensive spinlock. And yes, I'd expect that it should get rid of the 40% cost, because while it makes lock_kernel() more expensive than a spinlock and you might end up having a few more cacheline bounces on the lock due to that, that's still the "small" expense compared to going through the whole scheduler on conflicts. So I'd expect that realistically the performance difference between your version and just plain spinlocks shouldn't be *that* big. I'd expect it to be visible, but in the (low) single-digit percentage range rather than in any 40% range. That's just a guess. Linus