X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=kernel%2Fsched%2Fsched.h;h=0517abd7dd73b95f152f339b684328165d76f59f;hb=2a8225ef46968444fb1c4c632ec28e4cc2be633f;hp=efd3bfc7e34722883e2f08ca82f91cffde812963;hpb=f3996e6ac6e2bd739d8a82cc9acae0653c2d5dca;p=karo-tx-linux.git diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index efd3bfc7e347..0517abd7dd73 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1073,6 +1073,9 @@ static inline void finish_lock_switch(struct rq *rq, struct task_struct *prev) * We must ensure this doesn't happen until the switch is completely * finished. * + * In particular, the load of prev->state in finish_task_switch() must + * happen before this. + * * Pairs with the control dependency and rmb in try_to_wake_up(). */ smp_store_release(&prev->on_cpu, 0); @@ -1767,3 +1770,16 @@ static inline u64 irq_time_read(int cpu) } #endif /* CONFIG_64BIT */ #endif /* CONFIG_IRQ_TIME_ACCOUNTING */ + +static inline void account_reset_rq(struct rq *rq) +{ +#ifdef CONFIG_IRQ_TIME_ACCOUNTING + rq->prev_irq_time = 0; +#endif +#ifdef CONFIG_PARAVIRT + rq->prev_steal_time = 0; +#endif +#ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING + rq->prev_steal_time_rq = 0; +#endif +}