[lkml]   [2002]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC] New locking primitive for 2.5
    On Thu, Feb 07, 2002 at 04:38:57PM +0100, Martin Wirth wrote:
    > This is a request for comment on a new locking primitive
    > called a combilock.
    > The goal of this development is:
    > 1. To allow for a better SMP scalability of semaphores used as Mutex
    > 2. As a replacement for long held spinlocks in an preemptible kernel
    > The new lock uses a combination of a spinlock and a (mutex-)semaphore.
    > You can lock it for short-term issues in a spin-lock mode:
    > combi_spin_lock(struct combilock *x)
    > combi_spin_unlock(struct combilock *x)
    > and for longer lasting tasks in a sleeping mode by:
    > combi_mutex_lock(struct combilock *x)
    > combi_mutex_unlock(struct combilock *x)
    > If a spin_lock request is blocked by a mutex_lock call, the spin_lock
    > attempt also sleeps i.e. behaves like a semaphore.

    So what's the difference between combi_spin and combi_mutex?
    combi_spin becomes
    if not mutex locked, spin
    else sleep

    The entire concept is revolting.

    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 13:24    [W:0.023 / U:5.864 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site