diff options
author | Ingo Molnar <mingo@kernel.org> | 2024-07-11 10:42:33 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2024-07-11 10:42:33 +0200 |
commit | 011b1134b82c2750d83a299a1369c678845de45a (patch) | |
tree | a6a2ba6bfa62b02cb7b00a67c6f449d965140e5a /kernel/sched/core.c | |
parent | d329605287020c3d1c3b0dadc63d8208e7251382 (diff) | |
parent | ddae0ca2a8fe12d0e24ab10ba759c3fbd755ada8 (diff) |
Merge branch 'sched/urgent' into sched/core, to pick up fixes and refresh the branch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r-- | kernel/sched/core.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 747683487be7..6d35c48239be 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -724,7 +724,6 @@ static void update_rq_clock_task(struct rq *rq, s64 delta) rq->prev_irq_time += irq_delta; delta -= irq_delta; - psi_account_irqtime(rq->curr, irq_delta); delayacct_irq(rq->curr, irq_delta); #endif #ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING @@ -5446,7 +5445,7 @@ void sched_tick(void) { int cpu = smp_processor_id(); struct rq *rq = cpu_rq(cpu); - struct task_struct *curr = rq->curr; + struct task_struct *curr; struct rq_flags rf; unsigned long hw_pressure; u64 resched_latency; @@ -5458,6 +5457,9 @@ void sched_tick(void) rq_lock(rq, &rf); + curr = rq->curr; + psi_account_irqtime(rq, curr, NULL); + update_rq_clock(rq); hw_pressure = arch_scale_hw_pressure(cpu_of(rq)); update_hw_load_avg(rq_clock_task(rq), rq, hw_pressure); @@ -6518,6 +6520,7 @@ static void __sched notrace __schedule(unsigned int sched_mode) ++*switch_count; migrate_disable_switch(rq, prev); + psi_account_irqtime(rq, prev, next); psi_sched_switch(prev, next, !task_on_rq_queued(prev)); trace_sched_switch(sched_mode & SM_MASK_PREEMPT, prev, next, prev_state); |