From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from turing-police.cc.vt.edu ([128.173.14.107]:59025 "EHLO turing-police.cc.vt.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761150AbXHHRr4 (ORCPT ); Wed, 8 Aug 2007 13:47:56 -0400 Subject: Re: [patch 2/2] x86_64: ticket lock spinlock In-Reply-To: Your message of "Wed, 08 Aug 2007 06:24:44 +0200." <20070808042444.GF11018@wotan.suse.de> From: Valdis.Kletnieks@vt.edu References: <20070808042234.GE11018@wotan.suse.de> <20070808042444.GF11018@wotan.suse.de> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1186594318_5422P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Wed, 08 Aug 2007 13:31:58 -0400 Message-ID: <20906.1186594318@turing-police.cc.vt.edu> Sender: linux-arch-owner@vger.kernel.org To: Nick Piggin Cc: Andrew Morton , Andi Kleen , Linus Torvalds , Ingo Molnar , linux-arch@vger.kernel.org, Linux Kernel Mailing List List-ID: --==_Exmh_1186594318_5422P Content-Type: text/plain; charset=us-ascii On Wed, 08 Aug 2007 06:24:44 +0200, Nick Piggin said: > After this, we can no longer spin on any locks with preempt enabled, > and cannot reenable interrupts when spinning on an irq safe lock, because > at that point we have already taken a ticket and the would deadlock if > the same CPU tries to take the lock again. These are hackish anyway: if > the lock happens to be called under a preempt or interrupt disabled section, > then it will just have the same latency problems. The real fix is to keep > critical sections short, and ensure locks are reasonably fair (which this > patch does). Any guesstimates how often we do that sort of hackish thing currently, and how hard it will be to debug each one? "Deadlock if the same CPU tries to take the lock again" is pretty easy to notice - are there more subtle failure modes (larger loops of locks, etc)? --==_Exmh_1186594318_5422P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Exmh version 2.5 07/13/2001 iD8DBQFGuf4OcC3lWbTT17ARAnzNAKCv9on7T8cbTFwQeDnPhZJZQoKCZQCg6nS4 A9DbYhG4UhU1m/to4O1YQD0= =czI8 -----END PGP SIGNATURE----- --==_Exmh_1186594318_5422P--