[lkml]   [2007]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] SLUB use cmpxchg_local
    * Christoph Lameter ( wrote:
    > On Tue, 21 Aug 2007, Mathieu Desnoyers wrote:
    > > Are you running a UP or SMP kernel ? If you run a UP kernel, the
    > > cmpxchg_local and cmpxchg are identical.
    > UP.
    > > Oh, and if you run your tests at boot time, the alternatives code may
    > > have removed the lock prefix, therefore making cmpxchg and cmpxchg_local
    > > exactly the same.
    > Tests were run at boot time.
    > That still does not explain kmalloc not showing improvements.

    Hrm, weird.. because it should. Here are the numbers I posted

    The measurements I get (in cycles):
    enable interrupts (STI) disable interrupts (CLI) local CMPXCHG
    IA32 (P4) 112 82 26
    x86_64 AMD64 125 102 19

    So both AMD64 and IA32 should be improved.

    So why those improvements are not shown in your test ? A few possible

    - Do you have any CONFIG_DEBUG_* options activated ? smp_processor_id()
    may end up being more expensive in these cases.
    - Rounding error.. you seem to round at 0.1ms, but I keep the values in
    cycles. The times that you get (1.1ms) seems strangely higher than
    mine, which are under 1000 cycles on a 3GHz system (less than 333ns).
    I guess there is both a ms - ns error there and/or not enough
    precision in your numbers.


    Mathieu Desnoyers
    Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
    OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-08-22 02:05    [W:0.021 / U:87.268 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site