lkml.org 
[lkml]   [2003]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRE: [patch] printk subsystems
Robert wrote:

>There is both a qualitative difference and quantitative difference in a
>lockless algorithm as described versus one that uses locking. Most
>importantly for Linux, these algorithms in practice have better performance
>characteristics.
>
Do you have benchmark numbers that compare "lockless" and locking
algorithms on large MP systems?

For example, how much faster is one 'lock;cmpxchg' compared to
'spin_lock();if (x==var) var = y;spin_unlock();'.
So far I assumed that for spinlock that are only held for a few cycles,
the cacheline trashing dominates, and not the spinning.
I've avoided to replace spin_lock+inc+spin_unlock with atomic_inc().
(Just look at the needed memory barriers: smp_mb__after_clear_bit & friends)

RCU uses per-cpu queues that are really lockless and avoid the cache
trashing, that is a real win.

--
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 13:34    [from the cache]
©2003-2011 Jasper Spaans