Re: [PATCH 2/3] context_tracking: Inherit TIF_NOHZ through forks instead of context switches

2015-04-03 Thread Frederic Weisbecker
On Thu, Apr 02, 2015 at 03:11:20PM -0400, Rik van Riel wrote: > On 04/02/2015 03:09 PM, Peter Zijlstra wrote: > > On Thu, Apr 02, 2015 at 07:39:24PM +0200, Frederic Weisbecker wrote: > >> TIF_NOHZ is used by context_tracking to force syscall slow-path on every > >> task in order to track userspace

Re: [PATCH 2/3] context_tracking: Inherit TIF_NOHZ through forks instead of context switches

2015-04-03 Thread Frederic Weisbecker
On Thu, Apr 02, 2015 at 08:08:03PM +0200, Oleg Nesterov wrote: > On 04/02, Frederic Weisbecker wrote: > > > > +void context_tracking_cpu_set(int cpu) > > { > > - clear_tsk_thread_flag(prev, TIF_NOHZ); > > - set_tsk_thread_flag(next, TIF_NOHZ); > > + static bool initialized = false; > > + s

Re: [PATCH 2/3] context_tracking: Inherit TIF_NOHZ through forks instead of context switches

2015-04-02 Thread Oleg Nesterov
On 04/02, Peter Zijlstra wrote: > > On Thu, Apr 02, 2015 at 07:39:24PM +0200, Frederic Weisbecker wrote: > > TIF_NOHZ is used by context_tracking to force syscall slow-path on every > > task in order to track userspace roundtrips. As such, it must be set on > > all running tasks. > > > > It's curre

Re: [PATCH 2/3] context_tracking: Inherit TIF_NOHZ through forks instead of context switches

2015-04-02 Thread Rik van Riel
On 04/02/2015 03:09 PM, Peter Zijlstra wrote: > On Thu, Apr 02, 2015 at 07:39:24PM +0200, Frederic Weisbecker wrote: >> TIF_NOHZ is used by context_tracking to force syscall slow-path on every >> task in order to track userspace roundtrips. As such, it must be set on >> all running tasks. >> >> It'

Re: [PATCH 2/3] context_tracking: Inherit TIF_NOHZ through forks instead of context switches

2015-04-02 Thread Peter Zijlstra
On Thu, Apr 02, 2015 at 07:39:24PM +0200, Frederic Weisbecker wrote: > TIF_NOHZ is used by context_tracking to force syscall slow-path on every > task in order to track userspace roundtrips. As such, it must be set on > all running tasks. > > It's currently explicitly inherited through context swi

Re: [PATCH 2/3] context_tracking: Inherit TIF_NOHZ through forks instead of context switches

2015-04-02 Thread Oleg Nesterov
On 04/02, Frederic Weisbecker wrote: > > +void context_tracking_cpu_set(int cpu) > { > - clear_tsk_thread_flag(prev, TIF_NOHZ); > - set_tsk_thread_flag(next, TIF_NOHZ); > + static bool initialized = false; > + struct task_struct *p, *t; > + unsigned long flags; > + > + if (

Re: [PATCH 2/3] context_tracking: Inherit TIF_NOHZ through forks instead of context switches

2015-04-02 Thread Rik van Riel
On 04/02/2015 01:39 PM, Frederic Weisbecker wrote: > TIF_NOHZ is used by context_tracking to force syscall slow-path on every > task in order to track userspace roundtrips. As such, it must be set on > all running tasks. > > It's currently explicitly inherited through context switches. There is >

[PATCH 2/3] context_tracking: Inherit TIF_NOHZ through forks instead of context switches

2015-04-02 Thread Frederic Weisbecker
TIF_NOHZ is used by context_tracking to force syscall slow-path on every task in order to track userspace roundtrips. As such, it must be set on all running tasks. It's currently explicitly inherited through context switches. There is no need to do it on this fast-path though. The flag could be si