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

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

 



On (06/16/10 23:59), Andrew Morton wrote:
> [..] if someone runs
> update_ts_time_stats() before the initcalls then conceivably the
> `swapper' process's accounting will go a little bit wrong, but I doubt
> it.
> 

That was the sing that scared me - update_ts_time_stats call before init. 
Having ".cpu = cpu" in tick_get_tick_sched guarantees correct .cpu and... 
and it sucks.

> Still, it'd be better to do it earlier, I guess.  tick_init() is called
> super-early and that would be a good place.  tick_init() is presently a
> no-op if !CONFIG_GENERIC_CLOCKEVENTS, but all this code depends on
> CONFIG_GENERIC_CLOCKEVENTS anwyay.
> 
> So how does this look?  If "OK" then would you be able to test it please?
> 
>
I'll test it in 2 hours. Thanks.

 
> [ Sigh.  The field tick_sched.cpu shouldn't even exist on
>   uniprocessor builds.  Ifdeffing it away is trivial and a bit messy,
>   but it's still only a partial solution.  Passing the `cpu' argument
>   to nr_iowait_cpu() will generate additional code, and it's unneeded
>   on uniprocessor builds.]
> 
> 
You're right.


	Sergey

Attachment: pgpuEGKbGL23n.pgp
Description: PGP signature

_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux