All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Bristot de Oliveira <bristot@redhat.com>
To: John Stultz <john.stultz@linaro.org>,
	lkml <linux-kernel@vger.kernel.org>
Cc: Prarit Bhargava <prarit@redhat.com>,
	Richard Cochran <richardcochran@gmail.com>,
	Jan Kara <jack@suse.cz>, Jiri Bohac <jbohac@suse.cz>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	Shuah Khan <shuahkh@osg.samsung.com>
Subject: Re: [RFC][PATCH 0/4] Fixes for leapsecond expiring early ABS_TIME CLOCK_REALTIME timers
Date: Mon, 01 Jun 2015 17:18:28 -0300	[thread overview]
Message-ID: <556CBE14.9070105@redhat.com> (raw)
In-Reply-To: <1432931068-4980-1-git-send-email-john.stultz@linaro.org>



Il 29/05/2015 17:24, John Stultz ha scritto:
> Thus this patch series tries to address this isssue, including
> extending the leap-a-day test to catch this problem, as well
> as other relevant fixups I found while working on the code.
> 
> This series has only had limited testing, so I wanted to send
> it out for initial review and comment. Folks can grab this tree
> via git for testing here:
> https://git.linaro.org/people/john.stultz/linux.git dev/early-leap-timer

John,

I saw two failures while testing the patched kernel
using the patched leap-a-day.

On both cases the leap second was not inserted, and
then the timer fired at the second edge (as expected?).

Here is the output of both leap-a-day and dmesg for
both errors:

===== Error 1 =====
[root@vostro timers]# ./leap-a-day -s
[...many lines...]
Setting time to Wed Sep  9 20:59:50 2015
Scheduling leap second for Wed Sep  9 21:00:00 2015
Setting timer for Wed Sep  9 21:00:00 2015
Wed Sep  9 20:59:57 2015 +    147 us (0)	TIME_INS
Wed Sep  9 20:59:57 2015 + 500352 us (0)	TIME_INS
Wed Sep  9 20:59:58 2015 +    558 us (0)	TIME_INS
Wed Sep  9 20:59:58 2015 + 500767 us (0)	TIME_INS
Wed Sep  9 20:59:59 2015 +    975 us (0)	TIME_INS
Wed Sep  9 20:59:59 2015 + 501181 us (0)	TIME_INS
Wed Sep  9 20:59:59 2015 +   1442 us (1)	TIME_OOP
Wed Sep  9 20:59:59 2015 + 501670 us (1)	TIME_OOP
Wed Sep  9 21:00:00 2015 +    110 us (1)	TIME_WAIT - TIMER FIRED
Wed Sep  9 21:00:00 2015 +    179 us (1)	TIME_WAIT
Wed Sep  9 21:00:00 2015 + 500340 us (1)	TIME_WAIT
Wed Sep  9 21:00:01 2015 +    548 us (1)	TIME_WAIT
Wed Sep  9 21:00:01 2015 + 500768 us (1)	TIME_WAIT
Wed Sep  9 21:00:02 2015 +    976 us (1)	TIME_WAIT
Leap complete

Setting time to Thu Sep 10 20:59:50 2015
Scheduling leap second for Thu Sep 10 21:00:00 2015
Setting timer for Thu Sep 10 21:00:00 2015
Thu Sep 10 20:59:57 2015 +    209 us (1)	TIME_DEL
Thu Sep 10 20:59:57 2015 + 500410 us (1)	TIME_DEL
Thu Sep 10 20:59:58 2015 +    646 us (1)	TIME_DEL
Thu Sep 10 20:59:58 2015 + 500881 us (1)	TIME_DEL
Thu Sep 10 21:00:00 2015 +   1182 us (0)	TIME_WAIT - TIMER FIRED
Thu Sep 10 21:00:00 2015 +   1283 us (0)	TIME_WAIT
Thu Sep 10 21:00:00 2015 + 501475 us (0)	TIME_WAIT
Thu Sep 10 21:00:01 2015 +   1654 us (0)	TIME_WAIT
Thu Sep 10 21:00:01 2015 + 501856 us (0)	TIME_WAIT
Thu Sep 10 21:00:02 2015 +   2032 us (0)	TIME_WAIT
Leap complete

