mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02:00
sched/walt/walt_cfs: Improve the scheduler
This change is for general scheduler improvemnts. Change-Id: Iae112690c5cf125db5d197555d47244a63bfb32e Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
This commit is contained in:
parent
04859b6838
commit
a907a3cd42
|
|
@ -883,6 +883,7 @@ static inline bool walt_fair_task(struct task_struct *p)
|
|||
|
||||
#define WALT_RTG_MVP 0
|
||||
#define WALT_BINDER_MVP 1
|
||||
#define WALT_TASK_BOOST_MVP 2
|
||||
|
||||
#define WALT_NOT_MVP -1
|
||||
|
||||
|
|
|
|||
|
|
@ -961,14 +961,15 @@ static void binder_restore_priority_hook(void *data,
|
|||
*/
|
||||
static inline int walt_get_mvp_task_prio(struct task_struct *p)
|
||||
{
|
||||
if ((per_task_boost(p) == TASK_BOOST_STRICT_MAX) ||
|
||||
task_rtg_high_prio(p) ||
|
||||
walt_procfs_low_latency_task(p))
|
||||
return WALT_RTG_MVP;
|
||||
if (per_task_boost(p) == TASK_BOOST_STRICT_MAX)
|
||||
return WALT_TASK_BOOST_MVP;
|
||||
|
||||
if (walt_binder_low_latency_task(p))
|
||||
return WALT_BINDER_MVP;
|
||||
|
||||
if (task_rtg_high_prio(p) || walt_procfs_low_latency_task(p))
|
||||
return WALT_RTG_MVP;
|
||||
|
||||
return WALT_NOT_MVP;
|
||||
}
|
||||
|
||||
|
|
@ -1010,15 +1011,6 @@ static void walt_cfs_deactivate_mvp_task(struct task_struct *p)
|
|||
|
||||
list_del_init(&wts->mvp_list);
|
||||
wts->mvp_prio = WALT_NOT_MVP;
|
||||
|
||||
/*
|
||||
* Reset the exec time during sleep so that it starts
|
||||
* from scratch upon next wakeup. total_exec should
|
||||
* be preserved when task is enq/deq while it is on
|
||||
* runqueue.
|
||||
*/
|
||||
if (p->state != TASK_RUNNING)
|
||||
wts->total_exec = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1114,6 +1106,15 @@ void walt_cfs_dequeue_task(struct rq *rq, struct task_struct *p)
|
|||
|
||||
if (!list_empty(&wts->mvp_list))
|
||||
walt_cfs_deactivate_mvp_task(p);
|
||||
|
||||
/*
|
||||
* Reset the exec time during sleep so that it starts
|
||||
* from scratch upon next wakeup. total_exec should
|
||||
* be preserved when task is enq/deq while it is on
|
||||
* runqueue.
|
||||
*/
|
||||
if (p->state != TASK_RUNNING)
|
||||
wts->total_exec = 0;
|
||||
}
|
||||
|
||||
void walt_cfs_tick(struct rq *rq)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user