[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3/3] xen: RCU: make the period of the idle timer adaptive.



>>> On 15.09.17 at 20:01, <dario.faggioli@xxxxxxxxxx> wrote:
> @@ -495,8 +507,18 @@ void rcu_idle_timer_stop()
>  
>  static void rcu_idle_timer_handler(void* data)
>  {
> -    /* Nothing, really... Just count the number of times we fire */
>      perfc_incr(rcu_idle_timer);
> +
> +    if ( !cpumask_empty(&rcu_ctrlblk.cpumask) )
> +    {
> +        idle_timer_period = min_t(s_time_t, IDLE_TIMER_PERIOD_MAX,
> +                                  idle_timer_period + 
> IDLE_TIMER_PERIOD_INCR);
> +    }
> +    else
> +    {
> +        idle_timer_period = max_t(s_time_t, IDLE_TIMER_PERIOD_MIN,
> +                                  idle_timer_period - 
> IDLE_TIMER_PERIOD_DECR);
> +    }

Pointless braces. And do you really need min_t()/max_t() here,
rather than just min()/max()?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.