Re: [PATCH 02/10] tick/nohz: Add tick_nohz_full_this_cpu()

2021-03-16 Thread Frederic Weisbecker
On Tue, Mar 16, 2021 at 01:28:01PM +0100, Peter Zijlstra wrote: > On Thu, Mar 11, 2021 at 01:37:00PM +0100, Frederic Weisbecker wrote: > > Optimize further the check for local full dynticks CPU. Testing directly > > tick_nohz_full_cpu(smp_processor_id()) is suboptimal because the > > compiler

Re: [PATCH 02/10] tick/nohz: Add tick_nohz_full_this_cpu()

2021-03-16 Thread Peter Zijlstra
On Thu, Mar 11, 2021 at 01:37:00PM +0100, Frederic Weisbecker wrote: > Optimize further the check for local full dynticks CPU. Testing directly > tick_nohz_full_cpu(smp_processor_id()) is suboptimal because the > compiler first fetches the CPU number and only then processes the > static key. > >

[PATCH 02/10] tick/nohz: Add tick_nohz_full_this_cpu()

2021-03-11 Thread Frederic Weisbecker
Optimize further the check for local full dynticks CPU. Testing directly tick_nohz_full_cpu(smp_processor_id()) is suboptimal because the compiler first fetches the CPU number and only then processes the static key. It's best to evaluate the static branch before anything. Provide with a function