1. 02 11月, 2005 1 次提交
  2. 28 10月, 2005 1 次提交
    • D
      [CPUFREQ] Check return value of cpufreq_cpu_get in cpufreq_stats · bc7b26fd
      Dave Jones 提交于
      This fixes an issue found in drivers/cpufreq/cpufreq_stats.c by Coverity.
      
      Error reported:
      CID: 2642
      Checker: NULL_RETURNS (help)
      File: /export2/p4-coverity/mc2/linux26/drivers/cpufreq/cpufreq_stats.c
      Function: cpufreq_stats_create_table
      Description: Dereferencing NULL value "data"
      
      Patch description:
       The return of cpufreq_cpu_get can be NULL, check return code and return
       -EINVAL if it is NULL.
      
      Signed-off-by: Jayachandran C. <c.jayachandran at gmail.com>
      Signed-off-by: NDave Jones <davej@redhat.com>
      bc7b26fd
  3. 21 10月, 2005 2 次提交
  4. 24 9月, 2005 1 次提交
  5. 21 9月, 2005 1 次提交
    • D
      [CPUFREQ] Avoid the ondemand cpufreq governor to use a too high frequency for stats. · df8b59be
      Dave Jones 提交于
      The problem is in the ondemand governor, there is a periodic measurement
      of the CPU usage. This CPU usage is updated by the scheduler after every
      tick (basically, by adding 1 either to "idle" or to "user" or to
      "system"). So if the frequency of the governor is too high, the stat
      will be meaningless (as mostly no number have changed).
      
      So this patch checks that the measurements are separated by at least 10
      ticks. It means that by default, stats will have about 5% error (20
      ticks). Of course those numbers can be argued but, IMHO, they look sane.
      The patch also includes a small clean-up to check more explictly the
      result of the conversion from ns to µs being null.
      
      Let's note that (on x86) this has never been really needed before 2.6.13
      because HZ was always 1000. Now that HZ can be 100, some CPU might be
      affected by this problem. For instance when HZ=100, the centrino ,which
      has a 10µs transition latency, would lead to the governor allowing to
      read stats every tick (10ms)!
      Signed-off-by: NEric Piel <eric.piel@tremplin-utc.net>
      Signed-off-by: NDave Jones <davej@redhat.com>
      df8b59be
  6. 20 9月, 2005 28 次提交
  7. 19 9月, 2005 6 次提交