On Tue, Aug 04, 2015 at 05:29:44PM -0700, Jason Low wrote:

> @@ -1137,6 +1148,13 @@ static inline int fastpath_timer_check(struct 
> task_struct *tsk)
>       if (READ_ONCE(sig->cputimer.running)) {

Maybe make that:

        if (READ_ONCE(sig->cputimer.running) &&
            !READ_ONCE(sig->cputimer.is_checking_timer)) {

>               struct task_cputime group_sample;
>  
> +             /*
> +              * If another thread in the group is already checking
> +              * for the thread group cputimer, then we will skip that.
> +              */
> +             if (READ_ONCE(sig->cputimer.is_checking_timer))
> +                     return 0;
> +
>               sample_cputime_atomic(&group_sample, 
> &sig->cputimer.cputime_atomic);
>  
>               if (task_cputime_expired(&group_sample, &sig->cputime_expires))


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to