ANDROID: vendor_hooks: add two hooks for lazy preemption
add some changes to achieve the lazy preemption feature in our baseline. - android_vh_read_lazy_flag - android_vh_set_tsk_need_resched_lazy Bug: 336982374 Change-Id: I09f1110a2a11da4dbf0d4d0cca3500d1a6ee6a74 Signed-off-by: xieliujie <xieliujie@oppo.com>
This commit is contained in:
parent
6364d59412
commit
14f07c1db0
4 changed files with 21 additions and 2 deletions
|
|
@ -1043,13 +1043,17 @@ void wake_up_q(struct wake_q_head *head)
|
|||
void resched_curr(struct rq *rq)
|
||||
{
|
||||
struct task_struct *curr = rq->curr;
|
||||
int cpu;
|
||||
int cpu, need_lazy = 0;
|
||||
|
||||
lockdep_assert_rq_held(rq);
|
||||
|
||||
if (test_tsk_need_resched(curr))
|
||||
return;
|
||||
|
||||
trace_android_vh_set_tsk_need_resched_lazy(curr, rq, &need_lazy);
|
||||
if (need_lazy)
|
||||
return;
|
||||
|
||||
cpu = cpu_of(rq);
|
||||
|
||||
if (cpu == smp_processor_id()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue