Re: [PATCH 4/4] sched,time: only call account_{user,sys,guest,idle}_time once a jiffy

From: Eric Dumazet
Date: Mon Feb 01 2016 - 15:00:49 EST


On Mon, 2016-02-01 at 14:21 -0500, riel@xxxxxxxxxx wrote:
> From: Rik van Riel <riel@xxxxxxxxxx>
>

> #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN
> +static bool vtime_jiffies_changed(struct task_struct *tsk, unsigned long now)
> +{
> + if (tsk->vtime_jiffies == jiffies)
> + return false;
> +
> + tsk->vtime_jiffies = jiffies;
> + return true;
> +}

I am guessing you intended to use 'now' instead of jiffies ?