Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [Fwd: [Ltt-dev] MIPS atomic operations, "sync"]
@ 2006-11-10 18:39 Sergei Shtylyov
  0 siblings, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2006-11-10 18:39 UTC (permalink / raw)
  To: Linux-MIPS; +Cc: compudj, tt-dev

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 <compudj@krystal.dyndns.org>
To: lkml@vger.kernel.org, ltt-dev@shafik.org

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
Ltt-dev@listserv.shafik.org
http://listserv.shafik.org/mailman/listinfo/ltt-dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [Fwd: [Ltt-dev] MIPS atomic operations, "sync"]
@ 2006-11-10 21:51 Kaz Kylheku
  2006-11-10 21:51 ` Kaz Kylheku
  0 siblings, 1 reply; 3+ messages in thread
From: Kaz Kylheku @ 2006-11-10 21:51 UTC (permalink / raw)
  To: Sergei Shtylyov, Linux-MIPS; +Cc: compudj, tt-dev

Sergei Shtylyov wrote:
> 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.

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()".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [Fwd: [Ltt-dev] MIPS atomic operations, "sync"]
  2006-11-10 21:51 Kaz Kylheku
@ 2006-11-10 21:51 ` Kaz Kylheku
  0 siblings, 0 replies; 3+ messages in thread
From: Kaz Kylheku @ 2006-11-10 21:51 UTC (permalink / raw)
  To: Sergei Shtylyov, Linux-MIPS; +Cc: compudj, tt-dev

Sergei Shtylyov wrote:
> 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.

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()".

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-11-10 21:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-10 18:39 [Fwd: [Ltt-dev] MIPS atomic operations, "sync"] Sergei Shtylyov
  -- strict thread matches above, loose matches on Subject: below --
2006-11-10 21:51 Kaz Kylheku
2006-11-10 21:51 ` Kaz Kylheku

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox