Changeset fd3a631f in mainline


Ignore:
Timestamp:
2010-06-12T00:01:55Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1d6c497
Parents:
b584cd4
Message:

Fix weird load average values.
The fix has been addopted from lp:~ersin/helenos/measure2 (changeset 405, stanislav.kozina@…).
However, the usage of nrdy_max (as implemented in the above changeset) does not seem to provide stable and reasonable values, thus the original current value of nrdy is still being used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/sysinfo/stats.c

    rb584cd4 rfd3a631f  
    5353#define LOAD_FIXED_SHIFT  11
    5454
     55/** Uspace load fixed-point precision */
     56#define LOAD_USPACE_SHIFT  6
     57
     58/** Kernel load shift */
     59#define LOAD_KERNEL_SHIFT  (LOAD_FIXED_SHIFT - LOAD_USPACE_SHIFT)
     60
    5561/** 1.0 as fixed-point for load */
    5662#define LOAD_FIXED_1  (1 << LOAD_FIXED_SHIFT)
     
    713719        unsigned int i;
    714720        for (i = 0; i < LOAD_STEPS; i++)
    715                 stats_load[i] = avenrdy[i] << LOAD_FIXED_SHIFT;
     721                stats_load[i] = avenrdy[i] << LOAD_KERNEL_SHIFT;
    716722       
    717723        mutex_unlock(&load_lock);
Note: See TracChangeset for help on using the changeset viewer.