Re: [PATCH] avoid using smp_processor_id() in preemptible code (nr_iowait_cpu)

Sergey Senozhatsky
2010-06-15T15:31:16Z

[-- Attachment #1.1: Type: text/plain, Size: 474 bytes --]

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 #1.2: Type: application/pgp-signature, Size: 316 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]