lkml.org 
[lkml]   [2017]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch V2 08/10] timer: Implement the hierarchical pull model
On Tue, Apr 18, 2017 at 01:11:10PM +0200, Thomas Gleixner wrote:
> +#ifdef CONFIG_SMP
> +static u64
> +tick_tmigr_idle(struct tick_sched *ts, u64 next_global, u64 next_local)
> +{
> + ts->tmigr_idle = 1;
> +
> + /*
> + * If next_global is after next_local, event does not have to
> + * be queued in the timer migration hierarchy, but cpu needs
> + * to be marked as idle.
> + */
> + if (next_global >= next_local)
> + next_global = KTIME_MAX;
> +
> + next_global = tmigr_cpu_idle(next_global);
> +
> + return min_t(u64, next_local, next_global);
> +}
> +
> +static void tick_tmigr_stop_idle(struct tick_sched *ts)
> +{
> + if (ts->tmigr_idle) {
> + ts->tmigr_idle = 0;
> + tmigr_cpu_activate();
> + }
> +}
> +#else
> +static u64
> +tick_tmigr_idle(struct tick_sched *ts, u64 next_global, u64 next_local)
> +{
> + return min_t(u64, next_global, next_local);
> +}
> +static inline void tick_tmigr_stop_idle(struct tick_sched *ts) { }
> +#endif /*CONFIG_SMP*/

Naming seems inconsistent with the rest of the file;

s/tick_tmigr_idle/tick_tmigr_idle_enter/
s/tick_tmigr_stop_idle/tick_tmigr_idle_exit/

Or something would fit better.

\
 
 \ /
  Last update: 2017-04-19 11:21    [W:0.145 / U:0.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site