Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 71b91eb8 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched: refresh sched_clock() after acquiring rq lock in irq path"

parents 4f4673fc a14e0110
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1832,14 +1832,16 @@ void sched_account_irqtime(int cpu, struct task_struct *curr,
{
	struct rq *rq = cpu_rq(cpu);
	unsigned long flags, nr_windows;
	u64 cur_jiffies_ts;
	u64 cur_jiffies_ts, now;

	raw_spin_lock_irqsave(&rq->lock, flags);

	now = sched_clock();
	delta += (now - wallclock);
	cur_jiffies_ts = get_jiffies_64();

	if (is_idle_task(curr))
		update_task_ravg(curr, rq, IRQ_UPDATE, wallclock, delta);
		update_task_ravg(curr, rq, IRQ_UPDATE, now, delta);

	nr_windows = cur_jiffies_ts - rq->irqload_ts;