[PATCH 2/2] posix-timers: Use spin_lock_irq() in itimer_delete()

2019-06-21 Thread Sebastian Andrzej Siewior
itimer_delete() uses spin_lock_irqsave() to obtain a `flags' variable which can then be passed to unlock_timer(). It uses already spin_lock locking for the structure instead of lock_timer() because it has a timer which can not be removed by others at this point. The cleanup is always performed with

posix-timers: Small cleanup in itimer_delete()

2019-06-21 Thread Sebastian Andrzej Siewior
Small cleanup / optimisation / clarification in itimer_delete() which I noticed while doing other things… Sebastian

[PATCH 4.9 077/117] selftests/timers: Add missing fflush(stdout) calls

2019-06-20 Thread Greg Kroah-Hartman
-off-by: Kees Cook Signed-off-by: Shuah Khan Signed-off-by: Sasha Levin --- tools/testing/selftests/timers/adjtick.c| 1 + tools/testing/selftests/timers/leapcrash.c | 1 + tools/testing/selftests/timers/mqueue-lat.c | 1 + tools/testing/selftests/timers/nanosleep.c | 1

Re: [REGRESSION v5.2-rc] SUNRPC: Declare RPC timers as TIMER_DEFERRABLE (431235818bc3)

2019-06-19 Thread Jon Hunter
On 18/06/2019 21:18, Anna Schumaker wrote: > > On Tue, 2019-06-18 at 10:35 +0100, Jon Hunter wrote: >> Trond, Anna, >> >> On 12/06/2019 15:23, Jon Hunter wrote: >>> On 05/06/2019 23:01, Trond Myklebust wrote: >>> >>> ... >>> I'd be OK with just reverting this patch if it is causing a p

[PATCH 0/5] Add missing pwm-cells to STM32 timers PWM

2019-06-19 Thread Fabrice Gasnier
This series adds missing generic 3-cells PWM to STM32 timers dt-bindings, PWM driver, and the relevant dtsi files for STM32F4, STM32F7 and STM32MP1. Fabrice Gasnier (5): dt-bindings: pwm-stm32: add #pwm-cells pwm: stm32: use 3 cells ->of_xlate() ARM: dts: stm32: add pwm cells to stm32mp1

Re: [REGRESSION v5.2-rc] SUNRPC: Declare RPC timers as TIMER_DEFERRABLE (431235818bc3)

2019-06-18 Thread Anna Schumaker
On Tue, 2019-06-18 at 10:35 +0100, Jon Hunter wrote: > Trond, Anna, > > On 12/06/2019 15:23, Jon Hunter wrote: > > On 05/06/2019 23:01, Trond Myklebust wrote: > > > > ... > > > > > I'd be OK with just reverting this patch if it is causing a > > > performance > > > issue. > > > > > > Anna? > >

[PATCH repost] kselftests: timers: freq-step: Update maximum acceptable precision and errors

2019-06-18 Thread Miroslav Lichvar
yd Signed-off-by: Miroslav Lichvar --- tools/testing/selftests/timers/freq-step.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/timers/freq-step.c b/tools/testing/selftests/timers/freq-step.c index 8cd10662ffba..4b76450d78d1 100644 --- a/too

Re: [REGRESSION v5.2-rc] SUNRPC: Declare RPC timers as TIMER_DEFERRABLE (431235818bc3)

2019-06-18 Thread Jon Hunter
Trond, Anna, On 12/06/2019 15:23, Jon Hunter wrote: > > On 05/06/2019 23:01, Trond Myklebust wrote: > > ... > >> I'd be OK with just reverting this patch if it is causing a performance >> issue. >> >> Anna? > > Any update on this? I have not seen any update on this. Do you plan to revert this

Re: [PATCH] timers: Fix up get_target_base() to use old base properly

2019-06-17 Thread Peter Xu
fied from a remote CPU, then the only way > > > right now is to dequeue and requeue it with add_timer_on(). > > > > Indeed. If add_timer_on() should always be used when with pinned > > timers, IMHO it would be good to comment probably above TIMER_PINNED > > about t

[PATCH 5.1 078/115] selftests/timers: Add missing fflush(stdout) calls

2019-06-17 Thread Greg Kroah-Hartman
-off-by: Kees Cook Signed-off-by: Shuah Khan Signed-off-by: Sasha Levin --- tools/testing/selftests/timers/adjtick.c| 1 + tools/testing/selftests/timers/leapcrash.c | 1 + tools/testing/selftests/timers/mqueue-lat.c | 1 + tools/testing/selftests/timers/nanosleep.c | 1

[PATCH 4.19 49/75] selftests/timers: Add missing fflush(stdout) calls

2019-06-17 Thread Greg Kroah-Hartman
-off-by: Kees Cook Signed-off-by: Shuah Khan Signed-off-by: Sasha Levin --- tools/testing/selftests/timers/adjtick.c| 1 + tools/testing/selftests/timers/leapcrash.c | 1 + tools/testing/selftests/timers/mqueue-lat.c | 1 + tools/testing/selftests/timers/nanosleep.c | 1

[PATCH 4.14 37/53] selftests/timers: Add missing fflush(stdout) calls

2019-06-17 Thread Greg Kroah-Hartman
-off-by: Kees Cook Signed-off-by: Shuah Khan Signed-off-by: Sasha Levin --- tools/testing/selftests/timers/adjtick.c| 1 + tools/testing/selftests/timers/leapcrash.c | 1 + tools/testing/selftests/timers/mqueue-lat.c | 1 + tools/testing/selftests/timers/nanosleep.c | 1

[tip:sched/core] sched/fair: Don't push cfs_bandwith slack timers forward

2019-06-17 Thread tip-bot for bseg...@google.com
x27;t push cfs_bandwith slack timers forward When a cfs_rq sleeps and returns its quota, we delay for 5ms before waking any throttled cfs_rqs to coalesce with other cfs_rqs going to sleep, as this has to be done outside of the rq lock we hold. The current code waits for 5ms without any sleeps, inste

Re: [PATCH] timers: Fix up get_target_base() to use old base properly

2019-06-17 Thread Thomas Gleixner
> > Indeed. If add_timer_on() should always be used when with pinned > timers, IMHO it would be good to comment probably above TIMER_PINNED > about the fact so people will never misuse the interfaces (it seems to > be mis-used somehow but I cannot be 100% sure, please see below

Re: [PATCH] timers: Fix up get_target_base() to use old base properly

2019-06-17 Thread Peter Xu
ase, unsigned > > tflags) > > !(tflags & TIMER_PINNED)) > > return get_timer_cpu_base(tflags, get_nohz_timer_target()); > > #endif > > - return get_timer_this_cpu_base(tflags); > > + return base; > > } > > Timers a

Re: [PATCH] timers: Fix up get_target_base() to use old base properly

2019-06-16 Thread Thomas Gleixner
me/timer.c > +++ b/kernel/time/timer.c > @@ -868,7 +868,7 @@ get_target_base(struct timer_base *base, unsigned tflags) > !(tflags & TIMER_PINNED)) > return get_timer_cpu_base(tflags, get_nohz_timer_target()); > #endif > - return get_timer_this_cpu_base

Re: [PATCH] timers: Fix up get_target_base() to use old base properly

2019-06-16 Thread Peter Xu
On Mon, Jun 03, 2019 at 09:29:44PM +0800, Peter Xu wrote: > get_target_base() in the timer code is not using the "base" parameter > at all. My gut feeling is that instead of removing that extra > parameter, what we really want to do is "return the old base if it > does not suite for a new one". P

Re: [PATCHv4 07/28] posix-timers/timens: Take into account clock offsets

2019-06-16 Thread Dmitry Safonov
On 6/14/19 2:42 PM, Thomas Gleixner wrote: > On Wed, 12 Jun 2019, Dmitry Safonov wrote: > >> Subject: posix-timers/timens: Take into account clock offsets > > Please avoid that '/timens' appendix. It's not really a new subsystem or > subfunction of posix

Re: [PATCHv4 07/28] posix-timers/timens: Take into account clock offsets

2019-06-14 Thread Thomas Gleixner
On Wed, 12 Jun 2019, Dmitry Safonov wrote: > Subject: posix-timers/timens: Take into account clock offsets Please avoid that '/timens' appendix. It's not really a new subsystem or subfunction of posix-timers. posix-timers: Add time namespace support to common_timer_set() &g

[PATCHv4 07/28] posix-timers/timens: Take into account clock offsets

2019-06-12 Thread Dmitry Safonov
From: Andrei Vagin Wire timer_settime() syscall into time namespace virtualization. Signed-off-by: Andrei Vagin Co-developed-by: Dmitry Safonov Signed-off-by: Dmitry Safonov --- kernel/time/posix-timers.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/time/posix-timers.c b/kern

Re: [REGRESSION v5.2-rc] SUNRPC: Declare RPC timers as TIMER_DEFERRABLE (431235818bc3)

2019-06-12 Thread Jon Hunter
On 05/06/2019 23:01, Trond Myklebust wrote: ... > I'd be OK with just reverting this patch if it is causing a performance > issue. > > Anna? Any update on this? Thanks Jon -- nvpublic

Re: [PATCH v2] sched/fair: don't push cfs_bandwith slack timers forward

2019-06-11 Thread bsegall
Peter Zijlstra writes: > On Thu, Jun 06, 2019 at 10:21:01AM -0700, bseg...@google.com wrote: >> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h >> index efa686eeff26..60219acda94b 100644 >> --- a/kernel/sched/sched.h >> +++ b/kernel/sched/sched.h >> @@ -356,6 +356,7 @@ struct cfs_bandwid

Re: [PATCH v2] sched/fair: don't push cfs_bandwith slack timers forward

2019-06-11 Thread Phil Auld
On Tue, Jun 11, 2019 at 04:24:43PM +0200 Peter Zijlstra wrote: > On Tue, Jun 11, 2019 at 10:12:19AM -0400, Phil Auld wrote: > > > That looks reasonable to me. > > > > Out of curiosity, why not bool? Is sizeof bool architecture dependent? > > Yeah, sizeof(_Bool) is unspecified and depends on ABI

Re: [PATCH v2] sched/fair: don't push cfs_bandwith slack timers forward

2019-06-11 Thread Peter Zijlstra
On Tue, Jun 11, 2019 at 10:12:19AM -0400, Phil Auld wrote: > That looks reasonable to me. > > Out of curiosity, why not bool? Is sizeof bool architecture dependent? Yeah, sizeof(_Bool) is unspecified and depends on ABI. It is mostly 1, but there are known cases where it is 4.

Re: [PATCH v2] sched/fair: don't push cfs_bandwith slack timers forward

2019-06-11 Thread Phil Auld
On Tue, Jun 11, 2019 at 03:53:25PM +0200 Peter Zijlstra wrote: > On Thu, Jun 06, 2019 at 10:21:01AM -0700, bseg...@google.com wrote: > > diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h > > index efa686eeff26..60219acda94b 100644 > > --- a/kernel/sched/sched.h > > +++ b/kernel/sched/sched.h

Re: [PATCH v2] sched/fair: don't push cfs_bandwith slack timers forward

2019-06-11 Thread Peter Zijlstra
On Thu, Jun 06, 2019 at 10:21:01AM -0700, bseg...@google.com wrote: > diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h > index efa686eeff26..60219acda94b 100644 > --- a/kernel/sched/sched.h > +++ b/kernel/sched/sched.h > @@ -356,6 +356,7 @@ struct cfs_bandwidth { > u64

Re: [PATCH v2] sched/fair: don't push cfs_bandwith slack timers forward

2019-06-11 Thread Peter Zijlstra
On Tue, Jun 11, 2019 at 09:04:17AM -0400, Phil Auld wrote: > On Thu, Jun 06, 2019 at 10:21:01AM -0700 bseg...@google.com wrote: > > When a cfs_rq sleeps and returns its quota, we delay for 5ms before > > waking any throttled cfs_rqs to coalesce with other cfs_rqs going to > > sleep, as this has to

Re: [PATCH v2] sched/fair: don't push cfs_bandwith slack timers forward

2019-06-11 Thread Phil Auld
On Thu, Jun 06, 2019 at 10:21:01AM -0700 bseg...@google.com wrote: > When a cfs_rq sleeps and returns its quota, we delay for 5ms before > waking any throttled cfs_rqs to coalesce with other cfs_rqs going to > sleep, as this has to be done outside of the rq lock we hold. > > The current code waits

Re: [patch 2/3] timers: do not raise softirq unconditionally (spinlockless version)

2019-06-11 Thread Anna-Maria Gleixner
ruct timer_list *timer) { - if (!is_timers_nohz_active()) - return; - - /* -* TODO: This wants some optimizing similar to the code below, but we -* will do that when we switch from push to pull for deferrable timers. -*/ - if (timer->

Re: [PATCH] timers: Fix up get_target_base() to use old base properly

2019-06-09 Thread Peter Xu
f it's not a housekeeping cpu (because get_nohz_timer_target() will always try to provision timers onto the housekeeping ones), or did I misunderstand your comment? #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON) if (static_branch_likely(&timers_migration_enabled) &

[PATCH v2] sched/fair: don't push cfs_bandwith slack timers forward

2019-06-06 Thread bsegall
When a cfs_rq sleeps and returns its quota, we delay for 5ms before waking any throttled cfs_rqs to coalesce with other cfs_rqs going to sleep, as this has to be done outside of the rq lock we hold. The current code waits for 5ms without any sleeps, instead of waiting for 5ms from the first sleep,

Re: [PATCH] timers: Fix up get_target_base() to use old base properly

2019-06-06 Thread Marcelo Tosatti
On Mon, Jun 03, 2019 at 09:29:44PM +0800, Peter Xu wrote: > get_target_base() in the timer code is not using the "base" parameter > at all. My gut feeling is that instead of removing that extra > parameter, what we really want to do is "return the old base if it > does not suite for a new one". H

Re: [patch 2/3] timers: do not raise softirq unconditionally (spinlockless version)

2019-06-06 Thread Marcelo Tosatti
On Tue, Jun 04, 2019 at 02:29:31PM +0800, Peter Xu wrote: > On Mon, Apr 15, 2019 at 05:12:15PM -0300, Marcelo Tosatti wrote: > > Check base->pending_map locklessly and skip raising timer softirq > > if empty. > > > > What allows the lockless (and potentially racy against mod_timer) > > check is

Re: [PATCH] sched/fair: don't push cfs_bandwith slack timers forward

2019-06-06 Thread Xunlei Pang
On 2019/6/6 AM 4:06, bseg...@google.com wrote: > When a cfs_rq sleeps and returns its quota, we delay for 5ms before > waking any throttled cfs_rqs to coalesce with other cfs_rqs going to > sleep, as this has has to be done outside of the rq lock we hold. two "has". > > The current code waits fo

Re: [REGRESSION v5.2-rc] SUNRPC: Declare RPC timers as TIMER_DEFERRABLE (431235818bc3)

2019-06-05 Thread Trond Myklebust
("SUNRPC: Declare RPC > timers as TIMER_DEFERRABLE") and reverting this on top of v5.2-rc3 > does > appear to resolve the problem. > > The cause of the suspend failure appears to be a long delay observed > sometimes when resuming from suspend, and this is causing our test t

[REGRESSION v5.2-rc] SUNRPC: Declare RPC timers as TIMER_DEFERRABLE (431235818bc3)

2019-06-05 Thread Jon Hunter
Hi Trond, I have been noticing intermittent failures with a system suspend test on some of our machines that have a NFS mounted root file-system. Bisecting this issue points to your commit 431235818bc3 ("SUNRPC: Declare RPC timers as TIMER_DEFERRABLE") and reverting this on top of v5.

[PATCH AUTOSEL 4.9 13/17] selftests/timers: Add missing fflush(stdout) calls

2019-06-04 Thread Sasha Levin
can enjoy. Signed-off-by: Kees Cook Signed-off-by: Shuah Khan Signed-off-by: Sasha Levin --- tools/testing/selftests/timers/adjtick.c| 1 + tools/testing/selftests/timers/leapcrash.c | 1 + tools/testing/selftests/timers/mqueue-lat.c | 1 + tools/testing/selftests/timers

[PATCH AUTOSEL 4.14 20/24] selftests/timers: Add missing fflush(stdout) calls

2019-06-04 Thread Sasha Levin
can enjoy. Signed-off-by: Kees Cook Signed-off-by: Shuah Khan Signed-off-by: Sasha Levin --- tools/testing/selftests/timers/adjtick.c| 1 + tools/testing/selftests/timers/leapcrash.c | 1 + tools/testing/selftests/timers/mqueue-lat.c | 1 + tools/testing/selftests/timers

Re: [patch 2/3] timers: do not raise softirq unconditionally (spinlockless version)

2019-06-03 Thread Peter Xu
On Mon, Apr 15, 2019 at 05:12:15PM -0300, Marcelo Tosatti wrote: > Check base->pending_map locklessly and skip raising timer softirq > if empty. > > What allows the lockless (and potentially racy against mod_timer) > check is that mod_timer will raise another timer softirq after > modifying base

Re: [PATCH] timers: Fix up get_target_base() to use old base properly

2019-06-03 Thread Peter Xu
On Mon, Jun 03, 2019 at 09:29:44PM +0800, Peter Xu wrote: > get_target_base() in the timer code is not using the "base" parameter > at all. My gut feeling is that instead of removing that extra > parameter, what we really want to do is "return the old base if it > does not suite for a new one". I

[PATCH v4 01/10] clocksource/drivers/tegra: Support per-CPU timers on all Tegra's

2019-06-03 Thread Dmitry Osipenko
Assign TMR1-4 per-CPU core on 32bit Tegra's in a way it is done for Tegra210. In a result each core can handle its own timer events, less code is unique to ARM64 and Tegra's clock events driver now has higher rating on all Tegra's, replacing the ARM's TWD timer which isn't very accurate due to the

[PATCH] timers: Fix up get_target_base() to use old base properly

2019-06-03 Thread Peter Xu
get_target_base() in the timer code is not using the "base" parameter at all. My gut feeling is that instead of removing that extra parameter, what we really want to do is "return the old base if it does not suite for a new one". CC: Thomas Gleixner CC: John Stultz CC: Stephen Boyd CC: Luiz Ca

Re: [patch 2/3] timers: do not raise softirq unconditionally (spinlockless version)

2019-05-31 Thread Anna-Maria Gleixner
t; + > > > +#ifdef CONFIG_PREEMPT_RT_FULL > > > +/* On RT, irq work runs from softirq */ > > > + if (irq_work_needs_cpu()) > > > + goto raise; > > > > So with this patch and the change you made in the patch before, timers on > > RT are expired only w

Re: [patch 1/3] timers: raise timer softirq on __mod_timer/add_timer_on

2019-05-30 Thread Marcelo Tosatti
Hi Anna-Maria, On Wed, May 29, 2019 at 04:53:05PM +0200, Anna-Maria Gleixner wrote: > On Mon, 15 Apr 2019, Marcelo Tosatti wrote: > > [...] > > > The patch "timers: do not raise softirq unconditionally" from Thomas > > attempts to address that by checki

Re: [patch 2/3] timers: do not raise softirq unconditionally (spinlockless version)

2019-05-30 Thread Marcelo Tosatti
15 14:22:56.755047354 > > -0300 > > @@ -1776,6 +1776,24 @@ > > if (time_before(jiffies, base->clk)) > > return; > > } > > + > > +#ifdef CONFIG_PREEMPT_RT_FULL > > +/* On RT, irq work runs from softirq */ > >

Re: [patch 2/3] timers: do not raise softirq unconditionally (spinlockless version)

2019-05-29 Thread Anna-Maria Gleixner
ase->clk)) > return; > } > + > +#ifdef CONFIG_PREEMPT_RT_FULL > +/* On RT, irq work runs from softirq */ > + if (irq_work_needs_cpu()) > + goto raise; So with this patch and the change you made in the patch before, timers on RT are expire

Re: [patch 1/3] timers: raise timer softirq on __mod_timer/add_timer_on

2019-05-29 Thread Anna-Maria Gleixner
On Mon, 15 Apr 2019, Marcelo Tosatti wrote: [...] > The patch "timers: do not raise softirq unconditionally" from Thomas > attempts to address that by checking, in the sched tick, whether its > necessary to raise the timer softirq. Unfortunately, it attempts to grab >

[PATCH v3 1/8] clocksource/drivers/tegra: Support per-CPU timers on all Tegra's

2019-05-24 Thread Dmitry Osipenko
Assign TMR1-4 per-CPU core on 32bit Tegra's in a way it is done for Tegra210. In a result each core can handle its own timer events, less code is unique to ARM64 and Tegra's clock events driver now has higher rating on all Tegra's, replacing the ARM's TWD timer which isn't very accurate due to the

[PATCH 2/2] selftests/timers: Add missing fflush(stdout) calls

2019-05-20 Thread Kees Cook
When running under a pipe, some timer tests would not report output in real-time because stdout flushes were missing after printf()s that lacked a newline. This adds them to restore real-time status output that humans can enjoy. Signed-off-by: Kees Cook --- tools/testing/selftests/timers

Re: [GIT PULL] x86/timers updates for v5.2

2019-05-06 Thread pr-tracker-bot
The pull request you sent on Mon, 6 May 2019 12:52:12 +0200: > git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-timers-for-linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/db10ad041b318a07985363e243742a07f4b0f44b Thank you! -- Deet-doot-dot, I a

[GIT PULL] x86/timers updates for v5.2

2019-05-06 Thread Ingo Molnar
Linus, Please pull the latest x86-timers-for-linus git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-timers-for-linus # HEAD: 81423c37415fe45057d64196ae0ce8e17a9c7148 x86/timer: Don't inline __const_udelay() Two changes: an LTO improvement, plus th

[PATCH v2 1/7] clocksource/drivers/tegra: Support per-CPU timers on all Tegra's

2019-05-05 Thread Dmitry Osipenko
Assign TMR1-4 per-CPU core on 32bit Tegra's in a way it is done for Tegra210. In a result each core can handle its own timer events, less code is unique to ARM64 and Tegra's clock events driver now has higher rating on all Tegra's, replacing the ARM's TWD timer which isn't very accurate due to the

[PATCH 4.14 33/53] sched/deadline: Correctly handle active 0-lag timers

2019-04-30 Thread Greg Kroah-Hartman
From: luca abeni commit 1b02cd6a2d7f3e2a6a5262887d2cb2912083e42f upstream. syzbot reported the following warning: [ ] WARNING: CPU: 4 PID: 17089 at kernel/sched/deadline.c:255 task_non_contending+0xae0/0x1950 line 255 of deadline.c is: WARN_ON(hrtimer_active(&dl_se->inactive_timer

[PATCH 5.0 54/89] sched/deadline: Correctly handle active 0-lag timers

2019-04-30 Thread Greg Kroah-Hartman
From: luca abeni commit 1b02cd6a2d7f3e2a6a5262887d2cb2912083e42f upstream. syzbot reported the following warning: [ ] WARNING: CPU: 4 PID: 17089 at kernel/sched/deadline.c:255 task_non_contending+0xae0/0x1950 line 255 of deadline.c is: WARN_ON(hrtimer_active(&dl_se->inactive_timer

[PATCH 4.19 057/100] sched/deadline: Correctly handle active 0-lag timers

2019-04-30 Thread Greg Kroah-Hartman
From: luca abeni commit 1b02cd6a2d7f3e2a6a5262887d2cb2912083e42f upstream. syzbot reported the following warning: [ ] WARNING: CPU: 4 PID: 17089 at kernel/sched/deadline.c:255 task_non_contending+0xae0/0x1950 line 255 of deadline.c is: WARN_ON(hrtimer_active(&dl_se->inactive_timer

Re: [PATCHv3 06/27] posix-timers/timens: Take into account clock offsets

2019-04-25 Thread Thomas Gleixner
On Thu, 25 Apr 2019, Dmitry Safonov wrote: > From: Andrei Vagin > > Wire timer_settime() syscall into time namespace virtualization. > > Signed-off-by: Andrei Vagin > Signed-off-by: Dmitry Safonov > --- > kernel/time/alarmtimer.c | 3 +++ > kernel/time/posix-timers.c | 2 ++ > 2 files chan

[PATCHv3 06/27] posix-timers/timens: Take into account clock offsets

2019-04-25 Thread Dmitry Safonov
From: Andrei Vagin Wire timer_settime() syscall into time namespace virtualization. Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov --- kernel/time/alarmtimer.c | 3 +++ kernel/time/posix-timers.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/kernel/time/alarmtimer.c b/ke

[PATCH v1 1/7] clocksource/drivers/tegra: Support per-CPU timers on all Tegra's

2019-04-24 Thread Dmitry Osipenko
Assign TMR1-4 per-CPU core on 32bit Tegra's in a way it is done for Tegra210. In a result each core can handle its own timer events, less code is unique to ARM64 and Tegra's clock events driver now has higher rating on all Tegra's, replacing the ARM's TWD timer which isn't very accurate due to the

[PATCH 4.19 76/96] timers/sched_clock: Prevent generic sched_clock wrap caused by tick_freeze()

2019-04-24 Thread Greg Kroah-Hartman
From: Chang-An Chen commit 3f2552f7e9c5abef2775c53f7af66532f8bf65bc upstream. tick_freeze() introduced by suspend-to-idle in commit 124cf9117c5f ("PM / sleep: Make it possible to quiesce timers during suspend-to-idle") uses timekeeping_suspend() instead of syscore_suspend() during

[PATCH 5.0 099/115] timers/sched_clock: Prevent generic sched_clock wrap caused by tick_freeze()

2019-04-24 Thread Greg Kroah-Hartman
From: Chang-An Chen commit 3f2552f7e9c5abef2775c53f7af66532f8bf65bc upstream. tick_freeze() introduced by suspend-to-idle in commit 124cf9117c5f ("PM / sleep: Make it possible to quiesce timers during suspend-to-idle") uses timekeeping_suspend() instead of syscore_suspend() during

[tip:x86/timers] x86/timer: Don't inline __const_udelay()

2019-04-19 Thread tip-bot for Andi Kleen
Commit-ID: 81423c37415fe45057d64196ae0ce8e17a9c7148 Gitweb: https://git.kernel.org/tip/81423c37415fe45057d64196ae0ce8e17a9c7148 Author: Andi Kleen AuthorDate: Fri, 29 Mar 2019 17:47:38 -0700 Committer: Thomas Gleixner CommitDate: Fri, 19 Apr 2019 17:49:47 +0200 x86/timer: Don't inline

[tip:timers/urgent] timers/sched_clock: Prevent generic sched_clock wrap caused by tick_freeze()

2019-04-18 Thread tip-bot for Chang-An Chen
Commit-ID: 3f2552f7e9c5abef2775c53f7af66532f8bf65bc Gitweb: https://git.kernel.org/tip/3f2552f7e9c5abef2775c53f7af66532f8bf65bc Author: Chang-An Chen AuthorDate: Fri, 29 Mar 2019 10:59:09 +0800 Committer: Thomas Gleixner CommitDate: Thu, 18 Apr 2019 14:34:53 +0200 timers/sched_clock

[tip:sched/urgent] sched/deadline: Correctly handle active 0-lag timers

2019-04-16 Thread tip-bot for luca abeni
handle active 0-lag timers syzbot reported the following warning: [ ] WARNING: CPU: 4 PID: 17089 at kernel/sched/deadline.c:255 task_non_contending+0xae0/0x1950 line 255 of deadline.c is: WARN_ON(hrtimer_active(&dl_se->inactive_timer)); in task_non_contending(). Unfortunat

[patch 3/3] timers: condense pending bitmap information

2019-04-15 Thread Marcelo Tosatti
Condense the pending bitmap information in a bool. Improves cyclictest results by 4us. Signed-off-by: Marcelo Tosatti --- kernel/time/timer.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) Index: linux-rt-devel/kernel/time/timer.c ===

[patch 1/3] timers: raise timer softirq on __mod_timer/add_timer_on

2019-04-15 Thread Marcelo Tosatti
For isolated CPUs, we'd like to skip awakening ktimersoftd (the switch to and then back from ktimersoftd takes 10us in virtualized environments, in addition to other OS overhead, which exceeds telco requirements for packet forwarding for 5G) from the sched tick. The patch "timers: do

[patch 2/3] timers: do not raise softirq unconditionally (spinlockless version)

2019-04-15 Thread Marcelo Tosatti
Check base->pending_map locklessly and skip raising timer softirq if empty. What allows the lockless (and potentially racy against mod_timer) check is that mod_timer will raise another timer softirq after modifying base->pending_map. Signed-off-by: Marcelo Tosatti --- kernel/time/timer.c |

Re: [PATCH 0/4] timers: Fix and improve tracing and documentation

2019-04-03 Thread Peter Zijlstra
On Thu, Mar 21, 2019 at 01:09:17PM +0100, Anna-Maria Gleixner wrote: > Hi, > > the patch series was developed during investigating timer problems and > timer improvements. It contains a struct documentation fix in tick-sched > and a fixes as well as an improvement for timer tracing. > > Thanks, >

[PATCH 3.16 96/99] net/hamradio/6pack: use mod_timer() to rearm timers

2019-04-02 Thread Ben Hutchings
Andreas Koensgen Signed-off-by: David S. Miller [bwh: Backported to 3.16: Move initialisation of resync_t.data and resync_t.function to sixpack_open(), as done by upstream commit 8e763de0b91d "net/hamradio/6pack: Convert timers to use timer_setup()".] Signed-off-by: Ben Hutchings ---

Re: [PATCH] sched/deadline: correctly handle active 0-lag timers

2019-03-27 Thread Juri Lelli
Hi, On 25/03/19 14:15, luca abeni wrote: > syzbot reported the following warning: > [  948.126369] WARNING: CPU: 4 PID: 17089 at kernel/sched/deadline.c:255 > task_non_contending+0xae0/0x1950 > [  948.130198] Kernel panic - not syncing: panic_on_warn set ... > [  948.130198] > [  948.134221] CPU:

[PATCH] sched/deadline: correctly handle active 0-lag timers

2019-03-25 Thread luca abeni
syzbot reported the following warning: [  948.126369] WARNING: CPU: 4 PID: 17089 at kernel/sched/deadline.c:255 task_non_contending+0xae0/0x1950 [  948.130198] Kernel panic - not syncing: panic_on_warn set ... [  948.130198] [  948.134221] CPU: 4 PID: 17089 Comm: syz-executor.1 Not tainted 4.19.27

Re: [GIT pull] timers updates for 5.1

2019-03-24 Thread pr-tracker-bot
The pull request you sent on Sun, 24 Mar 2019 14:12:21 -: > git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git > timers-urgent-for-linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/a75eda7bce5e8ffdebe6ddfe513b31e5ec3527d2 Thank you! -- Deet-do

[GIT pull] timers updates for 5.1

2019-03-24 Thread Thomas Gleixner
Linus, please pull the latest timers-urgent-for-linus git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-urgent-for-linus A set of small fixes plus the removal of stale board support code: - Remove the board support code from the clpx711x clocksource

[tip:x86/timers] x86/tsc: Add option to disable tsc clocksource watchdog

2019-03-22 Thread tip-bot for Juri Lelli
Commit-ID: 0f0b7e1cc7abf8e1a8b301f2868379d611d05ae2 Gitweb: https://git.kernel.org/tip/0f0b7e1cc7abf8e1a8b301f2868379d611d05ae2 Author: Juri Lelli AuthorDate: Thu, 7 Mar 2019 13:09:13 +0100 Committer: Thomas Gleixner CommitDate: Fri, 22 Mar 2019 14:14:58 +0100 x86/tsc: Add option to di

[PATCH 0/4] timers: Fix and improve tracing and documentation

2019-03-21 Thread Anna-Maria Gleixner
Hi, the patch series was developed during investigating timer problems and timer improvements. It contains a struct documentation fix in tick-sched and a fixes as well as an improvement for timer tracing. Thanks, Anna-Maria Anna-Maria Gleixner (4): tick-sched: Update tick_sched struc

Re: [PATCH v2] selftest/timers: Remove duplicate header

2019-03-19 Thread Souptick Joarder
gt; > tools/testing/selftests/timers/skew_consistency.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/tools/testing/selftests/timers/skew_consistency.c > b/tools/testing/selftests/timers/skew_consistency.c > index 022b711..8066be9 100644 > --- a/tools/testing/selfte

[PATCH 4.20 039/171] selftests: timers: use LDLIBS instead of LDFLAGS

2019-03-12 Thread Greg Kroah-Hartman
-O2 -pipe -g -feliminate-unused-debug-types -O3 -Wl,-no-as-needed -Wall -DKTEST -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lrt -lpthread posix_timers.c -o /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/timers/posix_timers /tmp

[PATCH 4.14 065/135] selftests: timers: use LDLIBS instead of LDFLAGS

2019-03-12 Thread Greg Kroah-Hartman
-O2 -pipe -g -feliminate-unused-debug-types -O3 -Wl,-no-as-needed -Wall -DKTEST -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lrt -lpthread posix_timers.c -o /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/timers/posix_timers /tmp

[PATCH 4.19 033/149] selftests: timers: use LDLIBS instead of LDFLAGS

2019-03-12 Thread Greg Kroah-Hartman
-O2 -pipe -g -feliminate-unused-debug-types -O3 -Wl,-no-as-needed -Wall -DKTEST -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lrt -lpthread posix_timers.c -o /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/timers/posix_timers /tmp

Re: [PATCH v3] posix-cpu-timers: Avoid undefined behaviour in timespec64_to_ns()

2019-03-07 Thread Xiongfeng Wang
On 2019/3/6 18:38, Arnd Bergmann wrote: > On Wed, Mar 6, 2019 at 9:41 AM Xiongfeng Wang > wrote: >> >> >> diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c >> index 0e84bb7..4b57566 100644 >> --- a/kernel/time/posix-timers.c >> +++ b/kernel/time/posix-timers.c >> @@ -856,6 +

[PATCH v2] selftest/timers: Remove duplicate header

2019-03-06 Thread Souptick Joarder
From: Sabyasachi Gupta Remove duplicate header which is included twice. Signed-off-by: Sabyasachi Gupta Signed-off-by: Souptick Joarder --- v2: Corrected format. tools/testing/selftests/timers/skew_consistency.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests

Re: [PATCH v3] posix-cpu-timers: Avoid undefined behaviour in timespec64_to_ns()

2019-03-06 Thread Arnd Bergmann
On Wed, Mar 6, 2019 at 9:41 AM Xiongfeng Wang wrote: > > > diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c > index 0e84bb7..4b57566 100644 > --- a/kernel/time/posix-timers.c > +++ b/kernel/time/posix-timers.c > @@ -856,6 +856,10 @@ static int do_timer_settime(timer_t timer_id,

[PATCH v3] posix-cpu-timers: Avoid undefined behaviour in timespec64_to_ns()

2019-03-06 Thread Xiongfeng Wang
When I ran Syzkaller testsuite, I got the following call trace. UBSAN: Undefined behaviour in ./include/linux/time64.h:120:27 signed integer overflow: 8243129037239968815 * 10 cannot be represented in type 'lon

[PATCH] selftest/timers: Remove duplicate header

2019-03-04 Thread Souptick Joarder
Remove duplicate header which is included twice. Signed-off-by: Sabyasachi Gupta Signed-off-by: Souptick Joarder --- tools/testing/selftests/timers/skew_consistency.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/timers/skew_consistency.c b/tools/testing/selftests

Re: [PATCH v2] posix-cpu-timers: Avoid undefined behaviour in timespec64_to_ns()

2019-02-28 Thread Arnd Bergmann
On Thu, Feb 28, 2019 at 11:35 AM Thomas Gleixner wrote: > On Thu, 28 Feb 2019, Arnd Bergmann wrote: > > On Thu, Feb 28, 2019 at 5:25 AM Deepa Dinamani > > wrote: > > > > > > On Tue, Feb 26, 2019 at 11:52 PM Xiongfeng Wang > > > wrote: > > I think returning EINVAL here is better than silently tr

Re: [PATCH v2] posix-cpu-timers: Avoid undefined behaviour in timespec64_to_ns()

2019-02-28 Thread Thomas Gleixner
On Thu, 28 Feb 2019, Arnd Bergmann wrote: > On Thu, Feb 28, 2019 at 5:25 AM Deepa Dinamani wrote: > > > > On Tue, Feb 26, 2019 at 11:52 PM Xiongfeng Wang > > wrote: > > > > > > +++ b/kernel/time/posix-timers.c > > > @@ -853,8 +853,8 @@ static int do_timer_settime(timer_t timer_id, int > > > flag

Re: [PATCH v2] posix-cpu-timers: Avoid undefined behaviour in timespec64_to_ns()

2019-02-28 Thread Arnd Bergmann
On Thu, Feb 28, 2019 at 5:25 AM Deepa Dinamani wrote: > > On Tue, Feb 26, 2019 at 11:52 PM Xiongfeng Wang > wrote: > > > > +++ b/kernel/time/posix-timers.c > > @@ -853,8 +853,8 @@ static int do_timer_settime(timer_t timer_id, int flags, > > unsigned long flag; > > int error = 0; >

Re: [PATCH v2] posix-cpu-timers: Avoid undefined behaviour in timespec64_to_ns()

2019-02-27 Thread Deepa Dinamani
On Tue, Feb 26, 2019 at 11:52 PM Xiongfeng Wang wrote: > > When I ran Syzkaller testsuite, I got the following call trace. > > UBSAN: Undefined behaviour in ./include/linux/time64.h:120:27 > signed integer overflow: >

[PATCH v2] posix-cpu-timers: Avoid undefined behaviour in timespec64_to_ns()

2019-02-26 Thread Xiongfeng Wang
When I ran Syzkaller testsuite, I got the following call trace. UBSAN: Undefined behaviour in ./include/linux/time64.h:120:27 signed integer overflow: 8243129037239968815 * 10 cannot be represented in type 'lon

Re: [RFC PATCH] posix-cpu-timers: Avoid undefined behaviour in timespec64_to_ns()

2019-02-26 Thread Xiongfeng Wang
On 2019/2/27 10:38, Deepa Dinamani wrote: > On Tue, Feb 26, 2019 at 6:07 PM Xiongfeng Wang > wrote: >> >> When I ran Syzkaller testsuite, I got the following call trace. >> >> UBSAN: Undefined behaviour in ./includ

Re: [RFC PATCH] posix-cpu-timers: Avoid undefined behaviour in timespec64_to_ns()

2019-02-26 Thread Deepa Dinamani
On Tue, Feb 26, 2019 at 6:07 PM Xiongfeng Wang wrote: > > When I ran Syzkaller testsuite, I got the following call trace. > > UBSAN: Undefined behaviour in ./include/linux/time64.h:120:27 > signed integer overflow: >

[RFC PATCH] posix-cpu-timers: Avoid undefined behaviour in timespec64_to_ns()

2019-02-26 Thread Xiongfeng Wang
When I ran Syzkaller testsuite, I got the following call trace. UBSAN: Undefined behaviour in ./include/linux/time64.h:120:27 signed integer overflow: 8243129037239968815 * 10 cannot be represented in type 'lon

[PATCH 4.20 077/183] scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes

2019-02-25 Thread Greg Kroah-Hartman
cmd timer or qfull timer. For some corner cases the timers are always working only for the ringbuffer's and full queue's newest cmd. That's to say the timer won't be fired even if one cmd has been stuck for a very long time and the deadline is reached. This fix will keep the cm

[PATCH 4.19 066/152] scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes

2019-02-25 Thread Greg Kroah-Hartman
cmd timer or qfull timer. For some corner cases the timers are always working only for the ringbuffer's and full queue's newest cmd. That's to say the timer won't be fired even if one cmd has been stuck for a very long time and the deadline is reached. This fix will keep the cm

[PATCH AUTOSEL 4.20 41/72] selftests: timers: use LDLIBS instead of LDFLAGS

2019-02-23 Thread Sasha Levin
-DKTEST -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lrt -lpthread posix_timers.c -o /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/timers/posix_timers /tmp/cc1FTZzT.o: In function `check_timer_create': /usr/src/debug/kselftests/4.

