Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7bc951b1 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched: Use bitmask for sched_busy_hysteresis_enable_cpus tunable"

parents 536cba46 2d447d6d
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -131,6 +131,6 @@ extern int sched_little_cluster_coloc_fmin_khz_handler(struct ctl_table *table,
extern char sched_lib_name[LIB_PATH_LENGTH];
extern char sched_lib_name[LIB_PATH_LENGTH];
extern unsigned int sched_lib_mask_force;
extern unsigned int sched_lib_mask_force;
extern bool is_sched_lib_based_app(pid_t pid);
extern bool is_sched_lib_based_app(pid_t pid);
extern unsigned long *sched_busy_hysteresis_cpubits;
extern unsigned int sysctl_sched_busy_hysteresis_enable_cpus;


#endif /* _LINUX_SCHED_SYSCTL_H */
#endif /* _LINUX_SCHED_SYSCTL_H */
+2 −4
Original line number Original line Diff line number Diff line
@@ -26,9 +26,7 @@ static DEFINE_PER_CPU(unsigned long, iowait_prod_sum);
static DEFINE_PER_CPU(spinlock_t, nr_lock) = __SPIN_LOCK_UNLOCKED(nr_lock);
static DEFINE_PER_CPU(spinlock_t, nr_lock) = __SPIN_LOCK_UNLOCKED(nr_lock);
static s64 last_get_time;
static s64 last_get_time;


static struct cpumask sched_busy_hysteresis_cpumask;
unsigned int sysctl_sched_busy_hysteresis_enable_cpus;
unsigned long *sched_busy_hysteresis_cpubits =
				cpumask_bits(&sched_busy_hysteresis_cpumask);
static DEFINE_PER_CPU(atomic64_t, last_busy_time) = ATOMIC64_INIT(0);
static DEFINE_PER_CPU(atomic64_t, last_busy_time) = ATOMIC64_INIT(0);


#define NR_THRESHOLD_PCT		15
#define NR_THRESHOLD_PCT		15
@@ -107,7 +105,7 @@ static inline void update_last_busy_time(int cpu, bool dequeue,
{
{
	bool nr_run_trigger = false, load_trigger = false;
	bool nr_run_trigger = false, load_trigger = false;


	if (!cpumask_test_cpu(cpu, &sched_busy_hysteresis_cpumask))
	if (!(BIT(cpu) & sysctl_sched_busy_hysteresis_enable_cpus))
		return;
		return;


	if (prev_nr_run >= BUSY_NR_RUN && per_cpu(nr, cpu) < BUSY_NR_RUN)
	if (prev_nr_run >= BUSY_NR_RUN && per_cpu(nr, cpu) < BUSY_NR_RUN)
+5 −3
Original line number Original line Diff line number Diff line
@@ -443,10 +443,12 @@ static struct ctl_table kern_table[] = {
	},
	},
	{
	{
		.procname	= "sched_busy_hysteresis_enable_cpus",
		.procname	= "sched_busy_hysteresis_enable_cpus",
		.data		= &sched_busy_hysteresis_cpubits,
		.data		= &sysctl_sched_busy_hysteresis_enable_cpus,
		.maxlen		= NR_CPUS,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
		.mode		= 0644,
		.proc_handler	= proc_do_large_bitmap,
		.proc_handler	= proc_douintvec_minmax,
		.extra1		= &zero,
		.extra2		= &two_hundred_fifty_five,
	},
	},
#endif
#endif
#ifdef CONFIG_SCHED_DEBUG
#ifdef CONFIG_SCHED_DEBUG