mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 19:47:08 +02:00
sched/walt: Improve the scheduler
This change is for general scheduler improvement. Change-Id: I8f521dfd31ff1c8cc1f16805e4e0ac78228d9383 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
parent
79b57c0e1c
commit
a699cd9369
|
|
@ -262,7 +262,8 @@ static int sched_task_handler(struct ctl_table *table, int write,
|
|||
1000000UL);
|
||||
break;
|
||||
case LOW_LATENCY:
|
||||
pid_and_val[1] = wts->low_latency;
|
||||
pid_and_val[1] = wts->low_latency &
|
||||
WALT_LOW_LATENCY_PROCFS;
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
|
|
@ -323,7 +324,10 @@ static int sched_task_handler(struct ctl_table *table, int write,
|
|||
wts->boost_expires = sched_clock() + wts->boost_period;
|
||||
break;
|
||||
case LOW_LATENCY:
|
||||
wts->low_latency = val;
|
||||
if (val)
|
||||
wts->low_latency |= WALT_LOW_LATENCY_PROCFS;
|
||||
else
|
||||
wts->low_latency &= ~WALT_LOW_LATENCY_PROCFS;
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
|
|
|
|||
|
|
@ -69,6 +69,9 @@ enum task_boost_type {
|
|||
#define RAVG_HIST_SIZE_MAX 5
|
||||
#define NUM_BUSY_BUCKETS 10
|
||||
|
||||
#define WALT_LOW_LATENCY_PROCFS BIT(0)
|
||||
#define WALT_LOW_LATENCY_BINDER BIT(1)
|
||||
|
||||
struct walt_task_struct {
|
||||
/*
|
||||
* 'mark_start' marks the beginning of an event (task waking up, task
|
||||
|
|
@ -120,7 +123,7 @@ struct walt_task_struct {
|
|||
bool wake_up_idle;
|
||||
bool misfit;
|
||||
bool rtg_high_prio;
|
||||
bool low_latency;
|
||||
u8 low_latency;
|
||||
u64 boost_period;
|
||||
u64 boost_expires;
|
||||
u64 last_sleep_ts;
|
||||
|
|
|
|||
|
|
@ -784,7 +784,7 @@ static void walt_binder_low_latency_set(void *unused, struct task_struct *task)
|
|||
if (task && current->signal &&
|
||||
(current->signal->oom_score_adj == 0) &&
|
||||
(current->prio < DEFAULT_PRIO))
|
||||
wts->low_latency = true;
|
||||
wts->low_latency |= WALT_LOW_LATENCY_BINDER;
|
||||
}
|
||||
|
||||
static void walt_binder_low_latency_clear(void *unused, struct binder_transaction *t)
|
||||
|
|
@ -793,8 +793,8 @@ static void walt_binder_low_latency_clear(void *unused, struct binder_transactio
|
|||
|
||||
if (static_branch_unlikely(&walt_disabled))
|
||||
return;
|
||||
if (wts->low_latency)
|
||||
wts->low_latency = false;
|
||||
if (wts->low_latency & WALT_LOW_LATENCY_BINDER)
|
||||
wts->low_latency &= ~WALT_LOW_LATENCY_BINDER;
|
||||
}
|
||||
|
||||
void walt_cfs_init(void)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user