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

Commit dba91385 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched: Avoid packing tasks with low sleep time"

parents 7d4b9fce f3e2e286
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ extern unsigned int sysctl_sched_enable_thread_grouping;
extern unsigned int sysctl_sched_freq_aggregate_threshold_pct;
extern unsigned int sysctl_sched_prefer_sync_wakee_to_waker;
extern unsigned int sysctl_sched_short_burst;
extern unsigned int sysctl_sched_short_sleep;

#else /* CONFIG_SCHED_HMP */

+4 −1
Original line number Diff line number Diff line
@@ -959,9 +959,12 @@ unsigned int __read_mostly sysctl_sched_restrict_cluster_spill;
/*
 * Scheduler tries to avoid waking up idle CPUs for tasks running
 * in short bursts. If the task average burst is less than
 * sysctl_sched_short_burst nanoseconds, it is eligible for packing.
 * sysctl_sched_short_burst nanoseconds and it sleeps on an average
 * for more than sysctl_sched_short_sleep nanoseconds, then the
 * task is eligible for packing.
 */
unsigned int __read_mostly sysctl_sched_short_burst;
unsigned int __read_mostly sysctl_sched_short_sleep = 1 * NSEC_PER_MSEC;

static void
_update_up_down_migrate(unsigned int *up_migrate, unsigned int *down_migrate)
+2 −1
Original line number Diff line number Diff line
@@ -1420,7 +1420,8 @@ static inline u64 cpu_cravg_sync(int cpu, int sync)

static inline bool is_short_burst_task(struct task_struct *p)
{
	return p->ravg.avg_burst < sysctl_sched_short_burst;
	return p->ravg.avg_burst < sysctl_sched_short_burst &&
	       p->ravg.avg_sleep_time > sysctl_sched_short_sleep;
}

extern void check_for_migration(struct rq *rq, struct task_struct *p);
+7 −0
Original line number Diff line number Diff line
@@ -514,6 +514,13 @@ static struct ctl_table kern_table[] = {
		.mode		= 0644,
		.proc_handler	= proc_dointvec,
	},
	{
		.procname       = "sched_short_sleep_ns",
		.data           = &sysctl_sched_short_sleep,
		.maxlen         = sizeof(unsigned int),
		.mode           = 0644,
		.proc_handler   = proc_dointvec,
	},
#endif	/* CONFIG_SCHED_HMP */
#ifdef CONFIG_SCHED_DEBUG
	{