Re: [PATCH 29/38] tick-sched: remove wrapper around __tick_nohz_task_switch()

2014-04-15 Thread Viresh Kumar
On 15 April 2014 18:14, Frederic Weisbecker wrote: > Sure but check out the static_key_false() in the implementation of > tick_nohz_full_enabled(). > That's where the magic hides. > No problem, the jump label/static key code is quite tricky. And its use > can be easily missed, as in here. > >

Re: [PATCH 29/38] tick-sched: remove wrapper around __tick_nohz_task_switch()

2014-04-15 Thread Frederic Weisbecker
On Tue, Apr 15, 2014 at 03:23:37PM +0530, Viresh Kumar wrote: > On 15 April 2014 14:43, Frederic Weisbecker wrote: > > Yeah. But not just that. > > > > Using an inline saves a function call and reduce the offline case to a > > simple > > condition check. But there is also the jump label that

Re: [PATCH 29/38] tick-sched: remove wrapper around __tick_nohz_task_switch()

2014-04-15 Thread Viresh Kumar
On 15 April 2014 14:43, Frederic Weisbecker wrote: > Yeah. But not just that. > > Using an inline saves a function call and reduce the offline case to a simple > condition check. But there is also the jump label that reduce the condition > check > to an unconditional jump in the off case. > > To

Re: [PATCH 29/38] tick-sched: remove wrapper around __tick_nohz_task_switch()

2014-04-15 Thread Frederic Weisbecker
On Tue, Apr 15, 2014 at 10:15:24AM +0530, Viresh Kumar wrote: > On 15 April 2014 04:52, Frederic Weisbecker wrote: > > On Mon, Apr 14, 2014 at 09:53:51PM +0530, Viresh Kumar wrote: > >> __tick_nohz_task_switch() was called only from tick_nohz_task_switch() and > >> there > >> is nothing much in

Re: [PATCH 29/38] tick-sched: remove wrapper around __tick_nohz_task_switch()

2014-04-15 Thread Frederic Weisbecker
On Tue, Apr 15, 2014 at 10:15:24AM +0530, Viresh Kumar wrote: On 15 April 2014 04:52, Frederic Weisbecker fweis...@gmail.com wrote: On Mon, Apr 14, 2014 at 09:53:51PM +0530, Viresh Kumar wrote: __tick_nohz_task_switch() was called only from tick_nohz_task_switch() and there is nothing

Re: [PATCH 29/38] tick-sched: remove wrapper around __tick_nohz_task_switch()

2014-04-15 Thread Viresh Kumar
On 15 April 2014 14:43, Frederic Weisbecker fweis...@gmail.com wrote: Yeah. But not just that. Using an inline saves a function call and reduce the offline case to a simple condition check. But there is also the jump label that reduce the condition check to an unconditional jump in the off

Re: [PATCH 29/38] tick-sched: remove wrapper around __tick_nohz_task_switch()

2014-04-15 Thread Frederic Weisbecker
On Tue, Apr 15, 2014 at 03:23:37PM +0530, Viresh Kumar wrote: On 15 April 2014 14:43, Frederic Weisbecker fweis...@gmail.com wrote: Yeah. But not just that. Using an inline saves a function call and reduce the offline case to a simple condition check. But there is also the jump label

Re: [PATCH 29/38] tick-sched: remove wrapper around __tick_nohz_task_switch()

2014-04-15 Thread Viresh Kumar
On 15 April 2014 18:14, Frederic Weisbecker fweis...@gmail.com wrote: Sure but check out the static_key_false() in the implementation of tick_nohz_full_enabled(). That's where the magic hides. No problem, the jump label/static key code is quite tricky. And its use can be easily missed, as

Re: [PATCH 29/38] tick-sched: remove wrapper around __tick_nohz_task_switch()

2014-04-14 Thread Viresh Kumar
On 15 April 2014 04:52, Frederic Weisbecker wrote: > On Mon, Apr 14, 2014 at 09:53:51PM +0530, Viresh Kumar wrote: >> __tick_nohz_task_switch() was called only from tick_nohz_task_switch() and >> there >> is nothing much in tick_nohz_task_switch() as well. IOW, we don't need >> unnecessary

Re: [PATCH 29/38] tick-sched: remove wrapper around __tick_nohz_task_switch()

2014-04-14 Thread Frederic Weisbecker
On Mon, Apr 14, 2014 at 09:53:51PM +0530, Viresh Kumar wrote: > __tick_nohz_task_switch() was called only from tick_nohz_task_switch() and > there > is nothing much in tick_nohz_task_switch() as well. IOW, we don't need > unnecessary wrapper over __tick_nohz_task_switch() to be there. Merge all

[PATCH 29/38] tick-sched: remove wrapper around __tick_nohz_task_switch()

2014-04-14 Thread Viresh Kumar
__tick_nohz_task_switch() was called only from tick_nohz_task_switch() and there is nothing much in tick_nohz_task_switch() as well. IOW, we don't need unnecessary wrapper over __tick_nohz_task_switch() to be there. Merge all code from __tick_nohz_task_switch() into tick_nohz_task_switch() and

Re: [PATCH 29/38] tick-sched: remove wrapper around __tick_nohz_task_switch()

2014-04-14 Thread Frederic Weisbecker
On Mon, Apr 14, 2014 at 09:53:51PM +0530, Viresh Kumar wrote: __tick_nohz_task_switch() was called only from tick_nohz_task_switch() and there is nothing much in tick_nohz_task_switch() as well. IOW, we don't need unnecessary wrapper over __tick_nohz_task_switch() to be there. Merge all code

Re: [PATCH 29/38] tick-sched: remove wrapper around __tick_nohz_task_switch()

2014-04-14 Thread Viresh Kumar
On 15 April 2014 04:52, Frederic Weisbecker fweis...@gmail.com wrote: On Mon, Apr 14, 2014 at 09:53:51PM +0530, Viresh Kumar wrote: __tick_nohz_task_switch() was called only from tick_nohz_task_switch() and there is nothing much in tick_nohz_task_switch() as well. IOW, we don't need

[PATCH 29/38] tick-sched: remove wrapper around __tick_nohz_task_switch()

2014-04-14 Thread Viresh Kumar
__tick_nohz_task_switch() was called only from tick_nohz_task_switch() and there is nothing much in tick_nohz_task_switch() as well. IOW, we don't need unnecessary wrapper over __tick_nohz_task_switch() to be there. Merge all code from __tick_nohz_task_switch() into tick_nohz_task_switch() and