Loading kernel/sched/walt.c +14 −10 Original line number Diff line number Diff line Loading @@ -424,22 +424,27 @@ void sched_account_irqtime(int cpu, struct task_struct *curr, u64 delta, u64 wallclock) { struct rq *rq = cpu_rq(cpu); unsigned long flags, nr_windows; unsigned long nr_windows; u64 cur_jiffies_ts; raw_spin_lock_irqsave(&rq->lock, flags); /* * cputime (wallclock) uses sched_clock so use the same here for * consistency. * We called with interrupts disabled. Take the rq lock only * if we are in idle context in which case update_task_ravg() * call is needed. */ if (is_idle_task(curr)) { raw_spin_lock(&rq->lock); /* * cputime (wallclock) uses sched_clock so use the same here * for consistency. */ delta += sched_clock() - wallclock; cur_jiffies_ts = get_jiffies_64(); if (is_idle_task(curr)) update_task_ravg(curr, rq, IRQ_UPDATE, sched_ktime_clock(), delta); raw_spin_unlock(&rq->lock); } cur_jiffies_ts = get_jiffies_64(); nr_windows = cur_jiffies_ts - rq->irqload_ts; if (nr_windows) { Loading @@ -457,7 +462,6 @@ void sched_account_irqtime(int cpu, struct task_struct *curr, rq->cur_irqload += delta; rq->irqload_ts = cur_jiffies_ts; raw_spin_unlock_irqrestore(&rq->lock, flags); } /* Loading Loading
kernel/sched/walt.c +14 −10 Original line number Diff line number Diff line Loading @@ -424,22 +424,27 @@ void sched_account_irqtime(int cpu, struct task_struct *curr, u64 delta, u64 wallclock) { struct rq *rq = cpu_rq(cpu); unsigned long flags, nr_windows; unsigned long nr_windows; u64 cur_jiffies_ts; raw_spin_lock_irqsave(&rq->lock, flags); /* * cputime (wallclock) uses sched_clock so use the same here for * consistency. * We called with interrupts disabled. Take the rq lock only * if we are in idle context in which case update_task_ravg() * call is needed. */ if (is_idle_task(curr)) { raw_spin_lock(&rq->lock); /* * cputime (wallclock) uses sched_clock so use the same here * for consistency. */ delta += sched_clock() - wallclock; cur_jiffies_ts = get_jiffies_64(); if (is_idle_task(curr)) update_task_ravg(curr, rq, IRQ_UPDATE, sched_ktime_clock(), delta); raw_spin_unlock(&rq->lock); } cur_jiffies_ts = get_jiffies_64(); nr_windows = cur_jiffies_ts - rq->irqload_ts; if (nr_windows) { Loading @@ -457,7 +462,6 @@ void sched_account_irqtime(int cpu, struct task_struct *curr, rq->cur_irqload += delta; rq->irqload_ts = cur_jiffies_ts; raw_spin_unlock_irqrestore(&rq->lock, flags); } /* Loading