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

    * Zwane Mwaikambo <zwane@linuxpower.ca> 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.

    Ingo
    -
    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 14:06    [W:0.029 / U:151.676 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site