Setting time to Fri Sep 11 20:59:50 2015
Scheduling leap second for Fri Sep 11 21:00:00 2015
Setting timer for Fri Sep 11 21:00:00 2015
Fri Sep 11 20:59:57 2015 +    139 us (0)	TIME_INS
Fri Sep 11 20:59:57 2015 + 500347 us (0)	TIME_INS
Fri Sep 11 20:59:58 2015 +    527 us (0)	TIME_INS
Fri Sep 11 20:59:58 2015 + 500751 us (0)	TIME_INS
Fri Sep 11 20:59:59 2015 +    987 us (0)	TIME_INS
Fri Sep 11 20:59:59 2015 + 501203 us (0)	TIME_INS
Fri Sep 11 21:00:00 2015 +    100 us (0)	TIME_INS - TIMER FIRED
Error: Incorrect NTP state?
Fri Sep 11 21:00:00 2015 +    173 us (0)	TIME_INS
Fri Sep 11 21:00:00 2015 + 500353 us (0)	TIME_OK
Fri Sep 11 21:00:01 2015 +    583 us (0)	TIME_OK
Fri Sep 11 21:00:01 2015 + 500799 us (0)	TIME_OK
Fri Sep 11 21:00:02 2015 +   1021 us (0)	TIME_OK
Leap complete
Errors observed

[root@vostro timers]# dmesg  | tail
[ 1451.279313] Clock: deleting leap second 23:59:59 UTC
[ 1464.296724] Clock: inserting leap second 23:59:60 UTC
[ 1477.312373] Clock: deleting leap second 23:59:59 UTC
[ 1490.329740] Clock: inserting leap second 23:59:60 UTC
[ 1503.345402] Clock: deleting leap second 23:59:59 UTC
[ 1516.362841] Clock: inserting leap second 23:59:60 UTC
[ 1529.378466] Clock: deleting leap second 23:59:59 UTC
[ 1542.395826] Clock: inserting leap second 23:59:60 UTC
[ 1555.411551] Clock: deleting leap second 23:59:59 UTC
[ 1697.998312] Adjusting tsc more than 11% (5677670 vs 7466007) <-- ???
---> did not insert the leap second <---
## did not insert the leap second

===== Error 2 =====
[root@vostro timers]# ./leap-a-day -s
[...many lines...]
Setting time to Wed Aug 19 20:59:50 2015
Scheduling leap second for Wed Aug 19 21:00:00 2015
Setting timer for Wed Aug 19 21:00:00 2015
Something cleared STA_INS/STA_DEL, setting it again.
Wed Aug 19 20:59:57 2015 +    181 us (0)	TIME_OK
Wed Aug 19 20:59:57 2015 + 500357 us (0)	TIME_INS
Wed Aug 19 20:59:58 2015 +    559 us (0)	TIME_INS
Wed Aug 19 20:59:58 2015 + 500761 us (0)	TIME_INS
Wed Aug 19 20:59:59 2015 +    967 us (0)	TIME_INS
Wed Aug 19 20:59:59 2015 + 501177 us (0)	TIME_INS
Wed Aug 19 20:59:59 2015 +   1318 us (1)	TIME_OOP
Wed Aug 19 20:59:59 2015 + 501508 us (1)	TIME_OOP
Wed Aug 19 21:00:00 2015 +     99 us (1)	TIME_WAIT - TIMER FIRED
Wed Aug 19 21:00:00 2015 +    161 us (1)	TIME_WAIT
Wed Aug 19 21:00:00 2015 + 500320 us (1)	TIME_WAIT
Wed Aug 19 21:00:01 2015 +    523 us (1)	TIME_WAIT
Wed Aug 19 21:00:01 2015 + 500735 us (1)	TIME_WAIT
Wed Aug 19 21:00:02 2015 +    937 us (1)	TIME_WAIT
Leap complete

Setting time to Thu Aug 20 20:59:50 2015
Scheduling leap second for Thu Aug 20 21:00:00 2015
Setting timer for Thu Aug 20 21:00:00 2015
Thu Aug 20 20:59:57 2015 +    144 us (1)	TIME_DEL
Thu Aug 20 20:59:57 2015 + 500351 us (1)	TIME_DEL
Thu Aug 20 20:59:58 2015 +    552 us (1)	TIME_DEL
Thu Aug 20 20:59:58 2015 + 500752 us (1)	TIME_DEL
Thu Aug 20 21:00:00 2015 +   1021 us (0)	TIME_WAIT - TIMER FIRED
Thu Aug 20 21:00:00 2015 +   1096 us (0)	TIME_WAIT
Thu Aug 20 21:00:00 2015 + 501267 us (0)	TIME_WAIT
Thu Aug 20 21:00:01 2015 +   1470 us (0)	TIME_WAIT
Thu Aug 20 21:00:01 2015 + 501677 us (0)	TIME_WAIT
Thu Aug 20 21:00:02 2015 +   1886 us (0)	TIME_WAIT
Leap complete