[PATCH AUTOSEL 4.19 37/65] selftests: timers: use LDLIBS instead of LDFLAGS

2019-02-23 Thread Sasha Levin
-DKTEST -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lrt -lpthread posix_timers.c -o /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/timers/posix_timers /tmp/cc1FTZzT.o: In function `check_timer_create': /usr/src/debug/kselftests/4.

[PATCH AUTOSEL 4.14 23/45] selftests: timers: use LDLIBS instead of LDFLAGS

2019-02-23 Thread Sasha Levin
-DKTEST -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lrt -lpthread posix_timers.c -o /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/timers/posix_timers /tmp/cc1FTZzT.o: In function `check_timer_create': /usr/src/debug/kselftests/4.

[PATCH RFC 13/39] KVM: x86/xen: handle PV timers oneshot mode

2019-02-20 Thread Joao Martins
If the guest has offloaded the timer virq, handle the following hypercalls for programming the timer: VCPUOP_set_singleshot_timer VCPUOP_stop_singleshot_timer set_timer_op(timestamp_ns) The event channel corresponding to the timer virq is then used to inject events once timer deadline

[PATCH AUTOSEL 4.20 059/105] scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes

2019-02-12 Thread Sasha Levin
From: Xiubo Li [ Upstream commit a94a2572b97744d3a35a1996df0e5cf6b2461a4a ] Currently there is one cmd timeout timer and one qfull timer for each udev, and whenever any new command is coming in we will update the cmd timer or qfull timer. For some corner cases the timers are always working only

[PATCH AUTOSEL 4.19 51/83] scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes

2019-02-12 Thread Sasha Levin
From: Xiubo Li [ Upstream commit a94a2572b97744d3a35a1996df0e5cf6b2461a4a ] Currently there is one cmd timeout timer and one qfull timer for each udev, and whenever any new command is coming in we will update the cmd timer or qfull timer. For some corner cases the timers are always working only

Re: [PATCH 0/2]: Fixing unkillable processes caused by SIGHUP timers

2019-02-07 Thread Dmitry Vyukov
On Thu, Feb 7, 2019 at 7:43 AM Eric W. Biederman wrote: > > > Dmitry, > > Can you please verify the follow two patches. The first one is a > simplification of the one you have already tested and makes the > processes killable. The second patch improves our heuristic for > detecting synchronous l

<    5   6   7   8   9   10   11   12   13   14   >