lkml.org 
[lkml]   [2011]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Code clean up for percpu_xxx() functions
On 10/19/2011 11:23 AM, Alex,Shi wrote:
> > Well do the obvious (where you can see that interrupts or preemption are
> > disabled in the function or in a calling function). Leave the rest as is
> > and provide separate patches for them?
>
> Thanks for comments! I initialized the patch as following accordingly,
> And cc to more maintainers for review. I checked all code except xen/kvm
> part, totally a idiot for them.
>
>
>
> ==========
>
> Since percpu_xxx() serial functions are duplicate with this_cpu_xxx().
> Removing percpu_xxx() definition and replacing them by this_cpu_xxx() in
> code.
>
> And further more, as Christoph Lameter's requirement, I try to use
> __this_cpu_xx to replace this_cpu_xxx if it is in preempt safe scenario.
> The preempt safe scenarios include:
> 1, in irq/softirq/nmi handler
> 2, protected by preempt_disable
> 3, protected by spin_lock
> 4, if the code context imply that it is preempt safe, like the code is
> follows or be followed a preempt safe code.
>
> I left the xen/kvm part code unchanged, since no any idea of them.
>
>

All of the kvm usage is in preemption disabled contexts.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.



\
 
 \ /
  Last update: 2011-10-19 11:29    [from the cache]
©2003-2011 Jasper Spaans