lkml.org 
[lkml]   [2013]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] nohz: Convert a few places to use local per cpu accesses
OK so these patches look ok to me -- didn't read in detail though.

On Fri, Aug 16, 2013 at 05:42:33PM +0200, Frederic Weisbecker wrote:
> A few functions use remote per CPU access APIs when they
> deal with local values.
>
> Just to the right conversion to improve performance, code
> readability and debug checks.

> @@ -410,7 +408,7 @@ static void tick_nohz_update_jiffies(ktime_t now)
>
> static void tick_nohz_stop_idle(int cpu, ktime_t now)
> {
> - struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu);
> + struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched);

What's there from stopping someone from calling this with cpu !=
smp_processor_id() ?

> @@ -1020,7 +1018,7 @@ static void tick_nohz_kick_tick(int cpu, ktime_t now)
>
> static inline void tick_check_nohz(int cpu)
> {
> - struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu);
> + struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched);
> ktime_t now;
>
> if (!ts->idle_active && !ts->tick_stopped)

idem


\
 
 \ /
  Last update: 2013-08-16 18:21    [W:0.358 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site