Subject: [Fwd: [Ltt-dev] MIPS atomic operations, "sync"]

From: Sergei Shtylyov <[email-masked]>
Date: Fri, 10 Nov 2006 21:39:44 +0300

Forwarding to the correct mail list...

-------- Original Message --------
Subject: [Ltt-dev] MIPS atomic operations, "sync"
Date: Fri, 10 Nov 2006 13:36:53 -0500
From: Mathieu Desnoyers <[email-masked]>
To: [email-masked], [email-masked]

Hi,

I am currently creating a "LOCK" prefix free and memory barrier free version
of atomic.h to fulfill my tracer (LTTng) needs, which is to atomically update
per-cpu data and have a minimal performance loss.

I just came across the MIPS atomic.h and system.h implementations in 2.6.18
which brings a question :

Why are the primitives in include/asm-mips/atomic.h using the "sync"
instruction even in the UP case ? system.h cmpxchg only uses the sync in the
SMP case.

Mathieu

OpenPGP public key:              http://krystal.dyndns.org:8080/key/compudj.gpg
Key fingerprint:     8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
_______________________________________________
Ltt-dev mailing list
[email-masked]
http://listserv.shafik.org/mailman/listinfo/ltt-dev

---

From: "Kaz Kylheku" <[email-masked]>
Date: Fri, 10 Nov 2006 13:51:38 -0800

> instruction even in the UP case ? system.h cmpxchg only uses 

There was just a discussion about this in the mailing list. Check the
archive.

Ralf Baechle mentioned that he has a patch to remove the syncs from
uniprocessor code, so that would seem to answer your question.

Thread subject line: "Sync operation in atomic_add_return()".