lkml.org 
[lkml]   [2002]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] only irq-safe atomic ops
    From
    Date
    On Sat, 2002-02-23 at 06:38, yodaiken@fsmlabs.com wrote:

    > So without preemption in the kernel
    > maybe 4 instructions: calculate cpuid, inc; all local no cache ping
    > code is easy to read and understand.
    >
    > with preemption in the kernel
    > a design problem. a slippery synchronization issue that
    > involves the characteristic preemption error - code that works
    > most of the time.

    Or not. The topic of this thread was a micro-optimization. If we treat
    the variable as anything normal requiring synchronization under SMP, any
    of the standard solutions (atomic ops, etc.) work. If we want to get
    fancy, we can disable preemption, use my atomic_irq ops, or just not
    care.

    Robert Love

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:24    [W:0.020 / U:61.176 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site