On Thu, Sep 24, 2020 at 10:40:29AM +0200, pet...@infradead.org wrote:
> On Wed, Sep 23, 2020 at 02:11:23PM -0400, Nitesh Narayan Lal wrote:
> > Introduce a new API hk_num_online_cpus(), that can be used to
> > retrieve the number of online housekeeping CPUs that are meant to handle
> > managed IRQ
On Wed, Sep 23, 2020 at 08:47:16AM -0700, Paul E. McKenney wrote:
> On Wed, Sep 23, 2020 at 05:27:46PM +0200, Frederic Weisbecker wrote:
> > On Mon, Sep 21, 2020 at 05:26:29PM -0700, Paul E. McKenney wrote:
> > > On Mon, Sep 21, 2020 at 02:43:51PM +0200, Frederi
On Mon, Sep 21, 2020 at 05:10:15PM -0700, Paul E. McKenney wrote:
> On Mon, Sep 21, 2020 at 02:43:44PM +0200, Frederic Weisbecker wrote:
> > @@ -2292,6 +2340,7 @@ void __init rcu_init_nohz(void)
> > rcu_segcblist_init(>cblist);
> > rcu_s
On Mon, Sep 21, 2020 at 05:17:56PM -0700, Paul E. McKenney wrote:
> On Mon, Sep 21, 2020 at 02:43:46PM +0200, Frederic Weisbecker wrote:
> > Make sure the nocb timer can't fire anymore before we reach the final
> > de-offload state. Spuriously waking up the GP kthread is no big
On Mon, Sep 21, 2020 at 05:26:29PM -0700, Paul E. McKenney wrote:
> On Mon, Sep 21, 2020 at 02:43:51PM +0200, Frederic Weisbecker wrote:
> > Not for merge.
> >
> > Make nocb toggable for a given CPU using:
> > /sys/devices/system/cpu/cpu*/hotplug/nocb
> >
&g
On Tue, Sep 22, 2020 at 04:11:50PM -0700, Paul E. McKenney wrote:
> On Tue, Sep 22, 2020 at 11:43:26PM +0200, Frederic Weisbecker wrote:
> > On Mon, Sep 21, 2020 at 05:27:32PM -0700, Paul E. McKenney wrote:
> > > On Mon, Sep 21, 2020 at 02:43:40PM +0200, Frederi
On Mon, Sep 21, 2020 at 05:27:32PM -0700, Paul E. McKenney wrote:
> On Mon, Sep 21, 2020 at 02:43:40PM +0200, Frederic Weisbecker wrote:
> > This simplify the usage of this API and avoid checking the kernel
> > config from the callers.
> >
> > Suggested-by: Paul
On Tue, Sep 22, 2020 at 09:54:58AM -0400, Nitesh Narayan Lal wrote:
> >> If min_vecs > num_housekeeping, for example:
> >>
> >> /* PCI MSI/MSIx support */
> >> #define XGBE_MSI_BASE_COUNT 4
> >> #define XGBE_MSI_MIN_COUNT (XGBE_MSI_BASE_COUNT + 1)
> >>
> >> Then the protection fails.
> >
On Tue, Sep 22, 2020 at 09:50:55AM -0400, Nitesh Narayan Lal wrote:
> On 9/22/20 6:08 AM, Frederic Weisbecker wrote:
> TBH I don't have a very strong case here at the moment.
> But still, IMHO, this will force the user to have both managed irqs and
> nohz_full in their environme
On Tue, Sep 22, 2020 at 09:34:02AM -0400, Nitesh Narayan Lal wrote:
> On 9/22/20 5:54 AM, Frederic Weisbecker wrote:
> > But I don't also want to push toward a complicated solution to handle CPU
> > hotplug
> > if there is no actual problem to solve there.
>
> Sure,
On Mon, Sep 21, 2020 at 11:16:51PM -0400, Nitesh Narayan Lal wrote:
>
> On 9/21/20 7:40 PM, Frederic Weisbecker wrote:
> > On Wed, Sep 09, 2020 at 11:08:16AM -0400, Nitesh Narayan Lal wrote:
> >> +/*
> >> + * num_housekeeping_cpus() - Read t
On Mon, Sep 21, 2020 at 11:08:20PM -0400, Nitesh Narayan Lal wrote:
>
> On 9/21/20 6:58 PM, Frederic Weisbecker wrote:
> > On Thu, Sep 17, 2020 at 11:23:59AM -0700, Jesse Brandeburg wrote:
> >> Nitesh Narayan Lal wrote:
> >>
> >>> In a realtime enviro
On Wed, Sep 09, 2020 at 11:08:16AM -0400, Nitesh Narayan Lal wrote:
> +/*
> + * num_housekeeping_cpus() - Read the number of housekeeping CPUs.
> + *
> + * This function returns the number of available housekeeping CPUs
> + * based on __num_housekeeping_cpus which is of type atomic_t
> + * and is
On Thu, Sep 17, 2020 at 11:23:59AM -0700, Jesse Brandeburg wrote:
> Nitesh Narayan Lal wrote:
>
> > In a realtime environment, it is essential to isolate unwanted IRQs from
> > isolated CPUs to prevent latency overheads. Creating MSIX vectors only
> > based on the online CPUs could lead to a
I have no idea what I'm doing but doing that looks necessary to me.
Inspired-by: Paul E. McKenney
Signed-off-by: Frederic Weisbecker
Cc: Paul E. McKenney
Cc: Josh Triplett
Cc: Steven Rostedt
Cc: Mathieu Desnoyers
Cc: Lai Jiangshan
Cc: Joel Fernandes
---
kernel/rcu/tree.c | 7 +++
1
Not for merge.
Make nocb toggable for a given CPU using:
/sys/devices/system/cpu/cpu*/hotplug/nocb
This is only intended for those who want to test this patchset. The real
interfaces will be cpuset/isolation and rcutorture.
Not-Signed-off-by: Frederic Weisbecker
Cc: Paul E. McKenney
This simplify the usage of this API and avoid checking the kernel
config from the callers.
Suggested-by: Paul E. McKenney
Signed-off-by: Frederic Weisbecker
Cc: Paul E. McKenney
Cc: Josh Triplett
Cc: Steven Rostedt
Cc: Mathieu Desnoyers
Cc: Lai Jiangshan
Cc: Joel Fernandes
---
kernel/rcu
Set SEGCBLIST_SOFTIRQ_ONLY once everything is settled. After that, the
callbacks are handled locklessly and locally.
Inspired-by: Paul E. McKenney
Signed-off-by: Frederic Weisbecker
Cc: Paul E. McKenney
Cc: Josh Triplett
Cc: Steven Rostedt
Cc: Mathieu Desnoyers
Cc: Lai Jiangshan
Cc: Joel
Make sure the nocb timer can't fire anymore before we reach the final
de-offload state. Spuriously waking up the GP kthread is no big deal but
we must prevent from executing the timer callback without nocb locking.
Inspired-by: Paul E. McKenney
Signed-off-by: Frederic Weisbecker
Cc: Paul E
must notify the de-offloading worker so that it can resume
the de-offloading while being sure that callbacks won't be handled
remotely anymore.
Inspired-by: Paul E. McKenney
Signed-off-by: Frederic Weisbecker
Cc: Paul E. McKenney
Cc: Josh Triplett
Cc: Steven Rostedt
Cc: Mathieu Desnoyers
Cc
Gather the segcblist properties in a common map to avoid spreading
booleans in the structure. And this prepares for the offloaded state to
be mutable on runtime.
Inspired-by: Paul E. McKenney
Signed-off-by: Frederic Weisbecker
Cc: Paul E. McKenney
Cc: Josh Triplett
Cc: Steven Rostedt
Cc
/git/frederic/linux-dynticks.git
rcu/nocb
HEAD: 6abe8408307eaeb03b4a0470945943c1decbc4b3
Thanks,
Frederic
---
Frederic Weisbecker (12):
rcu: Implement rcu_segcblist_is_offloaded() config dependent
rcu: Turn enabled/offload states into a common flag
rcu: Provide
Make sure to handle the pending bypass queue before we switch to the
final de-offload state. We'll have to be careful and later set
SEGCBLIST_SOFTIRQ_ONLY before re-enabling again IRQs, or new bypass
callbacks could be queued in the meantine.
Inspired-by: Paul E. McKenney
Signed-off-by: Frederic
stop processing the callbacks locally.
Ordering must be carefully enforced so that the callbacks that used to
be processed locally without locking must have their latest updates
visible by the time they get processed by the kthreads.
Inspired-by: Paul E. McKenney
Signed-off-by: Frederic Weisbecker
for the state machine that will carry up all the steps to
enforce correctness while serving callbacks processing all along.
Inspired-by: Paul E. McKenney
Signed-off-by: Frederic Weisbecker
Cc: Paul E. McKenney
Cc: Josh Triplett
Cc: Steven Rostedt
Cc: Mathieu Desnoyers
Cc: Lai Jiangshan
Cc: Joel
during these intermediate
states. Some pieces there may still be necessary.
Inspired-by: Paul E. McKenney
Signed-off-by: Frederic Weisbecker
Cc: Paul E. McKenney
Cc: Josh Triplett
Cc: Steven Rostedt
Cc: Mathieu Desnoyers
Cc: Lai Jiangshan
Cc: Joel Fernandes
---
kernel/rcu/rcu_segcblist.h | 12
notify the de-offloading worker so that it can resume
the de-offloading while being sure that callbacks won't be handled
remotely anymore.
Inspired-by: Paul E. McKenney
Signed-off-by: Frederic Weisbecker
Cc: Paul E. McKenney
Cc: Josh Triplett
Cc: Steven Rostedt
Cc: Mathieu Desnoyers
Cc: Lai
On Mon, Sep 07, 2020 at 05:34:17PM +0200, pet...@infradead.org wrote:
>
> (your mailer broke and forgot to keep lines shorter than 78 chars)
I manually reordered the lines and that's indeed quite a mess :o)
>
> On Tue, Sep 01, 2020 at 12:46:41PM +0200, Frederic Weis
On Fri, Sep 04, 2020 at 01:47:40PM -0700, Paul E. McKenney wrote:
> On Tue, Sep 01, 2020 at 12:46:41PM +0200, Frederic Weisbecker wrote:
> > Hi,
> >
> > I'm currently working on making nohz_full/nohz_idle runtime toggable
> > and some other people seem to be interes
On Thu, Sep 03, 2020 at 03:52:00PM -0300, Marcelo Tosatti wrote:
> On Thu, Sep 03, 2020 at 02:36:36PM -0400, Phil Auld wrote:
> > exclusive cpusets is used now to control scheduler load balancing on
> > a group of cpus. It seems to me that this is the same idea and is part
> > of the isolation
On Thu, Sep 03, 2020 at 03:23:59PM -0300, Marcelo Tosatti wrote:
> On Tue, Sep 01, 2020 at 12:46:41PM +0200, Frederic Weisbecker wrote:
> > == Unbound affinity ==
> >
> > Restore kernel threads, workqueue, timers, etc... wide affinity. But take
> > care of cpumasks
On Tue, Aug 25, 2020 at 03:41:49PM -0300, Marcelo Tosatti wrote:
> When enabling per-CPU posix timers, an IPI to nohz_full CPUs might be
> performed (to re-read the dependencies and possibly not re-enter
> nohz_full on a given CPU).
>
> A common case is for applications that run on nohz_full=
On Tue, Aug 25, 2020 at 03:41:48PM -0300, Marcelo Tosatti wrote:
> When enabling per-CPU posix timers, an IPI to nohz_full CPUs might be
> performed (to re-read the dependencies and possibly not re-enter
> nohz_full on a given CPU).
>
> A common case is for applications that run on nohz_full=
Hi,
I'm currently working on making nohz_full/nohz_idle runtime toggable
and some other people seem to be interested as well. So I've dumped
a few thoughts about some pre-requirements to achieve that for those
interested.
As you can see, there is a bit of hard work in the way. I'm iterating
that
The following commit has been merged into the core/rcu branch of tip:
Commit-ID: 3c8920e2dbd1a55f72dc14d656df9d0097cf5c72
Gitweb:
https://git.kernel.org/tip/3c8920e2dbd1a55f72dc14d656df9d0097cf5c72
Author:Frederic Weisbecker
AuthorDate:Fri, 15 May 2020 02:34:29 +02:00
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 31cd0e119d50cf27ebe214d1a8f7ca36692f13a5
Gitweb:
https://git.kernel.org/tip/31cd0e119d50cf27ebe214d1a8f7ca36692f13a5
Author:Frederic Weisbecker
AuthorDate:Thu, 23 Jul 2020 17:16:41 +02:00
ime.
Signed-off-by: Frederic Weisbecker
Cc: Thomas Gleixner
Cc: Anna-Maria Behnsen
---
Changes since v1:
_ Fix changelog's ramblings
_ Fix structure layout
kernel/time/timer.c | 21 ++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/kernel/time/timer.c b/ker
On Thu, Jul 23, 2020 at 03:53:32PM +0200, Thomas Gleixner wrote:
> Frederic Weisbecker writes:
> >
> > Since recalculating the next_expiry isn't a free operation, especially
> > when we must climb up the last wheel level to find out that no timer
> > has
>
>
On Thu, Jul 23, 2020 at 10:32:54AM +0200, Thomas Gleixner wrote:
> Frederic Weisbecker writes:
> > On Fri, Jul 17, 2020 at 12:50:34AM +0200, Peter Zijlstra wrote:
> >> On Thu, Jul 16, 2020 at 10:19:26PM +0200, Thomas Gleixner wrote:
> >> > +static void __run_posix
On Fri, Jul 17, 2020 at 12:50:34AM +0200, Peter Zijlstra wrote:
> On Thu, Jul 16, 2020 at 10:19:26PM +0200, Thomas Gleixner wrote:
> > +static void __run_posix_cpu_timers(struct task_struct *tsk)
> > +{
> > + struct posix_cputimers *pct = >posix_cputimers;
> > +
> > + if
On Thu, Jul 16, 2020 at 10:19:25PM +0200, Thomas Gleixner wrote:
> --- a/kernel/time/posix-cpu-timers.c
> +++ b/kernel/time/posix-cpu-timers.c
> @@ -25,7 +25,7 @@ void posix_cputimers_group_init(struct p
> posix_cputimers_init(pct);
> if (cpu_limit != RLIM_INFINITY) {
>
ost of the time.
Signed-off-by: Frederic Weisbecker
Cc: Thomas Gleixner
Cc: Anna-Maria Behnsen
---
kernel/time/timer.c | 21 ++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 77e21e98ec32..e8002f86c5bc 100
The following commit has been merged into the timers/core branch of tip:
Commit-ID: d4f7dae87096dfe722bf32aa82076ece1063746c
Gitweb:
https://git.kernel.org/tip/d4f7dae87096dfe722bf32aa82076ece1063746c
Author:Frederic Weisbecker
AuthorDate:Fri, 17 Jul 2020 16:05:49 +02:00
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 1f8a4212dc83f8353843fabf6465fd918372fbbf
Gitweb:
https://git.kernel.org/tip/1f8a4212dc83f8353843fabf6465fd918372fbbf
Author:Frederic Weisbecker
AuthorDate:Fri, 17 Jul 2020 16:05:48 +02:00
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 90d52f65f303091be17b5f4ffab7090b2064b4a1
Gitweb:
https://git.kernel.org/tip/90d52f65f303091be17b5f4ffab7090b2064b4a1
Author:Frederic Weisbecker
AuthorDate:Fri, 17 Jul 2020 16:05:47 +02:00
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 3d2e83a2a6a0657c1cf145fa6ba23620715d6c36
Gitweb:
https://git.kernel.org/tip/3d2e83a2a6a0657c1cf145fa6ba23620715d6c36
Author:Frederic Weisbecker
AuthorDate:Fri, 17 Jul 2020 16:05:41 +02:00
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 4468897211628865ee2392acb5ad281f74176f63
Gitweb:
https://git.kernel.org/tip/4468897211628865ee2392acb5ad281f74176f63
Author:Frederic Weisbecker
AuthorDate:Fri, 17 Jul 2020 16:05:44 +02:00
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 001ec1b3925da0d51847c23fc0aa4129282db526
Gitweb:
https://git.kernel.org/tip/001ec1b3925da0d51847c23fc0aa4129282db526
Author:Frederic Weisbecker
AuthorDate:Fri, 17 Jul 2020 16:05:45 +02:00
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 9a2b764b06c880678416d803d027f575ae40ec99
Gitweb:
https://git.kernel.org/tip/9a2b764b06c880678416d803d027f575ae40ec99
Author:Frederic Weisbecker
AuthorDate:Fri, 17 Jul 2020 16:05:43 +02:00
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 36cd28a4cdd05d47ccb62a2d86e8f37839cc879a
Gitweb:
https://git.kernel.org/tip/36cd28a4cdd05d47ccb62a2d86e8f37839cc879a
Author:Frederic Weisbecker
AuthorDate:Fri, 17 Jul 2020 16:05:51 +02:00
The following commit has been merged into the timers/core branch of tip:
Commit-ID: dc2a0f1fb2a06df09f5094f29aea56b763aa7cca
Gitweb:
https://git.kernel.org/tip/dc2a0f1fb2a06df09f5094f29aea56b763aa7cca
Author:Frederic Weisbecker
AuthorDate:Fri, 17 Jul 2020 16:05:46 +02:00
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 0975fb565b8b8f9e0c96d0de39fcb954833ea5e0
Gitweb:
https://git.kernel.org/tip/0975fb565b8b8f9e0c96d0de39fcb954833ea5e0
Author:Frederic Weisbecker
AuthorDate:Fri, 17 Jul 2020 16:05:50 +02:00
The following commit has been merged into the timers/urgent branch of tip:
Commit-ID: e2a71bdea81690b6ef11f4368261ec6f5b6891aa
Gitweb:
https://git.kernel.org/tip/e2a71bdea81690b6ef11f4368261ec6f5b6891aa
Author:Frederic Weisbecker
AuthorDate:Fri, 17 Jul 2020 16:05:40 +02
-by: Juri Lelli
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Behnsen
Cc: Juri Lelli
---
kernel/time/timer.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index af1c08b0b168..9abc41715fd2 100644
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Behnsen
Cc: Juri Lelli
Cc: Thomas Gleixner
Cc: sta...@vger.kernel.org
---
kernel/time/timer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 9a838d38dbe6..df1ff803a
Consolidate the code by calling trigger_dyntick_cpu() from
enqueue_timer() instead of calling it from all its callers.
Tested-by: Juri Lelli
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Behnsen
Cc: Juri Lelli
---
kernel/time/timer.c | 61
There is nothing that prevents us from forwarding the base clock if
it's one jiffy off. This reason for this arbitrary limit is historical
and doesn't seem to stand anymore.
Tested-by: Juri Lelli
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Behnsen
Cc: Juri Lelli
track of canceled timers but we are still way ahead of the
unconditional periodic softirqs (~15 times less of them with 1000 Hz
and ~5 times less with 100 Hz).
Tested-by: Juri Lelli
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Behnsen
Cc: Juri Lelli
---
kernel/time/timer.
Now that we track the next expiry unconditionally when a timer is added,
we can reuse that information on a tick firing after exiting nohz.
Tested-by: Juri Lelli
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Behnsen
Cc: Juri Lelli
---
kernel/time/timer.c | 6 ++
1
There is no reason to keep this guard around. The code makes sure that
base->clk remains sane and won't be forwarded beyond jiffies nor set
backward.
Tested-by: Juri Lelli
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Behnsen
Cc: Juri Lelli
---
kernel/time/time
calc_index() adds 1 unit of the level granularity to the expiry passed
in parameter to ensure that the timer doesn't expire too early. Add a
comment to explain that and the resulting layout in the wheel.
Most-of-the-patch-by: Thomas Gleixner
Tested-by: Juri Lelli
Signed-off-by: Frederic
tch-up with missing updates whenever we
need an up-to-date base clock.
Tested-by: Juri Lelli
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Behnsen
Cc: Juri Lelli
---
kernel/time/timer.c | 26 --
1 file changed, 4 insertions(+), 22 deletions(-)
diff
lli
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Behnsen
Cc: Juri Lelli
---
kernel/time/timer.c | 42 +-
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 9abc41715
are preparing to return the actual bucket expiration from
calc_index() in order to properly fix base->next_expiry updates.
Preserving the higher bits is a requirement to achieve that.
Signed-off-by: Frederic Weisbecker
Cc: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Juri Lelli
Cc: Thomas Gleixner
rk"
as per Thomas' suggestion
Please pull the timers/softirq-v3 branch that can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
timers/softirq-v3
HEAD: f176eb2a146b422f78d81ec63273487c33b3011d
Thanks,
Frederic
---
Frederic Weisbec
_cpu() is not longer necessary as the
timers bucket expiry is guaranteed to be greater than or equal base->clk.
Signed-off-by: Anna-Maria Behnsen
Cc: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Juri Lelli
Cc: Thomas Gleixner
Signed-off-by: Frederic Weisbecker
---
kernel/time/timer.c | 64 ++
On Tue, Jul 14, 2020 at 11:13:26AM +0200, Thomas Gleixner wrote:
> Frederic Weisbecker writes:
> > static inline unsigned calc_index(unsigned expires, unsigned lvl)
> > {
> > + /*
> > +* Time may have past since the clock last reached an index of
> > +
On Tue, Jul 14, 2020 at 10:49:28AM +0200, Anna-Maria Behnsen wrote:
> Hi Frederic,
>
> On Tue, 7 Jul 2020, Frederic Weisbecker wrote:
>
> > So far next expiry was only tracked while the CPU was in nohz_idle mode
> > in order to cope with missing ticks that can't
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Behnsen
Cc: Juri Lelli
Cc: Thomas Gleixner
Cc: sta...@vger.kernel.org
---
kernel/time/timer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 9a838d38dbe6..df1ff803a
rd
> problem.
>
> The workaround of commit 30c66fc30ee7 ("timer: Prevent base->clk from
> moving backward") in trigger_dyntick_cpu() is not longer necessary as the
> timers bucket expiry is guaranteed to be greater than or equal base->clk.
>
> Signed-off-
On Thu, Jul 09, 2020 at 02:17:35PM +0200, Anna-Maria Behnsen wrote:
> Hi Frederic,
>
> On Tue, 7 Jul 2020, Frederic Weisbecker wrote:
>
> > Consolidate the code by calling trigger_dyntick_cpu() from
> > enqueue_timer() instead of calling it from all its callers.
>
rd
> problem.
>
> The workaround of commit 30c66fc30ee7 ("timer: Prevent base->clk from
> moving backward") in trigger_dyntick_cpu() is not longer necessary as the
> timers bucket expiry is guaranteed to be greater than or equal base->clk.
>
> Signed-off-by: Anna-Maria Behnsen
Reviewed-by: Frederic Weisbecker
Thanks a lot!
Hi Anna-Maria,
Nice change, it indeed makes more sense that way.
Just a few details below:
On Fri, Jul 10, 2020 at 05:46:22PM +0200, Anna-Maria Behnsen wrote:
> The bucket expiry time is the effective expriy time of timers and is
> greater than or equal to the requested timer expiry time. This
The following commit has been merged into the timers/urgent branch of tip:
Commit-ID: 30c66fc30ee7a98c4f3adf5fb7e213b61884474f
Gitweb:
https://git.kernel.org/tip/30c66fc30ee7a98c4f3adf5fb7e213b61884474f
Author:Frederic Weisbecker
AuthorDate:Fri, 03 Jul 2020 03:06:57 +02
track of canceled timers but we are still way ahead of the
unconditional periodic softirqs (~15 times less of them with 1000 Hz
and ~5 times less with 100 Hz).
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Gleixner
Cc: Juri Lelli
---
kernel/time/timer.
There is nothing that prevents us from forwarding the base clock if
it's one jiffy off. This reason for this arbitrary limit is historical
and doesn't seem to stand anymore.
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Gleixner
Cc: Juri Lelli
---
kernel/time/timer.c
-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Gleixner
Cc: Juri Lelli
---
kernel/time/timer.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index ae1259f67486..acf7cb8c09f8 100644
--- a/kernel/time/timer.c
There is no reason to keep this guard around. The code makes sure that
base->clk remains sane and won't be forwarded beyond jiffies nor set
backward.
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Gleixner
Cc: Juri Lelli
---
kernel/time/timer.c |
Now that we track the next expiry unconditionally when a timer is added,
we can reuse that information on a tick firing after exiting nohz.
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Gleixner
Cc: Juri Lelli
---
kernel/time/timer.c | 6 ++
1 file changed, 2
ers/softirq-v2
HEAD: 5545d80b7b9bd69ede1c17fda194ac6620e7063f
Thanks,
Frederic
---
Frederic Weisbecker (9):
timer: Move trigger_dyntick_cpu() to enqueue_timer()
timer: Add comments about calc_index() ceiling work
timer: Optimize _next_timer_interrupt() level iteration
timers: Always keep
So far next expiry was only tracked while the CPU was in nohz_idle mode
in order to cope with missing ticks that can't increment the base->clk
periodically anymore.
We are going to expand that logic beyond nohz in order to spare timers
softirqs so do it unconditionally.
Signed-off-by: Frede
tch-up with missing updates whenever we
need an up-to-date base clock.
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Gleixner
Cc: Juri Lelli
---
kernel/time/timer.c | 26 --
1 file changed, 4 insertions(+), 22 deletions(-)
diff --git a/kernel/time/t
calc_index() adds 1 unit of the level granularity to the expiry passed
in parameter to ensure that the timer doesn't expire too early. Add a
comment to explain that and the resulting layout in the wheel.
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Gleixner
Cc: Juri
Consolidate the code by calling trigger_dyntick_cpu() from
enqueue_timer() instead of calling it from all its callers.
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Gleixner
Cc: Juri Lelli
---
kernel/time/timer.c | 46 +++--
1
hat, make sure that base->next_expiry doesn't get below
base->clk.
Fixes: a683f390b93f ("timers: Forward the wheel clock whenever possible")
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Gleixner
Cc: Juri Lelli
---
kernel/time/timer.c | 17 ++
On Thu, Jul 02, 2020 at 05:14:23PM +0200, Thomas Gleixner wrote:
> Frederic Weisbecker writes:
> > On Thu, Jul 02, 2020 at 03:21:35PM +0200, Thomas Gleixner wrote:
> > The following part:
> >
> >> > * Also while executing timers, base->clk is 1 offset ahe
On Thu, Jul 02, 2020 at 11:59:59AM +0200, Juri Lelli wrote:
> On 02/07/20 01:20, Frederic Weisbecker wrote:
> > On Wed, Jul 01, 2020 at 06:35:04PM +0200, Juri Lelli wrote:
> > > Guess you might be faster to understand what I'm missing. :-)
> >
> > So, did you port on
On Thu, Jul 02, 2020 at 11:59:59AM +0200, Juri Lelli wrote:
> On 02/07/20 01:20, Frederic Weisbecker wrote:
> > On Wed, Jul 01, 2020 at 06:35:04PM +0200, Juri Lelli wrote:
> > > Guess you might be faster to understand what I'm missing. :-)
> >
> > So, did you port on
On Thu, Jul 02, 2020 at 03:21:35PM +0200, Thomas Gleixner wrote:
> Frederic Weisbecker writes:
> > There is no apparent reason for not forwarding base->clk when it's 2
> > jiffies late, except perhaps for past optimizations. But since forwarding
> > has to be done
On Thu, Jul 02, 2020 at 01:59:17PM +0200, Thomas Gleixner wrote:
> Frederic Weisbecker writes:
> > LVL_START() makes the first index of a level to start with what would be
> > the value of all bits set of the previous level.
> >
> > For example level 1 starts at 63 ins
On Wed, Jul 01, 2020 at 06:35:04PM +0200, Juri Lelli wrote:
> Guess you might be faster to understand what I'm missing. :-)
So, did you port only this patch or the whole set in order to
trigger this?
If it was the whole set, can you try this patch alone?
Thanks!
Now that we track the next expiry unconditionally when a timer is added,
we can reuse that information on a tick firing after exiting nohz.
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Gleixner
Cc: Juri Lelli
---
kernel/time/timer.c | 6 ++
1 file changed, 2
-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Gleixner
Cc: Juri Lelli
---
kernel/time/timer.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index b4838d63a016..4aa74aafdd33 100644
--- a/kernel/time/timer.c
there is no apparent reason for such fixups so simplify the whole
thing.
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Gleixner
Cc: Juri Lelli
---
kernel/time/timer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/time/timer.c b/kernel/time
Consolidate the code by calling trigger_dyntick_cpu() from
enqueue_timer() instead of calling it from all its callers.
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Gleixner
Cc: Juri Lelli
---
kernel/time/timer.c | 46 +++--
1
tch-up with missing updates whenever we
need an up-to-date base clock.
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Gleixner
Cc: Juri Lelli
---
kernel/time/timer.c | 26 --
1 file changed, 4 insertions(+), 22 deletions(-)
diff --git a/kernel/time/t
track of canceled timers but we are still way ahead of the
unconditional periodic softirqs (~15 times less of them with 1000 Hz
and ~5 times less with 100 Hz).
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Gleixner
Cc: Juri Lelli
---
kernel/time/timer.
is a consolidation.
Patch 3 and 4 are optimizations.
The rest is about timer softirqs.
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
timers/softirq
HEAD: d0567dd5546d1f32eca3772a431488f8b0ac26a1
Thanks,
Frederic
---
Frederic Weisbecker (10):
timer: Prevent
There is no reason to keep this guard around. The code makes sure that
base->clk remains sane and won't be forwarded beyond jiffies nor set
backward.
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Gleixner
Cc: Juri Lelli
---
kernel/time/timer.c |
There is no apparent reason for not forwarding base->clk when it's 2
jiffies late, except perhaps for past optimizations. But since forwarding
has to be done at some point now anyway, this doesn't stand anymore.
Signed-off-by: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Anna-Maria Gleixner
401 - 500 of 8299 matches
Mail list logo