lkml.org 
[lkml]   [2011]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC tip/core/rcu 11/11] rcu: move TREE_RCU from softirq to kthread
On Wed, 23 Feb 2011, Mathieu Desnoyers wrote:

> > > > +
> > > > + local_irq_save(flags);
> > > > + cpu = smp_processor_id();

Drop this line.

> > > > + if (per_cpu(rcu_cpu_kthread_task, cpu) == NULL) {

use this_cpu_read(rcu_cpu_kthread_task)

> > > > + local_irq_restore(flags);
> > > > + return;
> > > > + }
> > > > + per_cpu(rcu_cpu_has_work, cpu) = 1;

this_cpu_write(rcu_cpu_has_work, 1);

> This is not quite true on x86_64 and s390 anymore. __get_cpu_var() now
> uses a segment selector override to get the local CPU variable on x86.
> See x86's percpu.h for details.

__get_cpu_var cannot use a segment override since there are places where
the address of the variable is taken. One needs to use this_cpu_ops for
that.


> > True, but we could also argue that the multiple checks for being preempt
> > can also be an issue.
>
> At least on x86 preemption don't actually need to be disabled: selection
> of the right per-cpu memory location is done atomically with the rest of
> the instruction by the segment selector.

Right.


\
 
 \ /
  Last update: 2011-02-23 18:37    [from the cache]
©2003-2011 Jasper Spaans