[PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-02-10 Thread riel
From: Rik van Riel When running a microbenchmark calling an invalid syscall number in a loop, on a nohz_full CPU, we spend a full 9% of our CPU time in __acct_update_integrals. This function converts cputime_t to jiffies, to a timeval, only to convert the timeval back to microseconds before

[PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-02-10 Thread riel
From: Rik van Riel When running a microbenchmark calling an invalid syscall number in a loop, on a nohz_full CPU, we spend a full 9% of our CPU time in __acct_update_integrals. This function converts cputime_t to jiffies, to a timeval, only to convert the timeval back to

[PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-02-02 Thread riel
From: Rik van Riel When running a microbenchmark calling an invalid syscall number in a loop, on a nohz_full CPU, we spend a full 9% of our CPU time in __acct_update_integrals. This function converts cputime_t to jiffies, to a timeval, only to convert the timeval back to microseconds before

[PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-02-02 Thread riel
From: Rik van Riel When running a microbenchmark calling an invalid syscall number in a loop, on a nohz_full CPU, we spend a full 9% of our CPU time in __acct_update_integrals. This function converts cputime_t to jiffies, to a timeval, only to convert the timeval back to

[PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-02-01 Thread riel
From: Rik van Riel When running a microbenchmark calling an invalid syscall number in a loop, on a nohz_full CPU, we spend a full 9% of our CPU time in __acct_update_integrals. This function converts cputime_t to jiffies, to a timeval, only to convert the timeval back to microseconds before

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-02-01 Thread Peter Zijlstra
On Mon, Feb 01, 2016 at 08:44:44AM -0500, Rik van Riel wrote: > Before I send in a v4 with do_div in that location, are there > any other changes you would like me to make to the code? The WARN_ON(!irqs_disabled()) run and adding irq_save/restore to acct_update_integrals() would be good :-)

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-02-01 Thread Rik van Riel
On 02/01/2016 04:22 AM, Peter Zijlstra wrote: > On Mon, Feb 01, 2016 at 09:37:00AM +0100, Thomas Gleixner wrote: >> On Sun, 31 Jan 2016, r...@redhat.com wrote: >>> @@ -93,9 +93,9 @@ void xacct_add_tsk(struct taskstats *stats, struct >>> task_struct *p) >>> { >>> struct mm_struct *mm; >>>

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-02-01 Thread Peter Zijlstra
On Sat, Jan 30, 2016 at 12:53:09PM -0500, Rik van Riel wrote: > >> + delta = cputime_to_nsecs(dtime); > > > > You might want to add a comment specifying why we don't call > > cputime_to_usecs() > > directly (because we optimize if delta < TICK_NSEC). > > > > Although this has a good

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-02-01 Thread Thomas Gleixner
On Mon, 1 Feb 2016, Peter Zijlstra wrote: > On Mon, Feb 01, 2016 at 09:37:00AM +0100, Thomas Gleixner wrote: > > On Sun, 31 Jan 2016, r...@redhat.com wrote: > > > @@ -93,9 +93,9 @@ void xacct_add_tsk(struct taskstats *stats, struct > > > task_struct *p) > > > { > > > struct mm_struct *mm; > >

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-02-01 Thread Peter Zijlstra
On Mon, Feb 01, 2016 at 09:37:00AM +0100, Thomas Gleixner wrote: > On Sun, 31 Jan 2016, r...@redhat.com wrote: > > @@ -93,9 +93,9 @@ void xacct_add_tsk(struct taskstats *stats, struct > > task_struct *p) > > { > > struct mm_struct *mm; > > > > - /* convert pages-usec to Mbyte-usec */ > >

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-02-01 Thread Thomas Gleixner
On Sun, 31 Jan 2016, r...@redhat.com wrote: > @@ -93,9 +93,9 @@ void xacct_add_tsk(struct taskstats *stats, struct > task_struct *p) > { > struct mm_struct *mm; > > - /* convert pages-usec to Mbyte-usec */ > - stats->coremem = p->acct_rss_mem1 * PAGE_SIZE / MB; > -

[PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-02-01 Thread riel
From: Rik van Riel When running a microbenchmark calling an invalid syscall number in a loop, on a nohz_full CPU, we spend a full 9% of our CPU time in __acct_update_integrals. This function converts cputime_t to jiffies, to a timeval, only to convert the timeval back to

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-02-01 Thread Thomas Gleixner
On Sun, 31 Jan 2016, r...@redhat.com wrote: > @@ -93,9 +93,9 @@ void xacct_add_tsk(struct taskstats *stats, struct > task_struct *p) > { > struct mm_struct *mm; > > - /* convert pages-usec to Mbyte-usec */ > - stats->coremem = p->acct_rss_mem1 * PAGE_SIZE / MB; > -

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-02-01 Thread Peter Zijlstra
On Mon, Feb 01, 2016 at 09:37:00AM +0100, Thomas Gleixner wrote: > On Sun, 31 Jan 2016, r...@redhat.com wrote: > > @@ -93,9 +93,9 @@ void xacct_add_tsk(struct taskstats *stats, struct > > task_struct *p) > > { > > struct mm_struct *mm; > > > > - /* convert pages-usec to Mbyte-usec */ > >

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-02-01 Thread Thomas Gleixner
On Mon, 1 Feb 2016, Peter Zijlstra wrote: > On Mon, Feb 01, 2016 at 09:37:00AM +0100, Thomas Gleixner wrote: > > On Sun, 31 Jan 2016, r...@redhat.com wrote: > > > @@ -93,9 +93,9 @@ void xacct_add_tsk(struct taskstats *stats, struct > > > task_struct *p) > > > { > > > struct mm_struct *mm; > >

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-02-01 Thread Rik van Riel
On 02/01/2016 04:22 AM, Peter Zijlstra wrote: > On Mon, Feb 01, 2016 at 09:37:00AM +0100, Thomas Gleixner wrote: >> On Sun, 31 Jan 2016, r...@redhat.com wrote: >>> @@ -93,9 +93,9 @@ void xacct_add_tsk(struct taskstats *stats, struct >>> task_struct *p) >>> { >>> struct mm_struct *mm; >>>

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-02-01 Thread Peter Zijlstra
On Mon, Feb 01, 2016 at 08:44:44AM -0500, Rik van Riel wrote: > Before I send in a v4 with do_div in that location, are there > any other changes you would like me to make to the code? The WARN_ON(!irqs_disabled()) run and adding irq_save/restore to acct_update_integrals() would be good :-)

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-02-01 Thread Peter Zijlstra
On Sat, Jan 30, 2016 at 12:53:09PM -0500, Rik van Riel wrote: > >> + delta = cputime_to_nsecs(dtime); > > > > You might want to add a comment specifying why we don't call > > cputime_to_usecs() > > directly (because we optimize if delta < TICK_NSEC). > > > > Although this has a good

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-01-31 Thread kbuild test robot
Hi Rik, [auto build test ERROR on tip/sched/core] [also build test ERROR on v4.5-rc2 next-20160129] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url:

[PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-01-31 Thread riel
From: Rik van Riel When running a microbenchmark calling an invalid syscall number in a loop, on a nohz_full CPU, we spend a full 9% of our CPU time in __acct_update_integrals. This function converts cputime_t to jiffies, to a timeval, only to convert the timeval back to microseconds before

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-01-31 Thread kbuild test robot
Hi Rik, [auto build test ERROR on tip/sched/core] [also build test ERROR on v4.5-rc2 next-20160129] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url:

[PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-01-31 Thread riel
From: Rik van Riel When running a microbenchmark calling an invalid syscall number in a loop, on a nohz_full CPU, we spend a full 9% of our CPU time in __acct_update_integrals. This function converts cputime_t to jiffies, to a timeval, only to convert the timeval back to

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-01-30 Thread Rik van Riel
On 01/30/2016 09:44 AM, Frederic Weisbecker wrote: > On Fri, Jan 29, 2016 at 10:36:02PM -0500, r...@redhat.com wrote: >> From: Rik van Riel >> >> When running a microbenchmark calling an invalid syscall number >> in a loop, on a nohz_full CPU, we spend a full 9% of our CPU >> time in

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-01-30 Thread Frederic Weisbecker
On Fri, Jan 29, 2016 at 10:36:02PM -0500, r...@redhat.com wrote: > From: Rik van Riel > > When running a microbenchmark calling an invalid syscall number > in a loop, on a nohz_full CPU, we spend a full 9% of our CPU > time in __acct_update_integrals. > > This function converts cputime_t to

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-01-30 Thread Rik van Riel
On 01/30/2016 09:44 AM, Frederic Weisbecker wrote: > On Fri, Jan 29, 2016 at 10:36:02PM -0500, r...@redhat.com wrote: >> From: Rik van Riel >> >> When running a microbenchmark calling an invalid syscall number >> in a loop, on a nohz_full CPU, we spend a full 9% of our CPU >>

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-01-30 Thread Frederic Weisbecker
On Fri, Jan 29, 2016 at 10:36:02PM -0500, r...@redhat.com wrote: > From: Rik van Riel > > When running a microbenchmark calling an invalid syscall number > in a loop, on a nohz_full CPU, we spend a full 9% of our CPU > time in __acct_update_integrals. > > This function converts

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-01-29 Thread kbuild test robot
Hi Rik, [auto build test ERROR on tip/sched/core] [also build test ERROR on v4.5-rc1 next-20160129] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url:

[PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-01-29 Thread riel
From: Rik van Riel When running a microbenchmark calling an invalid syscall number in a loop, on a nohz_full CPU, we spend a full 9% of our CPU time in __acct_update_integrals. This function converts cputime_t to jiffies, to a timeval, only to convert the timeval back to microseconds before

[PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-01-29 Thread riel
From: Rik van Riel When running a microbenchmark calling an invalid syscall number in a loop, on a nohz_full CPU, we spend a full 9% of our CPU time in __acct_update_integrals. This function converts cputime_t to jiffies, to a timeval, only to convert the timeval back to

Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals

2016-01-29 Thread kbuild test robot
Hi Rik, [auto build test ERROR on tip/sched/core] [also build test ERROR on v4.5-rc1 next-20160129] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: