[Top] [All Lists]

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

To: Ralf Baechle <>
Subject: Re: [PATCH 1/1] Char: ds1286, eliminate busy waiting
From: Jiri Slaby <>
Date: Tue, 29 Jul 2008 11:42:08 +0200
Cc: Andrew Morton <>,,
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=B4K9+uOCaTi1jNWalT2u4mImhCygQch1wU97Hl8x+WQ=; b=hstPCMGc1p141XfMeNWPq+LFBOT6We/GyHnEtsy9w1KAGzNpYmHPEHTxD9kFxQXebu gfqfoRg7XfCs8ckoKPtaNCXJsPDFooHvcIFni7VAMXBzW1iSftgquEv18k1A5+/vE71j v5uXjG6R+Ne1dPLOgrBLjt4xikH7/JlfoUFos=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=SwMfQuAmiR9D2R+jAOBHBxofOy9j8OoFlyH2+MJzx+c+0RriLh5OM58Pq2n+SICzm5 onK3K1B6qV1WJHXfFbanFT/Qi7MFLUlvLnmX34axL7Ls+bQHQpZMvDsIaKNYu2bwH60r fXdNTmWiVYX4neKq7DqNViaK3yk//SuZsRr24=
In-reply-to: <>
Original-recipient: rfc822;
References: <> <>
User-agent: Thunderbird (X11/20080720)
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))

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

<Prev in Thread] Current Thread [Next in Thread>