+ ntp-make-the-rtc-sync-mode-11-minute-again.patch added to -mm tree

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

 



The patch titled
     ntp: make the RTC sync mode 11-minute again
has been added to the -mm tree.  Its filename is
     ntp-make-the-rtc-sync-mode-11-minute-again.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: ntp: make the RTC sync mode 11-minute again
From: "Maciej W. Rozycki" <macro@xxxxxxxxxxxxxx>

As a result of the rewrite to drive the RTC sync from NTP code to use a
timer, the piece of code responsible for doing this is triggered each time
do_adjtimex() is called.  Which may be as often as once per 64 seconds as
this is the minimum interval between NTP packets used by the daemon.  Make
the interval 11 minutes again, by not reactivating the timer if pending
already.

Note with this approach, there is a small window where the timer has
expired, but has not been rearmed yet, for example when the handler is
still early in sync_cmos_clock() by the time this function is called.  The
likelihood of this event is epsilon and it should not be enough of a
problem to justify designing a mutex solution to avoid it -- if the
scenario happens either the RTC will be updated twice or mod_timer() will
be called from sync_cmos_clock() even before the newly-armed timer
expires, cancelling the additional update.

Signed-off-by: Maciej W. Rozycki <macro@xxxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Roman Zippel <zippel@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 kernel/time/ntp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN kernel/time/ntp.c~ntp-make-the-rtc-sync-mode-11-minute-again kernel/time/ntp.c
--- a/kernel/time/ntp.c~ntp-make-the-rtc-sync-mode-11-minute-again
+++ a/kernel/time/ntp.c
@@ -263,7 +263,7 @@ static void sync_cmos_clock(unsigned lon
 
 static void notify_cmos_timer(void)
 {
-	if (!no_sync_cmos_clock)
+	if (!no_sync_cmos_clock && !timer_pending(&sync_cmos_timer))
 		mod_timer(&sync_cmos_timer, jiffies + 1);
 }
 
_

Patches currently in -mm which might be from macro@xxxxxxxxxxxxxx are

origin.patch
rtc-rtc_time_to_tm-use-unsigned-arithmetic.patch
rtc-watchdog-m41t80-fix-a-potential-use-of-unitialized-data.patch
rtc-m41t80-include-linux-kernelh-for-printk.patch
linux-next.patch
ntp-make-the-rtc-sync-mode-11-minute-again.patch
ntp-fix-calculation-of-the-next-jiffie-to-trigger-rtc-sync.patch
rtc-m41t80-sort-header-inclusions-for-readability.patch
rtc-m41t80-use-pr_info-as-appropriate.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux