09 Oct, 2012
1 commit
-
The x86 implementation of atomic_dec_if_positive is quite generic, so make
it available to all architectures.This is needed for "swap: add a simple detector for inappropriate swapin
readahead".[akpm@linux-foundation.org: do the "#define foo foo" trick in the conventional manner]
Signed-off-by: Shaohua Li
Cc: Stephen Rothwell
Cc: "David S. Miller"
Cc: Rik van Riel
Cc: Ingo Molnar
Cc: Thomas Gleixner
Cc: "H. Peter Anvin"
Cc: Benjamin Herrenschmidt
Cc: Michal Simek
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
07 Mar, 2012
1 commit
-
We want to implement a ppc64 specific version of atomic_inc_not_zero
so wrap it in an ifdef to allow it to be overridden.Signed-off-by: Anton Blanchard
Acked-by: Mike Frysinger
Signed-off-by: Benjamin Herrenschmidt
27 Jul, 2011
4 commits
-
This clarifies the differences between and
Signed-off-by: Arun Sharma
Suggested-by: Mike Frysinger
Cc: Eric Dumazet
Cc: Ingo Molnar
Cc: David Miller
Acked-by: Mike Frysinger
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
After changing all consumers of atomics to include , we
ran into some compile time errors due to this dependency chain:linux/atomic.h
-> asm/atomic.h
-> asm-generic/atomic-long.hwhere atomic-long.h could use funcs defined later in linux/atomic.h
without a prototype. This patches moves the code that includes
asm-generic/atomic*.h to linux/atomic.h.Archs that need need to select
CONFIG_GENERIC_ATOMIC64 from now on (some of them used to include it
unconditionally).Compile tested on i386 and x86_64 with allnoconfig.
Signed-off-by: Arun Sharma
Cc: Eric Dumazet
Cc: Ingo Molnar
Cc: David Miller
Acked-by: Mike Frysinger
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This is in preparation for more generic atomic primitives based on
__atomic_add_unless.Signed-off-by: Arun Sharma
Signed-off-by: Hans-Christian Egtvedt
Reviewed-by: Eric Dumazet
Cc: Ingo Molnar
Cc: David Miller
Acked-by: Mike Frysinger
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This allows us to move duplicated code in
(atomic_inc_not_zero() for now) toSigned-off-by: Arun Sharma
Reviewed-by: Eric Dumazet
Cc: Ingo Molnar
Cc: David Miller
Cc: Eric Dumazet
Acked-by: Mike Frysinger
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
20 Jul, 2011
1 commit
-
new helpers: atomic_inc_unless_negative()/atomic_dec_unless_positive()
Signed-off-by: Al Viro
28 May, 2011
1 commit
-
An atomic_or() function is needed by TREE_RCU to avoid deadlock, so
add a generic version.Signed-off-by: Paul E. McKenney
Signed-off-by: Paul E. McKenney
Signed-off-by: Ingo Molnar
12 Nov, 2010
1 commit
-
Followup of perf tools session in Netfilter WorkShop 2010
In the network stack we make high usage of atomic_inc_not_zero() in
contexts we know the probable value of atomic before increment (2 for udp
sockets for example)Using a special version of atomic_inc_not_zero() giving this hint can help
processor to use less bus transactions.On x86 (MESI protocol) for example, this avoids entering Shared state,
because "lock cmpxchg" issues an RFO (Read For Ownership)akpm: Adds a new include/linux/atomic.h. This means that new code should
henceforth include linux/atomic.h and not asm/atomic.h. The presence of
include/linux/atomic.h will in fact cause checkpatch.pl to warn about use
of asm/atomic.h. The new include/linux/atomic.h becomes the place where
arch-neutral atomic_t code should be placed.[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Eric Dumazet
Cc: Christoph Lameter
Cc: Ingo Molnar
Cc: Andi Kleen
Cc: Arnaldo Carvalho de Melo
Cc: David Miller
Cc: "Paul E. McKenney"
Cc: Nick Piggin
Reviewed-by: "Paul E. McKenney"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds