12 Dec, 2011

1 commit

  • An IRC discussion uncovered many conflicting opinions on what types
    of data may be atomically loaded and stored. This commit therefore
    calls this out the official set: pointers, longs, ints, and chars (but
    not shorts). This commit also gives some examples of compiler mischief
    that can thwart atomicity.

    Please note that this discussion is relevant to !SMP kernels if
    CONFIG_PREEMPT=y: preemption can cause almost as much trouble as can SMP.

    Signed-off-by: Paul E. McKenney
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: Russell King
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Mike Frysinger
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: Richard Kuo
    Cc: Jes Sorensen
    Cc: Hirokazu Takata
    Cc: Geert Uytterhoeven
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: Koichi Yasutake
    Cc: Jonas Bonn
    Cc: Kyle McMartin
    Cc: Helge Deller
    Cc: "James E.J. Bottomley"
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Chen Liqin
    Cc: Lennox Wu
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Cc: Guan Xuetao
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Chris Zankel

    Paul E. McKenney
     

27 May, 2011

1 commit


23 Apr, 2010

1 commit


17 Jun, 2009

1 commit


24 Feb, 2008

1 commit

  • (sorry for being offtpoic, but while experts are here...)

    A "typical" implementation of atomic_add_unless() can return 0 immediately
    after the first atomic_read() (before doing cmpxchg). In that case it doesn't
    provide any barrier semantics. See include/asm-ia64/atomic.h as an example.

    We should either change the implementation, or fix the docs.

    Signed-off-by: Oleg Nesterov
    Acked-by: Nick Piggin
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     

19 Oct, 2007

1 commit

  • Introduce test_and_set_bit_lock / clear_bit_unlock bitops with lock semantics.
    Convert all architectures to use the generic implementation.

    Signed-off-by: Nick Piggin
    Acked-By: David Howells
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Russell King
    Cc: Haavard Skinnemoen
    Cc: Bryan Wu
    Cc: Mikael Starvik
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: "Luck, Tony"
    Cc: Hirokazu Takata
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Cc: Greg Ungerer
    Cc: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Matthew Wilcox
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Cc: Richard Curnow
    Cc: William Lee Irwin III
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Cc: Miles Bader
    Cc: Andi Kleen
    Cc: Chris Zankel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

17 Oct, 2007

2 commits

  • atomic_ops.txt has incorrect, misleading and insufficient information about
    semantics of initializer, atomic_set, atomic_read and atomic_xchg.

    It also incorrectly implies that operations mentioned above are not actual
    atomic operations.

    Included is most of the patch Document non-semantics of atomic_read() and
    atomic_set() by Chris Snook, except the word "assignment".

    Signed-off-by: Matti Linnanvuori
    Cc: Nick Piggin
    Cc: "Paul E. McKenney"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matti Linnanvuori
     
  • local_t is a variant of atomic_t and has related ops to match.
    Add reference for local_t documentation to atomic_ops.txt.

    Signed-off-by: Grant Grundler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Grant Grundler
     

09 Jun, 2007

1 commit


27 Jun, 2006

1 commit


14 Nov, 2005

2 commits

  • Introduce an atomic_inc_not_zero operation. Make this a special case of
    atomic_add_unless because lockless pagecache actually wants
    atomic_inc_not_negativeone due to its offset refcount.

    Signed-off-by: Nick Piggin
    Cc: "Paul E. McKenney"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Introduce an atomic_cmpxchg operation.

    Signed-off-by: Nick Piggin
    Cc: "Paul E. McKenney"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds