lkml.org 
[lkml]   [2004]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch] remove the BKL (Big Kernel Lock), this time for real
    Tony wrote:

    >I coded a IPC system before use atomic add + share memory.
    >It works very well (fast) on 4 CPU SMP system, since it doesn't use
    >any locking API at all. Very good for resource allocation for
    >SMP. I implemented speciall malloc/free use by ISR, different
    >prority process completely without any lock.
    >
    Without any lock or without any common cacheline that are accessed by
    atomic operations?
    I usually consider the costs of
    atomic_inc(&global_atomic_var);
    and
    spin_lock(&global_lock);
    global_var++;
    spin_unlock(&global_lock);
    as nearly identical (assuming that global_var and global_lock are in the
    same cacheline): one cachline transfer per run. The 5 instructions under
    the spinlock and the theoretical chance that spin_lock() blocks are
    noise compared to the cost of the line transfer.
    And that's without thinking about smb_mb__{before,after}_atomic_inc().

    Btw, Ingo forgot to mention sequence locks and percpu_counter as two
    high-scalability locking primitives.

    --
    Manfred
    -
    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:5.189 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site