lkml.org 
[lkml]   [2005]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectVolatile vs Non-Volatile Spin Locks on SMP.
Date
Hello,

By using volatile keyword for spin lock defined by in spinlock_t, it seems
Linux choose to always
reload the value of spin locks from cache instead of using the content from
registers. This may be
helpful for synchronization between multithreads in a single CPU.

I use two Xeon cpus with HyperThreading being disabled on both cpus. I think
the MESI
protocol will enforce the cache coherency and update the spin lock value
automatically between
these two cpus. So maybe we don't need to use the volatile any more, right?

Based on this, I rebuilt the Intel e1000 Gigabit network card driver with
volatile being removed,
but I didn't notice any performance improvement.

Any idea about this,

Thanks a lot,

Liang



-
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-07-15 21:31    [W:0.085 / U:0.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site