* [ANNOUNCE] v4.11.12-rt13
@ 2017-09-05 14:52 Sebastian Andrzej Siewior
2017-10-04 16:07 ` Mike Galbraith
0 siblings, 1 reply; 11+ messages in thread
From: Sebastian Andrzej Siewior @ 2017-09-05 14:52 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: LKML, linux-rt-users, Steven Rostedt
Dear RT folks!
I'm pleased to announce the v4.11.12-rt13 patch set.
Changes since v4.11.12-rt12:
- Merging Anna-Maria's "hrtimer: Provide softirq context hrtimers"
series. Merging this series enables the removal of almost all
hrtimer related patches in the queue. What is left is the "force
switch" of all timers to the softirq context (except a few special
ones) and a wait-queue to wait until a timer is completed.
The overall diffstat compared to -rt12 is
21 files changed, 573 insertions(+), 651 deletions(-)
amazing. We have RT wise the same functionality with 78 lines less
of code.
Known issues
- There was a report regarding a deadlock within the rtmutex code.
The delta patch against v4.11.12-rt12 is huge can be found here:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/4.11/incr/patch-4.11.12-rt12-rt13.patch.xz
https://git.kernel.org/rt/linux-rt-devel/d/v4.11.12-rt13/v4.11.12-rt12
You can get this release via the git tree at:
git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git v4.11.12-rt13
The RT patch against v4.11.12 can be found here:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/4.11/older/patch-4.11.12-rt13.patch.xz
The split quilt queue is available at:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/4.11/older/patches-4.11.12-rt13.tar.xz
Sebastian
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [ANNOUNCE] v4.11.12-rt13 2017-09-05 14:52 [ANNOUNCE] v4.11.12-rt13 Sebastian Andrzej Siewior @ 2017-10-04 16:07 ` Mike Galbraith 2017-10-05 15:54 ` Sebastian Andrzej Siewior 0 siblings, 1 reply; 11+ messages in thread From: Mike Galbraith @ 2017-10-04 16:07 UTC (permalink / raw) To: Sebastian Andrzej Siewior, Thomas Gleixner Cc: LKML, linux-rt-users, Steven Rostedt On Tue, 2017-09-05 at 16:52 +0200, Sebastian Andrzej Siewior wrote: > Dear RT folks! > > I'm pleased to announce the v4.11.12-rt13 patch set. > > Changes since v4.11.12-rt12: > > - Merging Anna-Maria's "hrtimer: Provide softirq context hrtimers" > series. Merging this series enables the removal of almost all > hrtimer related patches in the queue. What is left is the "force > switch" of all timers to the softirq context (except a few special > ones) and a wait-queue to wait until a timer is completed. > The overall diffstat compared to -rt12 is > 21 files changed, 573 insertions(+), 651 deletions(-) > amazing. We have RT wise the same functionality with 78 lines less > of code. (post lazy sod mode [vacation] testing...) Seems combo-patch induced some ltp posix conformance test grumbling. +clock_settime_8_1 ... ... FAILED +clock_settime_4_2 ... ... FAILED +clock_settime_speculative_4_3 ... ... FAILED +timer_settime_5_2 ... ... FAILED +timer_settime_5_1 ... ... FAILED +timer_settime_5_3 ... ... FAILED rtbox:/root # /usr/local/ltp/conformance/interfaces/clock_settime/clock_settime_8-1.run-test Ended too late. 1507131910 >> 1507131908 Test FAILED rtbox:/root # /usr/local/ltp/conformance/interfaces/clock_settime/clock_settime_4-2.run-test timer should have expired _immediately_ rtbox:/root # /usr/local/ltp/conformance/interfaces/clock_settime/speculative/clock_settime_speculative_4-3.run-test Overrun count =0, not # of repeating timer expirys FAIL: Caught 0 signals, not 1 Test FAILED rtbox:/root # /opt/ltp/conformance/interfaces/timer_settime/timer_settime_5-2.run-test signal was not sent ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ANNOUNCE] v4.11.12-rt13 2017-10-04 16:07 ` Mike Galbraith @ 2017-10-05 15:54 ` Sebastian Andrzej Siewior 2017-10-06 2:20 ` Mike Galbraith 0 siblings, 1 reply; 11+ messages in thread From: Sebastian Andrzej Siewior @ 2017-10-05 15:54 UTC (permalink / raw) To: Mike Galbraith; +Cc: Thomas Gleixner, LKML, linux-rt-users, Steven Rostedt On 2017-10-04 18:07:59 [+0200], Mike Galbraith wrote: > Seems combo-patch induced some ltp posix conformance test grumbling. > > +clock_settime_8_1 ... ... FAILED > +clock_settime_4_2 ... ... FAILED > +clock_settime_speculative_4_3 ... ... FAILED > +timer_settime_5_2 ... ... FAILED > +timer_settime_5_1 ... ... FAILED > +timer_settime_5_3 ... ... FAILED > > rtbox:/root # /usr/local/ltp/conformance/interfaces/clock_settime/clock_settime_8-1.run-test > Ended too late. 1507131910 >> 1507131908 > Test FAILED > rtbox:/root # /usr/local/ltp/conformance/interfaces/clock_settime/clock_settime_4-2.run-test > timer should have expired _immediately_ > rtbox:/root # /usr/local/ltp/conformance/interfaces/clock_settime/speculative/clock_settime_speculative_4-3.run-test > Overrun count =0, not # of repeating timer expirys > FAIL: Caught 0 signals, not 1 > Test FAILED > rtbox:/root # /opt/ltp/conformance/interfaces/timer_settime/timer_settime_5-2.run-test > signal was not sent So the last triggers here, too and I have an idea. Sebastian ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ANNOUNCE] v4.11.12-rt13 2017-10-05 15:54 ` Sebastian Andrzej Siewior @ 2017-10-06 2:20 ` Mike Galbraith 2017-10-06 10:28 ` Sebastian Andrzej Siewior 0 siblings, 1 reply; 11+ messages in thread From: Mike Galbraith @ 2017-10-06 2:20 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: Thomas Gleixner, LKML, linux-rt-users, Steven Rostedt On Thu, 2017-10-05 at 17:54 +0200, Sebastian Andrzej Siewior wrote: > On 2017-10-04 18:07:59 [+0200], Mike Galbraith wrote: > > Seems combo-patch induced some ltp posix conformance test grumbling. > > > > +clock_settime_8_1 ... ... FAILED > > +clock_settime_4_2 ... ... FAILED > > +clock_settime_speculative_4_3 ... ... FAILED > > +timer_settime_5_2 ... ... FAILED > > +timer_settime_5_1 ... ... FAILED > > +timer_settime_5_3 ... ... FAILED > > > > rtbox:/root # /usr/local/ltp/conformance/interfaces/clock_settime/clock_settime_8-1.run-test > > Ended too late. 1507131910 >> 1507131908 > > Test FAILED > > rtbox:/root # /usr/local/ltp/conformance/interfaces/clock_settime/clock_settime_4-2.run-test > > timer should have expired _immediately_ > > rtbox:/root # /usr/local/ltp/conformance/interfaces/clock_settime/speculative/clock_settime_speculative_4-3.run-test > > Overrun count =0, not # of repeating timer expirys > > FAIL: Caught 0 signals, not 1 > > Test FAILED > > rtbox:/root # /opt/ltp/conformance/interfaces/timer_settime/timer_settime_5-2.run-test > > signal was not sent > > So the last triggers here, too and I have an idea. I ran a trace of clock_settime_4-2.run-test, which arms a timer for now+9 seconds, then clock_settime to advance 4 seconds past timer expiration, which should cause the timer to fire. Going through SyS_clock_settime..retrigger_next_event..lapic_next_deadline does not trigger interrupt, but does without the culprit patch applied. clock_settime_4-6453 [003] ....... 384.288883: SyS_clock_settime <-entry_SYSCALL_64_fastpath clock_settime_4-6453 [003] ....... 384.288883: __might_fault <-SyS_clock_settime clock_settime_4-6453 [003] ....... 384.288883: __might_sleep <-__might_fault clock_settime_4-6453 [003] ....... 384.288883: ___might_sleep <-__might_fault clock_settime_4-6453 [003] ....... 384.288883: _copy_from_user <-SyS_clock_settime clock_settime_4-6453 [003] ....... 384.288884: __might_fault <-_copy_from_user clock_settime_4-6453 [003] ....... 384.288884: __might_sleep <-__might_fault clock_settime_4-6453 [003] ....... 384.288884: ___might_sleep <-__might_fault clock_settime_4-6453 [003] ....... 384.288884: posix_clock_realtime_set <-SyS_clock_settime clock_settime_4-6453 [003] ....... 384.288884: do_sys_settimeofday64 <-posix_clock_realtime_set clock_settime_4-6453 [003] ....... 384.288884: security_settime64 <-do_sys_settimeofday64 clock_settime_4-6453 [003] ....... 384.288884: cap_settime <-security_settime64 clock_settime_4-6453 [003] ....... 384.288885: capable <-cap_settime clock_settime_4-6453 [003] ....... 384.288885: ns_capable_common <-cap_settime clock_settime_4-6453 [003] ....... 384.288885: security_capable <-ns_capable_common clock_settime_4-6453 [003] ....... 384.288885: cap_capable <-security_capable clock_settime_4-6453 [003] ....... 384.288885: apparmor_capable <-security_capable clock_settime_4-6453 [003] ....... 384.288885: do_settimeofday64 <-do_sys_settimeofday64 clock_settime_4-6453 [003] ....... 384.288886: _raw_spin_lock_irqsave <-do_settimeofday64 clock_settime_4-6453 [003] d...... 384.288886: preempt_count_add <-_raw_spin_lock_irqsave clock_settime_4-6453 [003] d...1.. 384.288886: preempt_count_add <-do_settimeofday64 clock_settime_4-6453 [003] d...2.. 384.288886: timekeeping_forward_now.constprop.12 <-do_settimeofday64 clock_settime_4-6453 [003] d...2.. 384.288886: set_normalized_timespec <-do_settimeofday64 clock_settime_4-6453 [003] d...2.. 384.288886: tk_set_wall_to_mono <-do_settimeofday64 clock_settime_4-6453 [003] d...2.. 384.288886: set_normalized_timespec <-tk_set_wall_to_mono clock_settime_4-6453 [003] d...2.. 384.288886: set_normalized_timespec <-tk_set_wall_to_mono clock_settime_4-6453 [003] d...2.. 384.288886: timekeeping_update <-do_settimeofday64 clock_settime_4-6453 [003] d...2.. 384.288887: ntp_clear <-timekeeping_update clock_settime_4-6453 [003] d...2.. 384.288887: ntp_update_frequency <-ntp_clear clock_settime_4-6453 [003] d...2.. 384.288887: ntp_get_next_leap <-timekeeping_update clock_settime_4-6453 [003] d...2.. 384.288887: update_vsyscall <-timekeeping_update clock_settime_4-6453 [003] d...2.. 384.288887: raw_notifier_call_chain <-timekeeping_update clock_settime_4-6453 [003] d...2.. 384.288887: notifier_call_chain <-timekeeping_update clock_settime_4-6453 [003] d...2.. 384.288887: pvclock_gtod_notify <-notifier_call_chain clock_settime_4-6453 [003] d...2.. 384.288888: preempt_count_add <-pvclock_gtod_notify clock_settime_4-6453 [003] d...3.. 384.288888: preempt_count_sub <-pvclock_gtod_notify clock_settime_4-6453 [003] d...2.. 384.288888: update_fast_timekeeper <-timekeeping_update clock_settime_4-6453 [003] d...2.. 384.288888: update_fast_timekeeper <-timekeeping_update clock_settime_4-6453 [003] d...2.. 384.288888: preempt_count_sub <-do_settimeofday64 clock_settime_4-6453 [003] d...1.. 384.288888: _raw_spin_unlock_irqrestore <-do_settimeofday64 clock_settime_4-6453 [003] ....1.. 384.288888: preempt_count_sub <-_raw_spin_unlock_irqrestore clock_settime_4-6453 [003] ....... 384.288888: clock_was_set <-do_settimeofday64 clock_settime_4-6453 [003] ....... 384.288888: on_each_cpu <-clock_was_set clock_settime_4-6453 [003] ....... 384.288889: preempt_count_add <-on_each_cpu clock_settime_4-6453 [003] ....1.. 384.288889: smp_call_function <-on_each_cpu clock_settime_4-6453 [003] ....1.. 384.288889: preempt_count_add <-smp_call_function clock_settime_4-6453 [003] ....2.. 384.288889: smp_call_function_many <-smp_call_function clock_settime_4-6453 [003] ....2.. 384.288890: native_send_call_func_ipi <-smp_call_function_many clock_settime_4-6453 [003] ....2.. 384.288890: x2apic_send_IPI_allbutself <-native_send_call_func_ipi clock_settime_4-6453 [003] ....2.. 384.288890: __x2apic_send_IPI_mask <-native_send_call_func_ipi clock_settime_4-6453 [003] ....2.. 384.288914: preempt_count_sub <-smp_call_function clock_settime_4-6453 [003] d...1.. 384.288914: retrigger_next_event <-on_each_cpu clock_settime_4-6453 [003] d...1.. 384.288915: _raw_spin_lock <-retrigger_next_event clock_settime_4-6453 [003] d...1.. 384.288915: preempt_count_add <-_raw_spin_lock clock_settime_4-6453 [003] d...2.. 384.288915: ktime_get_update_offsets_now <-retrigger_next_event clock_settime_4-6453 [003] d...2.. 384.288915: __hrtimer_get_next_event <-retrigger_next_event clock_settime_4-6453 [003] d...2.. 384.288915: __hrtimer_next_event_base <-__hrtimer_get_next_event clock_settime_4-6453 [003] d...2.. 384.288915: __hrtimer_next_event_base <-retrigger_next_event clock_settime_4-6453 [003] d...2.. 384.288915: tick_program_event <-retrigger_next_event clock_settime_4-6453 [003] d...2.. 384.288915: clockevents_program_event <-retrigger_next_event clock_settime_4-6453 [003] d...2.. 384.288915: ktime_get <-clockevents_program_event clock_settime_4-6453 [003] d...2.. 384.288916: lapic_next_deadline <-clockevents_program_event clock_settime_4-6453 [003] d...2.. 384.288916: preempt_count_sub <-retrigger_next_event ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ANNOUNCE] v4.11.12-rt13 2017-10-06 2:20 ` Mike Galbraith @ 2017-10-06 10:28 ` Sebastian Andrzej Siewior 2017-10-06 13:33 ` Mike Galbraith 0 siblings, 1 reply; 11+ messages in thread From: Sebastian Andrzej Siewior @ 2017-10-06 10:28 UTC (permalink / raw) To: Mike Galbraith Cc: Thomas Gleixner, LKML, linux-rt-users, Anna-Maria Gleixner, Steven Rostedt On 2017-10-06 04:20:31 [+0200], Mike Galbraith wrote: > On Thu, 2017-10-05 at 17:54 +0200, Sebastian Andrzej Siewior wrote: > > On 2017-10-04 18:07:59 [+0200], Mike Galbraith wrote: > > > Seems combo-patch induced some ltp posix conformance test grumbling. > > > > > > +clock_settime_8_1 ... ... FAILED > > > +clock_settime_4_2 ... ... FAILED > > > +clock_settime_speculative_4_3 ... ... FAILED > > > +timer_settime_5_2 ... ... FAILED > > > +timer_settime_5_1 ... ... FAILED > > > +timer_settime_5_3 ... ... FAILED > > > > > > rtbox:/root # /usr/local/ltp/conformance/interfaces/clock_settime/clock_settime_8-1.run-test > > > Ended too late. 1507131910 >> 1507131908 > > > Test FAILED > > > rtbox:/root # /usr/local/ltp/conformance/interfaces/clock_settime/clock_settime_4-2.run-test > > > timer should have expired _immediately_ > > > rtbox:/root # /usr/local/ltp/conformance/interfaces/clock_settime/speculative/clock_settime_speculative_4-3.run-test > > > Overrun count =0, not # of repeating timer expirys > > > FAIL: Caught 0 signals, not 1 > > > Test FAILED > > > rtbox:/root # /opt/ltp/conformance/interfaces/timer_settime/timer_settime_5-2.run-test > > > signal was not sent > > > > So the last triggers here, too and I have an idea. > > I ran a trace of clock_settime_4-2.run-test, which arms a timer for > now+9 seconds, then clock_settime to advance 4 seconds past timer > expiration, which should cause the timer to fire. Going through > SyS_clock_settime..retrigger_next_event..lapic_next_deadline does not > trigger interrupt, but does without the culprit patch applied. This seems to fix this. Subject: hrtimer: Update offset for soft bases From: Anna-Maria Gleixner <anna-maria@linutronix.de> Date: Fri, 06 Oct 2017 11:28:38 +0200 The offset of the clock bases is done via timekeeping mechanisms. The offsets of the soft bases has to be considered as well. Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de> --- kernel/time/hrtimer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -551,8 +551,14 @@ static inline ktime_t hrtimer_update_bas ktime_t *offs_boot = &base->clock_base[HRTIMER_BASE_BOOTTIME].offset; ktime_t *offs_tai = &base->clock_base[HRTIMER_BASE_TAI].offset; - return ktime_get_update_offsets_now(&base->clock_was_set_seq, + ktime_t now = ktime_get_update_offsets_now(&base->clock_was_set_seq, offs_real, offs_boot, offs_tai); + + base->clock_base[HRTIMER_BASE_REALTIME_SOFT].offset = *offs_real; + base->clock_base[HRTIMER_BASE_BOOTTIME_SOFT].offset = *offs_boot; + base->clock_base[HRTIMER_BASE_TAI_SOFT].offset = *offs_tai; + + return now; } /* Sebastian ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ANNOUNCE] v4.11.12-rt13 2017-10-06 10:28 ` Sebastian Andrzej Siewior @ 2017-10-06 13:33 ` Mike Galbraith 2017-10-06 17:38 ` Mike Galbraith 0 siblings, 1 reply; 11+ messages in thread From: Mike Galbraith @ 2017-10-06 13:33 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: Thomas Gleixner, LKML, linux-rt-users, Anna-Maria Gleixner, Steven Rostedt On Fri, 2017-10-06 at 12:28 +0200, Sebastian Andrzej Siewior wrote: > On 2017-10-06 04:20:31 [+0200], Mike Galbraith wrote: > > On Thu, 2017-10-05 at 17:54 +0200, Sebastian Andrzej Siewior wrote: > > > On 2017-10-04 18:07:59 [+0200], Mike Galbraith wrote: > > > > Seems combo-patch induced some ltp posix conformance test grumbling. > > > > > > > > +clock_settime_8_1 ... ... FAILED > > > > +clock_settime_4_2 ... ... FAILED > > > > +clock_settime_speculative_4_3 ... ... FAILED > > > > +timer_settime_5_2 ... ... FAILED > > > > +timer_settime_5_1 ... ... FAILED > > > > +timer_settime_5_3 ... ... FAILED > > > > > > > > rtbox:/root # /usr/local/ltp/conformance/interfaces/clock_settime/clock_settime_8-1.run-test > > > > Ended too late. 1507131910 >> 1507131908 > > > > Test FAILED > > > > rtbox:/root # /usr/local/ltp/conformance/interfaces/clock_settime/clock_settime_4-2.run-test > > > > timer should have expired _immediately_ > > > > rtbox:/root # /usr/local/ltp/conformance/interfaces/clock_settime/speculative/clock_settime_speculative_4-3.run-test > > > > Overrun count =0, not # of repeating timer expirys > > > > FAIL: Caught 0 signals, not 1 > > > > Test FAILED > > > > rtbox:/root # /opt/ltp/conformance/interfaces/timer_settime/timer_settime_5-2.run-test > > > > signal was not sent > > > > > > So the last triggers here, too and I have an idea. > > > > I ran a trace of clock_settime_4-2.run-test, which arms a timer for > > now+9 seconds, then clock_settime to advance 4 seconds past timer > > expiration, which should cause the timer to fire. Going through > > SyS_clock_settime..retrigger_next_event..lapic_next_deadline does not > > trigger interrupt, but does without the culprit patch applied. > > This seems to fix this. Yup, with this, when we get to clockevents_program_event(), we take the proper if (delta <= 0) path again, and are rewarded with an interrupt. I'll run full ltp again, make sure there are no new failure deltas. > Subject: hrtimer: Update offset for soft bases > From: Anna-Maria Gleixner <anna-maria@linutronix.de> > Date: Fri, 06 Oct 2017 11:28:38 +0200 > > The offset of the clock bases is done via timekeeping mechanisms. The > offsets of the soft bases has to be considered as well. > > Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de> > --- > kernel/time/hrtimer.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > --- a/kernel/time/hrtimer.c > +++ b/kernel/time/hrtimer.c > @@ -551,8 +551,14 @@ static inline ktime_t hrtimer_update_bas > ktime_t *offs_boot = &base->clock_base[HRTIMER_BASE_BOOTTIME].offset; > ktime_t *offs_tai = &base->clock_base[HRTIMER_BASE_TAI].offset; > > - return ktime_get_update_offsets_now(&base->clock_was_set_seq, > + ktime_t now = ktime_get_update_offsets_now(&base->clock_was_set_seq, > offs_real, offs_boot, offs_tai); > + > + base->clock_base[HRTIMER_BASE_REALTIME_SOFT].offset = *offs_real; > + base->clock_base[HRTIMER_BASE_BOOTTIME_SOFT].offset = *offs_boot; > + base->clock_base[HRTIMER_BASE_TAI_SOFT].offset = *offs_tai; > + > + return now; > } > > /* > > Sebastian ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ANNOUNCE] v4.11.12-rt13 2017-10-06 13:33 ` Mike Galbraith @ 2017-10-06 17:38 ` Mike Galbraith 2017-10-07 4:50 ` Mike Galbraith 0 siblings, 1 reply; 11+ messages in thread From: Mike Galbraith @ 2017-10-06 17:38 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: Thomas Gleixner, LKML, linux-rt-users, Anna-Maria Gleixner, Steven Rostedt On Fri, 2017-10-06 at 15:33 +0200, Mike Galbraith wrote: > > I'll run full ltp again, make sure there are no new failure deltas. Haven't done that yet, but I have checked all of the reported failures. time-hrtimer:-Use-softirq-based-wakeups-for-non-RT-threads.patch fixes clock_settime_8-1.run-test, hrtimer:-Update-offset-for-soft-bases.patch fixes the rest. However... homer:..debug/tracing # /usr/local/ltp/conformance/interfaces/clock_settime/clock_settime_8-1.run-test Test PASSED homer:..debug/tracing # chrt -f 1 /usr/local/ltp/conformance/interfaces/clock_settime/clock_settime_8-1.run-test Ended too late. 1507308976 >> 1507308974 Test FAILED That's a bit troubling. No earlier kernel, rt or not, cares about policy. Either now getting a NAK is less than wonderful, but SCHED_FIFO gets a NAK while SCHED_OTHER walks away with an ACK? -Mike ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ANNOUNCE] v4.11.12-rt13 2017-10-06 17:38 ` Mike Galbraith @ 2017-10-07 4:50 ` Mike Galbraith 2017-10-10 16:24 ` Sebastian Andrzej Siewior 0 siblings, 1 reply; 11+ messages in thread From: Mike Galbraith @ 2017-10-07 4:50 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: Thomas Gleixner, LKML, linux-rt-users, Anna-Maria Gleixner, Steven Rostedt On Fri, 2017-10-06 at 19:38 +0200, Mike Galbraith wrote: > On Fri, 2017-10-06 at 15:33 +0200, Mike Galbraith wrote: > > > > I'll run full ltp again, make sure there are no new failure deltas. > > Haven't done that yet, but I have checked all of the reported failures. > > time-hrtimer:-Use-softirq-based-wakeups-for-non-RT-threads.patch fixes > clock_settime_8-1.run-test, hrtimer:-Update-offset-for-soft-bases.patch > fixes the rest. > > However... testcases/open_posix_testsuite/conformance/interfaces/clock_settime/8-1.c: * Steps: * - get time T0 * - in child: set clock_nanosleep() to sleep for SLEEPSEC seconds * - in parent: sleep SMALLTIME (< SLEEPSEC) * - in parent: set time back to T0 * - in child: ensure time when clock_nanosleep() expires is within * ACCEPTABLEDELTA of T0+(SLEEPSEC-SMALLTIME) ... #define SLEEPSEC 5 #define SMALLTIME 2 #define ACCEPTABLEDELTA 1 homer:..debug/tracing # time chrt -o 0 /usr/local/ltp/conformance/interfaces/clock_settime/clock_settime_8-1.run-test Test PASSED real 0m5.002s user 0m0.000s sys 0m0.001s homer:..debug/tracing # time chrt -f 1 /usr/local/ltp/conformance/interfaces/clock_settime/clock_settime_8-1.run-test Ended too late. 1507351636 >> 1507351634 Test FAILED real 0m7.002s user 0m0.000s sys 0m0.002s ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ANNOUNCE] v4.11.12-rt13 2017-10-07 4:50 ` Mike Galbraith @ 2017-10-10 16:24 ` Sebastian Andrzej Siewior 2017-10-10 16:47 ` Sebastian Andrzej Siewior 0 siblings, 1 reply; 11+ messages in thread From: Sebastian Andrzej Siewior @ 2017-10-10 16:24 UTC (permalink / raw) To: Mike Galbraith Cc: Thomas Gleixner, LKML, linux-rt-users, Anna-Maria Gleixner, Steven Rostedt On 2017-10-07 06:50:53 [+0200], Mike Galbraith wrote: > > However... > > testcases/open_posix_testsuite/conformance/interfaces/clock_settime/8-1.c: > * Steps: > * - get time T0 > * - in child: set clock_nanosleep() to sleep for SLEEPSEC seconds > * - in parent: sleep SMALLTIME (< SLEEPSEC) > * - in parent: set time back to T0 > * - in child: ensure time when clock_nanosleep() expires is within > * ACCEPTABLEDELTA of T0+(SLEEPSEC-SMALLTIME) > ... > #define SLEEPSEC 5 > #define SMALLTIME 2 > #define ACCEPTABLEDELTA 1 > > homer:..debug/tracing # time chrt -o 0 /usr/local/ltp/conformance/interfaces/clock_settime/clock_settime_8-1.run-test > Test PASSED > > real 0m5.002s > user 0m0.000s > sys 0m0.001s > homer:..debug/tracing # time chrt -f 1 /usr/local/ltp/conformance/interfaces/clock_settime/clock_settime_8-1.run-test > Ended too late. 1507351636 >> 1507351634 > Test FAILED > > real 0m7.002s > user 0m0.000s > sys 0m0.002s As per POSIX we should sleep only 5 secs despite the CLOCK_REALTIME change. In RT case however we sleep 7 so we somehow account it which is wrong. Sebastian ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ANNOUNCE] v4.11.12-rt13 2017-10-10 16:24 ` Sebastian Andrzej Siewior @ 2017-10-10 16:47 ` Sebastian Andrzej Siewior 2017-10-10 17:27 ` Mike Galbraith 0 siblings, 1 reply; 11+ messages in thread From: Sebastian Andrzej Siewior @ 2017-10-10 16:47 UTC (permalink / raw) To: Mike Galbraith Cc: Thomas Gleixner, LKML, linux-rt-users, Anna-Maria Gleixner, Steven Rostedt On 2017-10-10 18:24:55 [+0200], To Mike Galbraith wrote: > > homer:..debug/tracing # time chrt -f 1 /usr/local/ltp/conformance/interfaces/clock_settime/clock_settime_8-1.run-test > > Ended too late. 1507351636 >> 1507351634 > > Test FAILED > > > > real 0m7.002s > > user 0m0.000s > > sys 0m0.002s > > As per POSIX we should sleep only 5 secs despite the CLOCK_REALTIME > change. In RT case however we sleep 7 so we somehow account it which is > wrong. This should cure it: diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -1258,6 +1258,8 @@ static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id, clock_id = CLOCK_MONOTONIC; else if (clock_id == CLOCK_REALTIME_SOFT) clock_id = CLOCK_MONOTONIC_SOFT; + else if (clock_id == CLOCK_REALTIME_HARD) + clock_id = CLOCK_MONOTONIC; } base = hrtimer_clockid_to_base(clock_id); Sebastian ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ANNOUNCE] v4.11.12-rt13 2017-10-10 16:47 ` Sebastian Andrzej Siewior @ 2017-10-10 17:27 ` Mike Galbraith 0 siblings, 0 replies; 11+ messages in thread From: Mike Galbraith @ 2017-10-10 17:27 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: Thomas Gleixner, LKML, linux-rt-users, Anna-Maria Gleixner, Steven Rostedt On Tue, 2017-10-10 at 18:47 +0200, Sebastian Andrzej Siewior wrote: > On 2017-10-10 18:24:55 [+0200], To Mike Galbraith wrote: > > > homer:..debug/tracing # time chrt -f 1 /usr/local/ltp/conformance/interfaces/clock_settime/clock_settime_8-1.run-test > > > Ended too late. 1507351636 >> 1507351634 > > > Test FAILED > > > > > > real 0m7.002s > > > user 0m0.000s > > > sys 0m0.002s > > > > As per POSIX we should sleep only 5 secs despite the CLOCK_REALTIME > > change. In RT case however we sleep 7 so we somehow account it which is > > wrong. > > This should cure it: Yup, nailed it. I hadn't gotten around to chasing this one (4 weeks vacation === baaaackloooog), but did do the promised full ltp run with fixes applied, and there were no shiny new failures. So tree should now be perfect.. modulo the pile of bugs nobody has as yet noticed :) > diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c > --- a/kernel/time/hrtimer.c > +++ b/kernel/time/hrtimer.c > @@ -1258,6 +1258,8 @@ static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id, > clock_id = CLOCK_MONOTONIC; > else if (clock_id == CLOCK_REALTIME_SOFT) > clock_id = CLOCK_MONOTONIC_SOFT; > + else if (clock_id == CLOCK_REALTIME_HARD) > + clock_id = CLOCK_MONOTONIC; > } > > base = hrtimer_clockid_to_base(clock_id); > > Sebastian ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-10-10 17:27 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-09-05 14:52 [ANNOUNCE] v4.11.12-rt13 Sebastian Andrzej Siewior 2017-10-04 16:07 ` Mike Galbraith 2017-10-05 15:54 ` Sebastian Andrzej Siewior 2017-10-06 2:20 ` Mike Galbraith 2017-10-06 10:28 ` Sebastian Andrzej Siewior 2017-10-06 13:33 ` Mike Galbraith 2017-10-06 17:38 ` Mike Galbraith 2017-10-07 4:50 ` Mike Galbraith 2017-10-10 16:24 ` Sebastian Andrzej Siewior 2017-10-10 16:47 ` Sebastian Andrzej Siewior 2017-10-10 17:27 ` Mike Galbraith
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).