Re: [PATCH 6/8] sched: task_sched_runtime introduce micro optimization

2013-06-20 Thread KOSAKI Motohiro
(6/18/13 10:18 AM), Frederic Weisbecker wrote: On Tue, Jun 18, 2013 at 11:17:41AM -0400, KOSAKI Motohiro wrote: +#ifdef CONFIG_64BIT + /* + * 64-bit doesn't need locks to atomically read a 64bit value. So we + * have two optimization chances, 1) when caller doesn't need + *

Re: [PATCH 6/8] sched: task_sched_runtime introduce micro optimization

2013-06-20 Thread KOSAKI Motohiro
(6/18/13 10:18 AM), Frederic Weisbecker wrote: On Tue, Jun 18, 2013 at 11:17:41AM -0400, KOSAKI Motohiro wrote: +#ifdef CONFIG_64BIT + /* + * 64-bit doesn't need locks to atomically read a 64bit value. So we + * have two optimization chances, 1) when caller doesn't need + *

Re: [PATCH 6/8] sched: task_sched_runtime introduce micro optimization

2013-06-18 Thread Frederic Weisbecker
On Tue, Jun 18, 2013 at 11:17:41AM -0400, KOSAKI Motohiro wrote: > >> +#ifdef CONFIG_64BIT > >> + /* > >> + * 64-bit doesn't need locks to atomically read a 64bit value. So we > >> + * have two optimization chances, 1) when caller doesn't need > >> + * delta_exec and 2) when the

Re: [PATCH 6/8] sched: task_sched_runtime introduce micro optimization

2013-06-18 Thread KOSAKI Motohiro
On Tue, Jun 18, 2013 at 11:17 AM, KOSAKI Motohiro wrote: >>> +#ifdef CONFIG_64BIT >>> + /* >>> + * 64-bit doesn't need locks to atomically read a 64bit value. So we >>> + * have two optimization chances, 1) when caller doesn't need >>> + * delta_exec and 2) when the task's

Re: [PATCH 6/8] sched: task_sched_runtime introduce micro optimization

2013-06-18 Thread KOSAKI Motohiro
>> +#ifdef CONFIG_64BIT >> + /* >> + * 64-bit doesn't need locks to atomically read a 64bit value. So we >> + * have two optimization chances, 1) when caller doesn't need >> + * delta_exec and 2) when the task's delta_exec is 0. The former is >> + * obvious. The latter is

Re: [PATCH 6/8] sched: task_sched_runtime introduce micro optimization

2013-06-18 Thread Frederic Weisbecker
On Sun, May 26, 2013 at 05:35:47PM -0400, kosaki.motoh...@gmail.com wrote: > From: KOSAKI Motohiro > > rq lock in task_sched_runtime() is necessary for two reasons. 1) > accessing se.sum_exec_runtime is not atomic on 32bit and 2) > do_task_delta_exec() require it. > > So, 64bit can avoid

Re: [PATCH 6/8] sched: task_sched_runtime introduce micro optimization

2013-06-18 Thread Frederic Weisbecker
On Sun, May 26, 2013 at 05:35:47PM -0400, kosaki.motoh...@gmail.com wrote: From: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com rq lock in task_sched_runtime() is necessary for two reasons. 1) accessing se.sum_exec_runtime is not atomic on 32bit and 2) do_task_delta_exec() require it. So,

Re: [PATCH 6/8] sched: task_sched_runtime introduce micro optimization

2013-06-18 Thread KOSAKI Motohiro
+#ifdef CONFIG_64BIT + /* + * 64-bit doesn't need locks to atomically read a 64bit value. So we + * have two optimization chances, 1) when caller doesn't need + * delta_exec and 2) when the task's delta_exec is 0. The former is + * obvious. The latter is complicated.

Re: [PATCH 6/8] sched: task_sched_runtime introduce micro optimization

2013-06-18 Thread KOSAKI Motohiro
On Tue, Jun 18, 2013 at 11:17 AM, KOSAKI Motohiro kosaki.motoh...@gmail.com wrote: +#ifdef CONFIG_64BIT + /* + * 64-bit doesn't need locks to atomically read a 64bit value. So we + * have two optimization chances, 1) when caller doesn't need + * delta_exec and 2) when the

Re: [PATCH 6/8] sched: task_sched_runtime introduce micro optimization

2013-06-18 Thread Frederic Weisbecker
On Tue, Jun 18, 2013 at 11:17:41AM -0400, KOSAKI Motohiro wrote: +#ifdef CONFIG_64BIT + /* + * 64-bit doesn't need locks to atomically read a 64bit value. So we + * have two optimization chances, 1) when caller doesn't need + * delta_exec and 2) when the task's

[PATCH 6/8] sched: task_sched_runtime introduce micro optimization

2013-05-26 Thread kosaki . motohiro
From: KOSAKI Motohiro rq lock in task_sched_runtime() is necessary for two reasons. 1) accessing se.sum_exec_runtime is not atomic on 32bit and 2) do_task_delta_exec() require it. So, 64bit can avoid holding rq lock when add_delta is false and delta_exec is 0. Cc: Olivier Langlois Cc: Thomas

[PATCH 6/8] sched: task_sched_runtime introduce micro optimization

2013-05-26 Thread kosaki . motohiro
From: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com rq lock in task_sched_runtime() is necessary for two reasons. 1) accessing se.sum_exec_runtime is not atomic on 32bit and 2) do_task_delta_exec() require it. So, 64bit can avoid holding rq lock when add_delta is false and delta_exec is 0. Cc: