Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 29 Jul 2002 03:39:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 29 Jul 2002 03:39:04 -0400 Received: from dell-paw-3.cambridge.redhat.com ([195.224.55.237]:22516 "EHLO executor.cambridge.redhat.com") by vger.kernel.org with ESMTP id ; Mon, 29 Jul 2002 03:39:04 -0400 To: Roman Zippel Cc: Christoph Hellwig , "Adam J. Richter" , dhowells@redhat.com, linux-kernel@vger.kernel.org Subject: Re: Patch: linux-2.5.29 __downgrade_write() for CONFIG_RWSEM_GENERIC_SPINLOCK In-Reply-To: Message from Roman Zippel of "Mon, 29 Jul 2002 00:55:26 +0200." User-Agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 Emacs/21.2 (i386-redhat-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII Date: Mon, 29 Jul 2002 08:42:16 +0100 Message-ID: <9911.1027928536@warthog.cambridge.redhat.com> From: David Howells Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 859 Lines: 20 Roman Zippel wrote: > You don't really need that extra argument, testing sem->activity should do > the same job. > If you exchange the wakewrite (or sem->activity) test and the > waiter->flags you can fold it into the next test (this means all the extra > work would only be done, if we have a writer waiting at the top). The reason for doing it this way is that it allows the compiler to discard parts of the function when inlining it since the value is set at compile time rather than being worked out at runtime. The value itself should be disappeared entirely by the compiler. David - 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/