Setting time to Fri Aug 21 20:59:50 2015
Scheduling leap second for Fri Aug 21 21:00:00 2015
Setting timer for Fri Aug 21 21:00:00 2015
Fri Aug 21 20:59:57 2015 +    153 us (0)	TIME_INS
Fri Aug 21 20:59:57 2015 + 500354 us (0)	TIME_INS
Fri Aug 21 20:59:58 2015 +    562 us (0)	TIME_INS
Fri Aug 21 20:59:58 2015 + 500815 us (0)	TIME_INS
Fri Aug 21 20:59:59 2015 +   1000 us (0)	TIME_INS
Fri Aug 21 20:59:59 2015 + 501207 us (0)	TIME_INS
Fri Aug 21 21:00:00 2015 +    109 us (0)	TIME_INS - TIMER FIRED
Error: Incorrect NTP state?
Fri Aug 21 21:00:00 2015 +    173 us (0)	TIME_INS
Fri Aug 21 21:00:00 2015 + 500331 us (0)	TIME_OK
Fri Aug 21 21:00:01 2015 +    540 us (0)	TIME_OK
Fri Aug 21 21:00:01 2015 + 500791 us (0)	TIME_OK
Fri Aug 21 21:00:02 2015 +   1046 us (0)	TIME_OK
Leap complete
Errors observed

[root@vostro timers]# dmesg  | tail
[ 1283.857902] Clock: inserting leap second 23:59:60 UTC
[ 1296.873600] Clock: deleting leap second 23:59:59 UTC
[ 1309.891049] Clock: inserting leap second 23:59:60 UTC
[ 1322.906709] Clock: deleting leap second 23:59:59 UTC
[ 1335.924154] Clock: inserting leap second 23:59:60 UTC
[ 1348.939824] Clock: deleting leap second 23:59:59 UTC
[ 1361.957267] Clock: inserting leap second 23:59:60 UTC
[ 1374.972919] Clock: deleting leap second 23:59:59 UTC
[ 1387.989238] Clock: inserting leap second 23:59:60 UTC
[ 1401.005877] Clock: deleting leap second 23:59:59 UTC
---> did not insert the leap second <---

Both cases occurred in the same physical machine.
AFAICS, it does not occur in the unpatched
kernel/leap-a-day in the same machine.

-- Daniel

  parent reply	other threads:[~2015-06-01 20:18 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29 20:24 [RFC][PATCH 0/4] Fixes for leapsecond expiring early ABS_TIME CLOCK_REALTIME timers John Stultz
2015-05-29 20:24 ` [RFC][PATCH 1/4] selftests: timers: Add leap-second timer edge testing to leap-a-day.c John Stultz
2015-05-29 20:24 ` [RFC][PATCH 2/4] timer_list: Add the base offset so remaining nsecs are accurate for non monotonic timers John Stultz
2015-05-29 20:24 ` [RFC][PATCH 3/4] ntp: Use printk_deferred in leapsecond path John Stultz
2015-06-02 10:31   ` Jiri Bohac
2015-06-02 10:43     ` Jiri Kosina
2015-06-02 16:14       ` John Stultz
2015-06-02 16:04     ` John Stultz
2015-05-29 20:24 ` [RFC][PATCH 4/4] time: Do leapsecond adjustment in gettime fastpaths John Stultz
2015-05-31 16:05   ` Richard Cochran
2015-06-02  9:01   ` Ingo Molnar
2015-06-02  9:21     ` Peter Zijlstra
2015-06-02 14:09       ` John Stultz
2015-06-02 15:52     ` John Stultz
2015-06-03  9:04       ` Ingo Molnar
2015-06-03 17:44         ` John Stultz
2015-06-04  6:48           ` Ingo Molnar
2015-06-05  0:08             ` John Stultz
2015-06-05  7:29               ` Peter Zijlstra
2015-06-05  9:04                 ` Richard Cochran
2015-06-05  9:10                   ` Peter Zijlstra
2015-06-05 14:12                     ` Richard Cochran
2015-06-05 17:28                       ` John Stultz
2015-06-06  9:44                     ` Thomas Gleixner
2015-06-08 17:55                       ` John Stultz
2015-06-08 19:05                         ` Thomas Gleixner
2015-06-08 20:02                           ` Thomas Gleixner
2015-06-05 11:37                   ` Prarit Bhargava
2015-06-05 12:07                     ` Thomas Gleixner
2015-06-05 14:22                 ` Richard Cochran
2015-06-05 17:24                 ` John Stultz
2015-05-31 13:55 ` [RFC][PATCH 0/4] Fixes for leapsecond expiring early ABS_TIME CLOCK_REALTIME timers Prarit Bhargava
2015-06-01 11:57 ` Prarit Bhargava
2015-06-01 17:02   ` John Stultz
2015-06-01 17:43     ` Prarit Bhargava
2015-06-01 20:18 ` Daniel Bristot de Oliveira [this message]
2015-06-01 20:32   ` John Stultz
2015-06-01 21:42   ` Prarit Bhargava
2015-06-01 22:29     ` Daniel Bristot de Oliveira
2015-06-02  6:19       ` John Stultz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=556CBE14.9070105@redhat.com \
    --to=bristot@redhat.com \
    --cc=jack@suse.cz \
    --cc=jbohac@suse.cz \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=prarit@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=shuahkh@osg.samsung.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.