[lkml]   [2004]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] Yielding processor resources during lock contention
    On Sun, 12 Sep 2004, Nick Piggin wrote:

    > > Well currently it just enables preempt and spins like a mad man until the
    > > lock is free. The idea is to allow preempt to get some scheduling done
    > > during the spin.. But! if you accept this patch today, you get the
    > > i386 version which will allow your processor to halt until a write to the
    > > lock occurs whilst allowing interrupts to also trigger the preempt
    > > scheduling, much easier on the caches.
    > >
    > That's the idea though isn't it? If your locks are significantly more
    > expensive than a context switch and associated cache trashing, use a
    > semaphore, hypervisor or no.
    > I presume the hypervisor switch much incur the same sorts of costs as
    > a context switch?

    In the PPC64 and P4/HT case the spinning on a lock is a bad utilisation of
    the execution resources and that's what we're really trying to avoid, not
    necessarily cache thrashing from a context switch.


    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.018 / U:46.176 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site