Skip to content

Commit

Permalink
XANMOD: cpufreq: tunes ondemand and conservative governor for perform…
Browse files Browse the repository at this point in the history
…ance

Signed-off-by: Alexandre Frade <admfrade@gmail.com>
  • Loading branch information
xanmod committed Mar 21, 2022
1 parent 16ec98f commit ab0ade8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions drivers/cpufreq/cpufreq_conservative.c
Expand Up @@ -28,8 +28,8 @@ struct cs_dbs_tuners {
};

/* Conservative governor macros */
#define DEF_FREQUENCY_UP_THRESHOLD (80)
#define DEF_FREQUENCY_DOWN_THRESHOLD (20)
#define DEF_FREQUENCY_UP_THRESHOLD (63)
#define DEF_FREQUENCY_DOWN_THRESHOLD (26)
#define DEF_FREQUENCY_STEP (5)
#define DEF_SAMPLING_DOWN_FACTOR (1)
#define MAX_SAMPLING_DOWN_FACTOR (10)
Expand All @@ -47,9 +47,9 @@ static inline unsigned int get_freq_step(struct cs_dbs_tuners *cs_tuners,
}

/*
* Every sampling_rate, we check, if current idle time is less than 20%
* Every sampling_rate, we check, if current idle time is less than 37%
* (default), then we try to increase frequency. Every sampling_rate *
* sampling_down_factor, we check, if current idle time is more than 80%
* sampling_down_factor, we check, if current idle time is more than 74%
* (default), then we try to decrease frequency
*
* Frequency updates happen at minimum steps of 5% (default) of maximum
Expand Down
8 changes: 4 additions & 4 deletions drivers/cpufreq/cpufreq_ondemand.c
Expand Up @@ -18,10 +18,10 @@
#include "cpufreq_ondemand.h"

/* On-demand governor macros */
#define DEF_FREQUENCY_UP_THRESHOLD (80)
#define DEF_SAMPLING_DOWN_FACTOR (1)
#define DEF_FREQUENCY_UP_THRESHOLD (63)
#define DEF_SAMPLING_DOWN_FACTOR (100)
#define MAX_SAMPLING_DOWN_FACTOR (100000)
#define MICRO_FREQUENCY_UP_THRESHOLD (95)
#define MICRO_FREQUENCY_UP_THRESHOLD (70)
#define MICRO_FREQUENCY_MIN_SAMPLE_RATE (10000)
#define MIN_FREQUENCY_UP_THRESHOLD (1)
#define MAX_FREQUENCY_UP_THRESHOLD (100)
Expand Down Expand Up @@ -129,7 +129,7 @@ static void dbs_freq_increase(struct cpufreq_policy *policy, unsigned int freq)
}

/*
* Every sampling_rate, we check, if current idle time is less than 20%
* Every sampling_rate, we check, if current idle time is less than 37%
* (default), then we try to increase frequency. Else, we adjust the frequency
* proportional to load.
*/
Expand Down

0 comments on commit ab0ade8

Please sign in to comment.