[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a5b0800903100905l71f15141n7a273df21bfa77e2@mail.gmail.com>
Date: Tue, 10 Mar 2009 16:05:20 +0000
From: Will Newton <will.newton@...il.com>
To: Timur Tabi <timur@...escale.com>
Cc: Alan Cox <alan@...rguk.ukuu.org.uk>, linux-kernel@...r.kernel.org,
rdreier@...co.com, jirislaby@...il.com, peterz@...radead.org,
hancockrwd@...il.com, jeremy@...p.org
Subject: Re: [PATCH v4] introduce macro spin_event_timeout()
On Tue, Mar 10, 2009 at 3:50 PM, Timur Tabi <timur@...escale.com> wrote:
> Alan Cox wrote:
>
>> NAK this - on a lot of platforms 1uS is the wrong timescale. Also we
>> shouldn't be encouraging this kind of polling by making it very easy to
>> write.
>
> Well, I can agree that the time scale might be wrong on some platforms.
> The original version of spin_event_timeout() used jiffies, but some
> people said that a jiffy is too long of a timescale, so I changed it to
> udelay.
The correct timescale is rather application dependant - for some
accesses that cross clock domains it can be a requirement to wait for
a small number of core clock cycles (2 - 20) for a condition to become
true, for others, e.g. PIO, it is more appropriate to wait for a few
100 cycles.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists