Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264889AbUA0TT4 (ORCPT ); Tue, 27 Jan 2004 14:19:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263711AbUA0TT4 (ORCPT ); Tue, 27 Jan 2004 14:19:56 -0500 Received: from pub237.cambridge.redhat.com ([213.86.99.237]:13762 "EHLO warthog.cambridge.redhat.com") by vger.kernel.org with ESMTP id S265755AbUA0TTt (ORCPT ); Tue, 27 Jan 2004 14:19:49 -0500 From: David Howells In-Reply-To: <20040127191155.GA12128@tsunami.ccur.com> References: <20040127191155.GA12128@tsunami.ccur.com> To: joe.korty@ccur.com Cc: akpm@osdl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] volatile may be needed in rwsem User-Agent: EMH/1.14.1 SEMI/1.14.4 (Hosorogi) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.3 (i386-redhat-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII Date: Tue, 27 Jan 2004 19:19:40 +0000 Message-ID: <23376.1075231180@redhat.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 746 Lines: 27 > 'flags' should be declared volatile as rwsem_down_failed_common() spins > waiting for this to change. Untested. Is it though? Does this fix an error? The thing is, we make a function call inside of the loop: /* wait to be given the lock */ for (;;) { if (!waiter->flags) break; schedule(); set_task_state(tsk, TASK_UNINTERRUPTIBLE); } Which might preclude that need. I'm not entirely sure, though... it's one of those compiler black magic things. I suppose it can't hurt... 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/