Re: [PATCH 1/1] Char: ds1286, eliminate busy waiting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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();


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux