lkml.org 
[lkml]   [2024]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 05/30] sched: *_tsk_need_resched() now takes resched_t as param
Date
On Mon, Feb 12 2024 at 21:55, Ankur Arora wrote:

The subject line reads odd...

> -static inline bool test_tsk_need_resched(struct task_struct *tsk)
> +static inline bool test_tsk_need_resched(struct task_struct *tsk, resched_t rs)
> {
> - return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED));
> + if (IS_ENABLED(CONFIG_PREEMPT_AUTO) || rs == NR_now)
> + return unlikely(test_tsk_thread_flag(tsk, tif_resched(rs)));
> + else
> + return false;
> }

Same like the others. This wants wrappers with now/lazy.

> /*
> @@ -2104,7 +2121,8 @@ static __always_inline bool need_resched(void)
>
> static __always_inline bool need_resched_lazy(void)
> {
> - return unlikely(tif_need_resched(NR_lazy));
> + return IS_ENABLED(CONFIG_PREEMPT_AUTO) &&
> + unlikely(tif_need_resched(NR_lazy));

Shouldn't this be folded into the patch which adds need_resched_lazy()?

Thanks,

tglx

\
 
 \ /
  Last update: 2024-05-27 15:10    [W:1.260 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site