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

Re: [Xen-devel] [PATCH v3 1/3] xen: RCU: let the RCU idle timer handler run



>>> On 28.09.17 at 19:06, <dario.faggioli@xxxxxxxxxx> wrote:
> --- a/xen/common/timer.c
> +++ b/xen/common/timer.c
> @@ -332,6 +332,23 @@ void stop_timer(struct timer *timer)
>  }
>  
>  
> +bool timer_expires_before(struct timer *timer, s_time_t t)
> +{
> +    unsigned long flags;
> +    bool ret = false;
> +
> +    if ( !timer_lock_irqsave(timer, flags) )
> +        return ret;

I think it would be easier to follow if you used just "false" here.

> +    if ( active_timer(timer) && timer->expires <= t )
> +        ret = true;

In which case this could then be a simple assignment, with the
variable's initializer dropped.

> +    timer_unlock_irqrestore(timer, flags);
> +
> +    return ret;
> +}
> +
> +
>  void migrate_timer(struct timer *timer, unsigned int new_cpu)

Please don't introduce further double blank lines. Instead, insert the
new function between the two existing ones.

With at least the latter addressed
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
Of course both should be easy to take care of while committing,
should no other reason arise for sending v4.

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®.