Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754583AbZLRP0W (ORCPT ); Fri, 18 Dec 2009 10:26:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754543AbZLRP0U (ORCPT ); Fri, 18 Dec 2009 10:26:20 -0500 Received: from one.firstfloor.org ([213.235.205.2]:50494 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754525AbZLRP0L (ORCPT ); Fri, 18 Dec 2009 10:26:11 -0500 To: Miquel van Smoorenburg Cc: Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: spinlock which can morph into a mutex From: Andi Kleen References: <20091218143032.GA16595@xs4all.net> Date: Fri, 18 Dec 2009 16:26:05 +0100 In-Reply-To: <20091218143032.GA16595@xs4all.net> (Miquel van Smoorenburg's message of "Fri, 18 Dec 2009 15:30:35 +0100") Message-ID: <876384uwvm.fsf@basil.nowhere.org> User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (gnu/linux) 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 Content-Length: 616 Lines: 17 Miquel van Smoorenburg writes: > > So I probably need a mutex instead of a spinlock, but I want to > keep minimal overhead for the common case (when no resizing is in > progress). I think I need a spinlock that can morph into a mutex .. The standed mutexes already do that by themselves. -Andi -- ak@linux.intel.com -- Speaking for myself only. -- 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/