[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <488EE5F0.7020302@gmail.com>
Date: Tue, 29 Jul 2008 11:42:08 +0200
From: Jiri Slaby <jirislaby@...il.com>
To: Ralf Baechle <ralf@...ux-mips.org>
CC: Andrew Morton <akpm@...ux-foundation.org>,
linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] Char: ds1286, eliminate busy waiting
Ralf Baechle napsal(a):
> On Fri, Jul 25, 2008 at 07:49:58PM +0200, Jiri Slaby wrote:
>
>> ds1286_get_time(); is not called from atomic context, sleep for 20 ms is
>> better choice than a (home-made) busy waiting for such a situation.
> Looks ok to me I guess. Though I don't really think it matters ...
I think RT people has different opinion ;).
> The same condition also appears in drivers/char/rtc.c and maybe a few
> others. Rtc.c has been copies and modified several times.
In rtc.c there is something completely different:
while (rtc_is_updating() != 0 &&
time_before(jiffies, uip_watchdog + 2*HZ/100))
cpu_relax();
It's a conditional busy-waiting. It reads the rtc status after each busy
cycle while in the ds1286 there was
if (ds1286_is_updating() != 0)
while (time_before(jiffies, uip_watchdog + 2*HZ/100))
barrier();
--
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