Re: [RFC PATCH] timer: Improve itimers scalability

2015-08-07 Thread Oleg Nesterov
On 08/06, Jason Low wrote: > > On Thu, 2015-08-06 at 16:18 +0200, Oleg Nesterov wrote: > > > + /* > > > + * Check for the special case process timers. > > > + */ > > > + check_cpu_itimer(tsk, &sig->it[CPUCLOCK_PROF], &prof_expires, ptime, > > > + SIGPROF); > > > + check_cpu_itime

Re: [RFC PATCH] timer: Improve itimers scalability

2015-08-06 Thread Jason Low
On Thu, 2015-08-06 at 16:18 +0200, Oleg Nesterov wrote: > On 08/04, Jason Low wrote: > > > > @@ -973,13 +981,6 @@ static void check_process_timers(struct task_struct > > *tsk, > > virt_expires = check_timers_list(++timers, firing, utime); > > sched_expires = check_timers_list(++timers, fir

Re: [RFC PATCH] timer: Improve itimers scalability

2015-08-06 Thread Oleg Nesterov
On 08/04, Jason Low wrote: > > @@ -973,13 +981,6 @@ static void check_process_timers(struct task_struct *tsk, > virt_expires = check_timers_list(++timers, firing, utime); > sched_expires = check_timers_list(++timers, firing, sum_sched_runtime); > > - /* > - * Check for the sp

Re: [RFC PATCH] timer: Improve itimers scalability

2015-08-05 Thread Jason Low
On Wed, 2015-08-05 at 11:37 +0200, Peter Zijlstra wrote: > On Tue, Aug 04, 2015 at 05:29:44PM -0700, Jason Low wrote: > > > @@ -1137,6 +1148,13 @@ static inline int fastpath_timer_check(struct > > task_struct *tsk) > > if (READ_ONCE(sig->cputimer.running)) { > > Maybe make that: > > i

Re: [RFC PATCH] timer: Improve itimers scalability

2015-08-05 Thread Peter Zijlstra
On Tue, Aug 04, 2015 at 05:29:44PM -0700, Jason Low wrote: > @@ -1137,6 +1148,13 @@ static inline int fastpath_timer_check(struct > task_struct *tsk) > if (READ_ONCE(sig->cputimer.running)) { Maybe make that: if (READ_ONCE(sig->cputimer.running) && !READ_ONCE(sig->cput

Re: [RFC PATCH] timer: Improve itimers scalability

2015-08-05 Thread Peter Zijlstra
On Tue, Aug 04, 2015 at 05:29:44PM -0700, Jason Low wrote: > When running a database workload on a 16 socket machine, there were > scalability issues related to itimers. I very much hope you're also trying to convince the relevant database people that using process wide timers on something they ex

[RFC PATCH] timer: Improve itimers scalability

2015-08-04 Thread Jason Low
When running a database workload on a 16 socket machine, there were scalability issues related to itimers. Commit 1018016c706f addressed the issue with the thread_group_cputimer spinlock taking up a significant portion of total run time. This patch addresses the other issue where a lot of time is