lkml.org 
[lkml]   [2020]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] rtc: adapt allowed RTC update error
    On Wed, Dec 02, 2020 at 04:07:28PM +0100, Miroslav Lichvar wrote:
    > On Wed, Dec 02, 2020 at 02:44:53PM +0100, Thomas Gleixner wrote:
    > > Something like the completely untested below should make this reliable
    > > and only needs to retry when the work is running late (busy machine),
    > > but the wakeup will be on time or at max 1 jiffie off when high
    > > resolution timers are not available or disabled.
    >
    > It seems to work nicely. In my test most of the updates succeeded on
    > the first attempt hitting the right tick, the rest succeeding on the
    > second attempt. Only when the clock was set to run 10% faster, it
    > needed few more attempts to converge to the target time.

    I noticed an observable change wrt adjtimex() calls though. It seems
    it now reschedules the RTC update, i.e. there can be more than one
    update per 11 minutes. Was this intended?

    > @@ -629,7 +618,7 @@ void ntp_notify_cmos_timer(void)
    >
    > if (IS_ENABLED(CONFIG_GENERIC_CMOS_UPDATE) ||
    > IS_ENABLED(CONFIG_RTC_SYSTOHC))
    > - queue_delayed_work(system_power_efficient_wq, &sync_work, 0);
    > + queue_work(system_power_efficient_wq, &sync_work);
    > }

    --
    Miroslav Lichvar

    \
     
     \ /
      Last update: 2020-12-02 16:40    [W:3.347 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site