From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3A34ADE179 for ; Thu, 12 Mar 2009 08:50:02 +1100 (EST) Subject: Re: [PATCH v5] introduce macro spin_event_timeout() From: Benjamin Herrenschmidt To: Grant Likely In-Reply-To: References: <1236723118-3577-1-git-send-email-timur@freescale.com> <49B6EAA4.9000803@freescale.com> <20090310223753.GB26415@zod.rchland.ibm.com> <1236729551.7086.26.camel@pasglop> <1236731097.7086.32.camel@pasglop> Content-Type: text/plain Date: Thu, 12 Mar 2009 08:49:50 +1100 Message-Id: <1236808190.7086.61.camel@pasglop> Mime-Version: 1.0 Cc: Scott Wood , linuxppc-dev@ozlabs.org, Timur Tabi List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > No, not udelay. Or any delay for that matter. If spinning on a > condition, then there is no advantage to burning cycles with a > udelay(). Those cycles may as well be used to keep testing the > condition so the loop can be exited faster. a udelay() would only > serve to always make the busywait longer. Well, there's a non-empty set of HW where polling as fast as you can will effectively prevent it to make fwd progress... Ben.