Re: [PATCH 8/9] irqentry: define irqentry_exit_allow_resched()

From: Peter Zijlstra
Date: Thu Apr 06 2023 - 16:17:45 EST


On Thu, Apr 06, 2023 at 10:13:59PM +0200, Peter Zijlstra wrote:
> +void irqentry_exit_cond_resched_tif(void)
> +{
> +#ifdef TIF_RESCHED_ALLOW
> + if (resched_allowed()) {
> + /* Sanity check RCU and thread stack */
> + rcu_irq_exit_check_preempt();
> + if (IS_ENABLED(CONFIG_DEBUG_ENTRY))
> + WARN_ON_ONCE(!on_thread_stack());
> + if (need_resched())
> + preempt_schedule_irq();

arguably this can simply call raw_irqentry_exit_cond_resched_tif()..
probably better than duplicating all that again.

> + }
> +#endif
> +}