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: I616acbe5bfdb0e1bf88e923d98b4a3d54d26d942 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
parent
915ef0bd8b
commit
07efb5ada9
|
|
@ -2187,6 +2187,8 @@ static void walt_update_task_ravg(struct task_struct *p, struct rq *rq, int even
|
|||
update_task_demand(p, rq, event, wallclock);
|
||||
update_cpu_busy_time(p, rq, event, wallclock, irqtime);
|
||||
update_task_pred_demand(rq, p, event);
|
||||
if (event == PUT_PREV_TASK && p->state)
|
||||
wts->iowaited = p->in_iowait;
|
||||
|
||||
trace_sched_update_task_ravg(p, rq, event, wallclock, irqtime,
|
||||
&wrq->grp_time, wrq, wts);
|
||||
|
|
@ -4047,6 +4049,7 @@ static void android_rvh_sched_fork_init(void *unused, struct task_struct *p)
|
|||
wts->boost_expires = 0;
|
||||
wts->boost_period = false;
|
||||
wts->low_latency = false;
|
||||
wts->iowaited = false;
|
||||
}
|
||||
|
||||
static void android_rvh_ttwu_cond(void *unused, bool *cond)
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ struct walt_task_struct {
|
|||
struct list_head grp_list;
|
||||
u64 cpu_cycles;
|
||||
cpumask_t cpus_requested;
|
||||
bool iowaited;
|
||||
};
|
||||
|
||||
/*End linux/sched.h port */
|
||||
|
|
|
|||
|
|
@ -213,7 +213,8 @@ static void walt_find_best_target(struct sched_domain *sd,
|
|||
unsigned int target_nr_rtg_high_prio = UINT_MAX;
|
||||
bool rtg_high_prio_task = task_rtg_high_prio(p);
|
||||
cpumask_t visit_cpus;
|
||||
bool io_task_pack = (order_index > 0 && p->in_iowait);
|
||||
struct walt_task_struct *wts = (struct walt_task_struct *) p->android_vendor_data1;
|
||||
bool io_task_pack = (order_index > 0 && wts->iowaited);
|
||||
struct cfs_rq *cfs_rq;
|
||||
|
||||
/* Find start CPU based on boost value */
|
||||
|
|
|
|||
|
|
@ -210,9 +210,10 @@ static inline bool _walt_can_migrate_task(struct task_struct *p, int dst_cpu,
|
|||
bool to_lower)
|
||||
{
|
||||
struct walt_rq *wrq = (struct walt_rq *) task_rq(p)->android_vendor_data1;
|
||||
struct walt_task_struct *wts = (struct walt_task_struct *) p->android_vendor_data1;
|
||||
|
||||
if (to_lower) {
|
||||
if (p->in_iowait)
|
||||
if (wts->iowaited)
|
||||
return false;
|
||||
if (per_task_boost(p) == TASK_BOOST_STRICT_MAX &&
|
||||
task_in_related_thread_group(p))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user