28 Sep, 2011

1 commit

  • There are numerous broken references to Documentation files (in other
    Documentation files, in comments, etc.). These broken references are
    caused by typo's in the references, and by renames or removals of the
    Documentation files. Some broken references are simply odd.

    Fix these broken references, sometimes by dropping the irrelevant text
    they were part of.

    Signed-off-by: Paul Bolle
    Signed-off-by: Jiri Kosina

    Paul Bolle
     

05 Mar, 2011

1 commit


25 Mar, 2010

1 commit


29 Apr, 2009

1 commit

  • Add a section to the memory barriers document to note the implied
    memory barriers of sleep primitives (set_current_state() and wrappers)
    and wake-up primitives (wake_up() and co.).

    Also extend the in-code comments on the wake_up() functions to note
    these implied barriers.

    [ Impact: add documentation ]

    Signed-off-by: David Howells
    Cc: Oleg Nesterov
    Cc: Linus Torvalds
    Cc: Andrew Morton
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    David Howells
     

15 May, 2008

1 commit

  • read_barrie_depends has always been a noop (not a compiler barrier) on all
    architectures except SMP alpha. This brings UP alpha and frv into line with all
    other architectures, and fixes incorrect documentation.

    Signed-off-by: Nick Piggin
    Acked-by: Paul E. McKenney
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

21 Apr, 2008

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
     

24 May, 2007

1 commit


30 Nov, 2006

1 commit


09 Nov, 2006

1 commit


21 Oct, 2006

1 commit


04 Oct, 2006

2 commits


15 Jul, 2006

1 commit


01 Jul, 2006

1 commit


26 Jun, 2006

2 commits

  • Apply some small corrections to the memory barrier document, as contributed by:

    Christoph Lameter
    Kirill Smelkov
    Randy Dunlap

    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Make another couple of alterations to the memory barrier document following
    suggestions by Alan Stern and in co-operation with Paul McKenney:

    (*) Rework the point of introduction of memory barriers and the description
    of what they are to reiterate why they're needed.

    (*) Modify a statement about the use of data dependency barriers to note that
    other barriers can be used instead (as they imply DD-barriers).

    Signed-off-by: David Howells
    Acked-By: Paul E. McKenney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

11 Jun, 2006

1 commit

  • From: David Howells

    Apply some alterations to the memory barrier document that I worked out
    with Paul McKenney of IBM, plus some of the alterations suggested by Alan
    Stern.

    The following changes were made:

    (*) One of the examples given for what can happen with overlapping memory
    barriers was wrong.

    (*) The description of general memory barriers said that a general barrier is
    a combination of a read barrier and a write barrier. This isn't entirely
    true: it implies both, but is more than a combination of both.

    (*) The first example in the "SMP Barrier Pairing" section was wrong: the
    loads around the read barrier need to touch the memory locations in the
    opposite order to the stores around the write barrier.

    (*) Added a note to make explicit that the loads should be in reverse order to
    the stores.

    (*) Adjusted the diagrams in the "Examples Of Memory Barrier Sequences"
    section to make them clearer. Added a couple of diagrams to make it more
    clear as to how it could go wrong without the barrier.

    (*) Added a section on memory speculation.

    (*) Dropped any references to memory allocation routines doing memory
    barriers. They may do sometimes, but it can't be relied on. This may be
    worthy of further documentation later.

    (*) Made the fact that a LOCK followed by an UNLOCK should not be considered a
    full memory barrier more explicit and gave an example.

    Signed-off-by: David Howells
    Acked-by: Paul E. McKenney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

16 May, 2006

1 commit


11 Apr, 2006

2 commits

  • In the memory barrier document, improve the example of the data dependency
    barrier situation by:

    (1) showing the initial values of the variables involved; and

    (2) repeating the instruction sequence description, this time with the data
    dependency barrier actually shown to make it clear what the revised
    sequence actually is.

    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Fix the memory barrier documentation to attempt to describe atomic ops
    correctly.

    atomic_t ops that return a value _do_ imply smp_mb() either side, and so
    don't actually require smp_mb__*_atomic_*() special barriers.

    Also explains why special barriers exist in addition to normal barriers.

    Further fix the memory barrier documents to portray bitwise operation
    memory barrier effects correctly following Nick Piggin's comments.

    It makes the point that any atomic op that both modifies some state in
    memory and returns information on that state implies memory barriers on
    both sides.

    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

01 Apr, 2006

1 commit

  • The attached patch documents the Linux kernel's memory barriers.

    I've updated it from the comments I've been given.

    The per-arch notes sections are gone because it's clear that there are so many
    exceptions, that it's not worth having them.

    I've added a list of references to other documents.

    I've tried to get rid of the concept of memory accesses appearing on the bus;
    what matters is apparent behaviour with respect to other observers in the
    system.

    Interrupts barrier effects are now considered to be non-existent. They may be
    there, but you may not rely on them.

    I've added a couple of definition sections at the top of the document: one to
    specify the minimum execution model that may be assumed, the other to specify
    what this document refers to by the term "memory".

    I've made greater mention of the use of mmiowb().

    I've adjusted the way in which caches are described, and described the fun
    that can be had with cache coherence maintenance being unordered and data
    dependency not being necessarily implicit.

    I've described (smp_)read_barrier_depends().

    I've rearranged the order of the sections, so that memory barriers are
    discussed in abstract first, and then described the memory barrier facilities
    available on Linux, before going on to more real-world discussions and examples.

    I've added information about the lack of memory barriering effects with atomic
    ops and bitops.

    I've added information about control dependencies.

    I've added more diagrams to illustrate caching interactions between CPUs.

    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    David Howells