tag proposal
Brian Aker
brian at tangent.org
Fri Oct 12 00:45:08 UTC 2007
Hi!
On Oct 9, 2007, at 12:10 AM, dormando wrote:
> Are increments atomic across SMP/multicore? It'd be hard to corrupt
> it, but I don't know off the top of my head if it's safe to ignore
> locking when you're just reading/writing to one set of 4-8bytes.
> I'll have to
Not even close to being atomic. Not only do you have issues with
multicore, you have worse issues with SMP because of the costs around
synchronizing the variables across the CPU transport (aka the bus
between the CPU's).
When incrementing/changing values you need to wrap the write in a
mutex if you want to be sure of the change.
Cheers,
-Brian
--
_______________________________________________________
Brian "Krow" Aker, brian at tangent.org
Seattle, Washington
http://krow.net/ <-- Me
http://tangent.org/ <-- Software
http://exploitseattle.com/ <-- Fun
_______________________________________________________
You can't grep a dead tree.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20071011/c49d3d1f/attachment.htm
More information about the memcached
mailing list