#6 Changing how the cpu sage is calculated

open
None
5
2008-07-21
2007-01-03
Anonymous
No

Hi
When high IO_wait, cpu is considered to be near 100%
because c_time is based n
c_user + c_nice + c_sys + c_idle;
and never counting c_iowait

Here my patch
cusage[cpu_num].c_time = cusage[cpu_num].c_user + cusage[cpu_num].c_nice + cusage[cpu_num].c_sys + cusage[cpu_num].c_idle;

see exactly my attached file

Can it be a configure option or be in standard

thanks a lot for your work

Discussion

  • patch for cpu usage calcul modification

     
    Attachments
  • Mattia Dongili
    Mattia Dongili
    2008-07-21

    • assigned_to: nobody --> mattia-san
     
  • Mattia Dongili
    Mattia Dongili
    2008-07-21

    Logged In: YES
    user_id=584271
    Originator: NO

    gah,

    this is a bit old... sorry I didn't have much time to foolow cpufreqd recently (well... in the past year or so).
    I don't understand why you would want to account for io_wait to be busy cpu time.

    Anyway providing an option for that is definitely the way to go. Care to update the patch?

    cheers,
    -- mattia