Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762474AbZAOHpZ (ORCPT ); Thu, 15 Jan 2009 02:45:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756320AbZAOHpE (ORCPT ); Thu, 15 Jan 2009 02:45:04 -0500 Received: from bombadil.infradead.org ([18.85.46.34]:36980 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756124AbZAOHpA (ORCPT ); Thu, 15 Jan 2009 02:45:00 -0500 Subject: Re: [PATCH -v11][RFC] mutex: implement adaptive spinning From: Peter Zijlstra To: Nick Piggin Cc: Linus Torvalds , Ingo Molnar , "Paul E. McKenney" , Gregory Haskins , Matthew Wilcox , Andi Kleen , Chris Mason , Andrew Morton , Linux Kernel Mailing List , linux-fsdevel , linux-btrfs , Thomas Gleixner , Peter Morreale , Sven Dietrich , Dmitry Adamushko , Johannes Weiner In-Reply-To: <20090115004645.GB32044@wotan.suse.de> References: <1231774622.4371.96.camel@laptop> <1231859742.442.128.camel@twins> <1231863710.7141.3.camel@twins> <1231864854.7141.8.camel@twins> <1231867314.7141.16.camel@twins> <1231952436.14825.28.camel@laptop> <20090114171800.GA18621@wotan.suse.de> <1231953757.14825.33.camel@laptop> <20090115004645.GB32044@wotan.suse.de> Content-Type: text/plain Date: Thu, 15 Jan 2009 08:44:03 +0100 Message-Id: <1232005443.14825.82.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1154 Lines: 26 On Thu, 2009-01-15 at 01:46 +0100, Nick Piggin wrote: > Hmm, well this is rather a slow path, I would say. I'd prefer not to > modify schedule in this way (if we just get scheduled back on after > being switched away, the subsequent call to schedule is going to be > cache hot and not do too much work). > > preempt_enable_noresched maybe if you really care, would close up the > window even more. But is it really worthwhile? We'd want to see numbers > (when in doubt, keep it simpler). I initially did the preempt_enable_no_resched() thing and that showed some improvement for PREEMPT=y kernels (lost the numbers though). When I redid all the patches I tried closing that last hole by doing that __schedule() thing, never realizing that schedule() would then get extra overhead,.. d'0h. I agree that that isn't worth it. I shall revert to preempt_enable_no_resched() and try to get some new numbers. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/