From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 19 Sep 2001 14:26:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 19 Sep 2001 14:26:46 -0400 Received: from t2.redhat.com ([199.183.24.243]:14330 "HELO executor.cambridge.redhat.com") by vger.kernel.org with SMTP id ; Wed, 19 Sep 2001 14:26:14 -0400 To: Andrea Arcangeli Cc: David Howells , Linus Torvalds , Manfred Spraul , Ulrich.Weigand@de.ibm.com, linux-kernel@vger.kernel.org Subject: Re: Deadlock on the mm->mmap_sem In-Reply-To: Message from Andrea Arcangeli of "Wed, 19 Sep 2001 20:03:57 +0200." <20010919200357.Z720@athlon.random> Date: Wed, 19 Sep 2001 19:26:33 +0100 Message-ID: <6663.1000923993@warthog.cambridge.redhat.com> From: David Howells Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org > if we go generic then I strongly recommend my version of the generic > semaphores is _much_ faster (and cleaner) than this one Not so:-) Your patch, Andrea, grabs the spinlock far more than is necessary. > (it even allows more than 2^31 concurrent readers on 64 bit archs ;). Easy enough to fix. Just apply this as well: --- linux-rwsem-old/include/linux/rwsem.h Wed Sep 19 19:23:44 2001 +++ linux-rwsem/include/linux/rwsem.h Wed Sep 19 19:23:47 2001 @@ -26,7 +26,7 @@ * - if wait_list is not empty, then there are processes waiting for the semaphore */ struct rw_semaphore { - int activity; + long activity; spinlock_t lock; struct list_head wait_list; }; David