lkml.org 
[lkml]   [2017]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH tip/core/rcu 1/4] sched,rcu: Make cond_resched() provide RCU quiescent state
On Wed, Oct 04, 2017 at 02:50:22PM -0700, Paul E. McKenney wrote:
> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index 26a7df4e558c..59688ef3ea23 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -1565,10 +1565,11 @@ static inline int test_tsk_need_resched(struct task_struct *tsk)
> * cond_resched_lock() will drop the spinlock before scheduling,
> * cond_resched_softirq() will enable bhs before scheduling.
> */
> +void rcu_all_qs(void);
> #ifndef CONFIG_PREEMPT
> extern int _cond_resched(void);
> #else
> -static inline int _cond_resched(void) { return 0; }
> +static inline int _cond_resched(void) { rcu_all_qs(); return 0; }
> #endif

Why does it need to change PREEMPT? the whole cond_resched() thing
should be a no-op on PREEMPT.

\
 
 \ /
  Last update: 2017-10-05 12:42    [W:0.070 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site