13 Sep, 2015

1 commit

  • After commit:

    654672d4ba1a ("locking/atomics: Add _{acquire|release|relaxed}() variants of some atomic operations")

    Architectures may only provide {cmp,}xchg_relaxed definitions in
    asm/cmpxchg.h. Other variants, such as {cmp,}xchg, may be built in
    linux/atomic.h, which means simply including asm/cmpxchg.h may not get
    the definitions of all the{cmp,}xchg variants.

    Therefore, we should privatize the inclusions of asm/cmpxchg.h to
    keep it only included in arch/* and replace the inclusions outside
    with linux/atomic.h

    Signed-off-by: Boqun Feng
    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: Greg Kroah-Hartman
    Acked-by: Will Deacon
    Cc: Andrew Morton
    Cc: Aybuke Ozdemir
    Cc: Chris Brannon
    Cc: Davidlohr Bueso
    Cc: Greg Kroah-Hartman
    Cc: Jonathan Corbet
    Cc: Kirk Reiser
    Cc: Kishon Vijay Abraham I
    Cc: Linus Torvalds
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Samuel Thibault
    Cc: Shradha Shah
    Cc: Thomas Gleixner
    Cc: William Hubbs
    Cc: devel@driverdev.osuosl.org
    Cc: linux-net-drivers@solarflare.com
    Cc: speakup@linux-speakup.org
    Link: http://lkml.kernel.org/r/1440589966-26280-1-git-send-email-boqun.feng@gmail.com
    Signed-off-by: Ingo Molnar

    Boqun Feng
     

03 Aug, 2015

1 commit

  • A failed cmpxchg does not provide any memory ordering guarantees, a
    property that is used to optimise the cmpxchg implementations on Alpha,
    PowerPC and arm64.

    This patch updates atomic_ops.txt and memory-barriers.txt to reflect
    this.

    Signed-off-by: Will Deacon
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Andrew Morton
    Cc: Davidlohr Bueso
    Cc: Douglas Hatch
    Cc: H. Peter Anvin
    Cc: Jonathan Corbet
    Cc: Linus Torvalds
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Scott J Norton
    Cc: Thomas Gleixner
    Cc: Waiman Long
    Link: http://lkml.kernel.org/r/20150716151006.GH26390@arm.com
    Signed-off-by: Ingo Molnar

    Will Deacon
     

27 Feb, 2015

1 commit


14 Nov, 2014

1 commit


18 Apr, 2014

1 commit

  • Update the documentation to reflect the change of barrier primitives.

    Signed-off-by: Peter Zijlstra
    Reviewed-by: Paul E. McKenney
    Acked-by: David Howells
    Link: http://lkml.kernel.org/n/tip-xslfehiga1twbk5uk94rij1e@git.kernel.org
    Cc: Linus Torvalds
    Cc: Randy Dunlap
    Cc: linux-doc@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

09 Jan, 2013

1 commit


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