Re: [PATCH] avoid using smp_processor_id() in preemptible code(nr_iowait_cpu)
From: Sergey Senozhatsky
Date: Tue Jun 15 2010 - 11:27:49 EST
On (06/15/10 18:23), Sergey Senozhatsky wrote:
>....
> delta = ktime_sub(now, ts->idle_entrytime);
> ts->idle_sleeptime = ktime_add(ts->idle_sleeptime, delta);
> if (nr_iowait_cpu(cpu) > 0)
> ts->iowait_sleeptime = ktime_add(ts->iowait_sleeptime, delta);
> put_cpu();
> ts->idle_entrytime = now;
> + ts->idle_active = 0;
^^^^^^
This part is wrong. Sorry.
> }
>
> if (last_update_time)
> *last_update_time = ktime_to_us(now);
>
> }
Attachment:
pgp00000.pgp
Description: PGP signature