mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 19:47:08 +02:00
sched: walt: Do dequeue task accounting after dequeue
Until recently, we used to do all the dequeue task accounting business after the call the dequeue task call was done. However, due to an upstream change in the position of the trace hook, we modified our value adds to account for doing this work prior to dequeue task. However, there were unforeseen consequences as a result. As there is now an "after" dequeue hook available, it is more intuitive to do this work after dequeue task has taken place, and furthermore, this keeps the work in line with the manner in which it is done on prior chipsets ensuring stability. Change-Id: Iaa274ed39780316fd2d462ad22d4d8b1772def45 Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
This commit is contained in:
parent
c4b8044564
commit
beca103128
|
|
@ -231,7 +231,7 @@ void sched_update_nr_prod(int cpu, int enq)
|
|||
diff = curr_time - per_cpu(last_time, cpu);
|
||||
BUG_ON((s64)diff < 0);
|
||||
per_cpu(last_time, cpu) = curr_time;
|
||||
per_cpu(nr, cpu) = cpu_rq(cpu)->nr_running + enq;
|
||||
per_cpu(nr, cpu) = cpu_rq(cpu)->nr_running;
|
||||
|
||||
if (per_cpu(nr, cpu) > per_cpu(nr_max, cpu))
|
||||
per_cpu(nr_max, cpu) = per_cpu(nr, cpu);
|
||||
|
|
|
|||
|
|
@ -3804,7 +3804,7 @@ static void android_rvh_flush_task(void *unused, struct task_struct *p)
|
|||
walt_task_dead(p);
|
||||
}
|
||||
|
||||
static void android_rvh_enqueue_task(void *unused, struct rq *rq, struct task_struct *p, int flags)
|
||||
static void android_rvh_enqueue_task(void *unused, struct rq *rq, struct task_struct *p)
|
||||
{
|
||||
u64 wallclock = walt_ktime_get_ns();
|
||||
struct walt_task_struct *wts = (struct walt_task_struct *) p->android_vendor_data1;
|
||||
|
|
@ -3844,7 +3844,7 @@ static void android_rvh_enqueue_task(void *unused, struct rq *rq, struct task_st
|
|||
trace_sched_enq_deq_task(p, 1, cpumask_bits(&p->cpus_mask)[0], is_mvp(wts));
|
||||
}
|
||||
|
||||
static void android_rvh_dequeue_task(void *unused, struct rq *rq, struct task_struct *p, int flags)
|
||||
static void android_rvh_dequeue_task(void *unused, struct rq *rq, struct task_struct *p)
|
||||
{
|
||||
struct walt_rq *wrq = (struct walt_rq *) rq->android_vendor_data1;
|
||||
struct walt_task_struct *wts = (struct walt_task_struct *) p->android_vendor_data1;
|
||||
|
|
@ -4160,8 +4160,8 @@ static void register_walt_hooks(void)
|
|||
register_trace_android_rvh_account_irq(android_rvh_account_irq, NULL);
|
||||
register_trace_android_rvh_flush_task(android_rvh_flush_task, NULL);
|
||||
register_trace_android_rvh_update_misfit_status(android_rvh_update_misfit_status, NULL);
|
||||
register_trace_android_rvh_enqueue_task(android_rvh_enqueue_task, NULL);
|
||||
register_trace_android_rvh_dequeue_task(android_rvh_dequeue_task, NULL);
|
||||
register_trace_android_rvh_after_enqueue_task(android_rvh_enqueue_task, NULL);
|
||||
register_trace_android_rvh_after_dequeue_task(android_rvh_dequeue_task, NULL);
|
||||
register_trace_android_rvh_try_to_wake_up(android_rvh_try_to_wake_up, NULL);
|
||||
register_trace_android_rvh_try_to_wake_up_success(android_rvh_try_to_wake_up_success, NULL);
|
||||
register_trace_android_rvh_tick_entry(android_rvh_tick_entry, NULL);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user