Re: [RFC PATCH 4/7] preempt/dynamic: Provide cond_resched() and might_resched() static calls

2021-01-18 Thread Frederic Weisbecker
On Tue, Nov 10, 2020 at 11:48:33AM +0100, Peter Zijlstra wrote: > On Tue, Nov 10, 2020 at 11:39:09AM +0100, Peter Zijlstra wrote: > > Subject: static_call: EXPORT_STATIC_CALL_TRAMP() > > From: Peter Zijlstra > > Date: Tue Nov 10 11:37:48 CET 2020 > > > > For when we want to allow modules to call

Re: [RFC PATCH 4/7] preempt/dynamic: Provide cond_resched() and might_resched() static calls

2020-11-10 Thread Peter Zijlstra
On Tue, Nov 10, 2020 at 11:39:09AM +0100, Peter Zijlstra wrote: > Subject: static_call: EXPORT_STATIC_CALL_TRAMP() > From: Peter Zijlstra > Date: Tue Nov 10 11:37:48 CET 2020 > > For when we want to allow modules to call the static_call() but not > change it. > > Signed-off-by: Peter Zijlstra (I

Re: [RFC PATCH 4/7] preempt/dynamic: Provide cond_resched() and might_resched() static calls

2020-11-10 Thread Peter Zijlstra
On Tue, Nov 10, 2020 at 01:56:06AM +0100, Frederic Weisbecker wrote: > +#ifdef CONFIG_PREEMPT_DYNAMIC > +DEFINE_STATIC_CALL(cond_resched, __static_call_return0); > +EXPORT_STATIC_CALL(cond_resched); > + > +DEFINE_STATIC_CALL(might_resched, __static_call_return0); > +EXPORT_STATIC_CALL(might_resche

[RFC PATCH 4/7] preempt/dynamic: Provide cond_resched() and might_resched() static calls

2020-11-09 Thread Frederic Weisbecker
From: "Peter Zijlstra (Intel)" Provide static calls to control cond_resched() (called in !CONFIG_PREEMPT) and might_resched() (called in CONFIG_PREEMPT_VOLUNTARY) to that we can override their behaviour when preempt= is overriden. Since the default behaviour is full preemption, both their calls