[lkml]   [2004]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] remove LOCK_SECTION from x86_64 spin_lock asm

    * Zwane Mwaikambo <> wrote:

    > On Thu, 16 Sep 2004, Ingo Molnar wrote:
    > > the ebp trick is nice, but forcing a formal stack frame for every
    > > function has global performance implications. Couldnt we define some
    > > sort of current-> field [or current_thread_info() field] that the
    > > spinlock code could set and clear, which field would be listened to by
    > > profile_pc(), so that the time spent spinning would be attributed to the
    > > callee? Something like:
    > I think the generic route is nice but wouldn't this break with the
    > following.
    > taskA:
    > spin_lock(lockA); // contended
    > <interrupt>
    > int1:
    > spin_lock(lockB)
    > I was thinking along the likes of a per_cpu real_pc, but realised it
    > falls prey to the same problem as above... Unless we have irq threads,
    > then of course your solution works.

    you mean the nesting? spin_lock() should save/restore the value instead
    of setting/clearing it - and fork() should initialize it to zero.

    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: 2005-03-22 14:06    [W:0.022 / U:1.120 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site