18 Apr, 2015

1 commit

  • Pull documentation updates from Jonathan Corbet:
    "Numerous fixes, the overdue removal of the i2o docs, some new Chinese
    translations, and, hopefully, the README fix that will end the flow of
    identical patches to that file"

    * tag 'docs-for-linus' of git://git.lwn.net/linux-2.6: (34 commits)
    Documentation/memcg: update memcg/kmem status
    Documentation: blackfin: Makefile: Typo building issue
    Documentation/vm/pagemap.txt: correct location of page-types tool
    Documentation/memory-barriers.txt: typo fix
    doc: Add guest_nice column to example output of `cat /proc/stat'
    Documentation/kernel-parameters: Move "eagerfpu" to its right place
    Documentation: gpio: Update ACPI part of the document to mention _DSD
    docs/completion.txt: Various tweaks and corrections
    doc: completion: context, scope and language fixes
    Documentation:Update Documentation/zh_CN/arm64/memory.txt
    Documentation:Update Documentation/zh_CN/arm64/booting.txt
    Documentation: Chinese translation of arm64/legacy_instructions.txt
    DocBook media: fix broken EIA hyperlink
    Documentation: tweak the maintainers entry
    README: Change gzip/bzip2 to xz compression format
    README: Update version number reference
    doc:pci: Fix typo in Documentation/PCI
    Documentation: drm: Use '->' when describing access through pointers.
    Documentation: Remove mentioning of block barriers
    Documentation/email-clients.txt: Fix one grammar mistake, add extra info about TB
    ...

    Linus Torvalds
     

09 Apr, 2015

1 commit


27 Feb, 2015

1 commit


08 Jan, 2015

2 commits


12 Dec, 2014

1 commit

  • There are a number of situations where the mandatory barriers rmb() and
    wmb() are used to order memory/memory operations in the device drivers
    and those barriers are much heavier than they actually need to be. For
    example in the case of PowerPC wmb() calls the heavy-weight sync
    instruction when for coherent memory operations all that is really needed
    is an lsync or eieio instruction.

    This commit adds a coherent only version of the mandatory memory barriers
    rmb() and wmb(). In most cases this should result in the barrier being the
    same as the SMP barriers for the SMP case, however in some cases we use a
    barrier that is somewhere in between rmb() and smp_rmb(). For example on
    ARM the rmb barriers break down as follows:

    Barrier Call Explanation
    --------- -------- ----------------------------------
    rmb() dsb() Data synchronization barrier - system
    dma_rmb() dmb(osh) data memory barrier - outer sharable
    smp_rmb() dmb(ish) data memory barrier - inner sharable

    These new barriers are not as safe as the standard rmb() and wmb().
    Specifically they do not guarantee ordering between coherent and incoherent
    memories. The primary use case for these would be to enforce ordering of
    reads and writes when accessing coherent memory that is shared between the
    CPU and a device.

    It may also be noted that there is no dma_mb(). Most architectures don't
    provide a good mechanism for performing a coherent only full barrier without
    resorting to the same mechanism used in mb(). As such there isn't much to
    be gained in trying to define such a function.

    Cc: Frederic Weisbecker
    Cc: Mathieu Desnoyers
    Cc: Michael Ellerman
    Cc: Michael Neuling
    Cc: Russell King
    Cc: Geert Uytterhoeven
    Cc: Heiko Carstens
    Cc: Linus Torvalds
    Cc: Martin Schwidefsky
    Cc: Tony Luck
    Cc: Oleg Nesterov
    Cc: "Paul E. McKenney"
    Cc: Peter Zijlstra
    Cc: Ingo Molnar
    Cc: David Miller
    Acked-by: Benjamin Herrenschmidt
    Acked-by: Will Deacon
    Signed-off-by: Alexander Duyck
    Signed-off-by: David S. Miller

    Alexander Duyck
     

10 Dec, 2014

1 commit

  • Pull RCU updates from Ingo Molnar:
    "These are the main changes in this cycle:

    - Streamline RCU's use of per-CPU variables, shifting from "cpu"
    arguments to functions to "this_"-style per-CPU variable
    accessors.

    - signal-handling RCU updates.

    - real-time updates.

    - torture-test updates.

    - miscellaneous fixes.

    - documentation updates"

    * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (34 commits)
    rcu: Fix FIXME in rcu_tasks_kthread()
    rcu: More info about potential deadlocks with rcu_read_unlock()
    rcu: Optimize cond_resched_rcu_qs()
    rcu: Add sparse check for RCU_INIT_POINTER()
    documentation: memory-barriers.txt: Correct example for reorderings
    documentation: Add atomic_long_t to atomic_ops.txt
    documentation: Additional restriction for control dependencies
    documentation: Document RCU self test boot params
    rcutorture: Fix rcu_torture_cbflood() memory leak
    rcutorture: Remove obsolete kversion param in kvm.sh
    rcutorture: Remove stale test configurations
    rcutorture: Enable RCU self test in configs
    rcutorture: Add early boot self tests
    torture: Run Linux-kernel binary out of results directory
    cpu: Avoid puts_pending overflow
    rcu: Remove "cpu" argument to rcu_cleanup_after_idle()
    rcu: Remove "cpu" argument to rcu_prepare_for_idle()
    rcu: Remove "cpu" argument to rcu_needs_cpu()
    rcu: Remove "cpu" argument to rcu_note_context_switch()
    rcu: Remove "cpu" argument to rcu_preempt_check_callbacks()
    ...

    Linus Torvalds
     

14 Nov, 2014

2 commits


21 Oct, 2014

1 commit

  • This patch extends the paragraph describing the relaxed read io accessors
    so that the relaxed accessors are defined to be:

    - Ordered with respect to each other if accessing the same peripheral

    - Unordered with respect to normal memory accesses

    - Unordered with respect to LOCK/UNLOCK operations

    Whilst many architectures will provide stricter semantics, ARM, Alpha and
    PPC can achieve significant performance gains by taking advantage of some
    or all of the above relaxations.

    Cc: Randy Dunlap
    Cc: Benjamin Herrenschmidt
    Cc: Paul E. McKenney
    Cc: David Howells
    Signed-off-by: Will Deacon

    Will Deacon
     

08 Sep, 2014

3 commits


08 Jul, 2014

2 commits


07 Jun, 2014

1 commit

  • Examples introducing neccesity of RMB+WMP pair reads as

    A=3 READ B
    www rrrrrr
    B=4 READ A

    Note the opposite order of reads vs writes.

    But the first example without barriers reads as

    A=3 READ A
    B=4 READ B

    There are 4 outcomes in the first example.

    But if someone new to the concept tries to insert barriers like this:

    A=3 READ A
    www rrrrrr
    B=4 READ B

    he will still get all 4 possible outcomes, because "READ A" is first.

    All this can be utterly confusing because barrier pair seems to be
    superfluous. In short, fixup first example to match latter examples
    with barriers.

    Signed-off-by: Alexey Dobriyan
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

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
     

03 Apr, 2014

1 commit

  • Pull trivial tree updates from Jiri Kosina:
    "Usual rocket science -- mostly documentation and comment updates"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial:
    sparse: fix comment
    doc: fix double words
    isdn: capi: fix "CAPI_VERSION" comment
    doc: DocBook: Fix typos in xml and template file
    Bluetooth: add module name for btwilink
    driver core: unexport static function create_syslog_header
    mmc: core: typo fix in printk specifier
    ARM: spear: clean up editing mistake
    net-sysfs: fix comment typo 'CONFIG_SYFS'
    doc: Insert MODULE_ in module-signing macros
    Documentation: update URL to hfsplus Technote 1150
    gpio: update path to documentation
    ixgbe: Fix format string in ixgbe_fcoe.
    Kconfig: Remove useless "default N" lines
    user_namespace.c: Remove duplicated word in comment
    CREDITS: fix formatting
    treewide: Fix typo in Documentation/DocBook
    mm: Fix warning on make htmldocs caused by slab.c
    ata: ata-samsung_cf: cleanup in header file
    idr: remove unused prototype of idr_free()

    Linus Torvalds
     

21 Mar, 2014

1 commit


25 Feb, 2014

1 commit


18 Feb, 2014

3 commits


12 Jan, 2014

1 commit

  • The LOCK and UNLOCK barriers as described in our barrier document are
    generally known as ACQUIRE and RELEASE barriers in other literature.

    Since we plan to introduce the acquire and release nomenclature in
    generic kernel primitives we should amend the document to avoid
    confusion as to what an acquire/release means.

    Reviewed-by: "Paul E. McKenney"
    Signed-off-by: Peter Zijlstra
    Acked-by: Mathieu Desnoyers
    Cc: Benjamin Herrenschmidt
    Cc: Frederic Weisbecker
    Cc: Michael Ellerman
    Cc: Michael Neuling
    Cc: Russell King
    Cc: Geert Uytterhoeven
    Cc: Heiko Carstens
    Cc: Linus Torvalds
    Cc: Martin Schwidefsky
    Cc: Victor Kaplansky
    Cc: Tony Luck
    Cc: Oleg Nesterov
    Link: http://lkml.kernel.org/r/20131217092435.GC21999@twins.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

16 Dec, 2013

5 commits

  • Historically, an UNLOCK+LOCK pair executed by one CPU, by one
    task, or on a given lock variable has implied a full memory
    barrier. In a recent LKML thread, the wisdom of this historical
    approach was called into question:
    http://www.spinics.net/lists/linux-mm/msg65653.html, in part due
    to the memory-order complexities of low-handoff-overhead queued
    locks on x86 systems.

    This patch therefore removes this guarantee from the
    documentation, and further documents how to restore it via a new
    smp_mb__after_unlock_lock() primitive.

    Signed-off-by: Paul E. McKenney
    Reviewed-by: Peter Zijlstra
    Cc:
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/r/1386799151-2219-6-git-send-email-paulmck@linux.vnet.ibm.com
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • The situations in which ACCESS_ONCE() is required are not well
    documented, so this commit adds some verbiage to
    memory-barriers.txt.

    Reported-by: Peter Zijlstra
    Signed-off-by: Paul E. McKenney
    Reviewed-by: Josh Triplett
    Reviewed-by: Peter Zijlstra
    Cc:
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/r/1386799151-2219-4-git-send-email-paulmck@linux.vnet.ibm.com
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • No SMP architecture currently supporting Linux allows
    speculative writes, so this commit updates
    Documentation/memory-barriers.txt to prohibit them in Linux core
    code. It also records restrictions on their use.

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Paul E. McKenney
    Reviewed-by: Josh Triplett
    Reviewed-by: Peter Zijlstra
    Cc:
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/r/1386799151-2219-3-git-send-email-paulmck@linux.vnet.ibm.com
    [ Paul modified the original patch from Peter. ]
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Although the atomic_long_t functions are quite useful, they are
    a bit obscure. This commit therefore adds the common ones
    alongside their atomic_t counterparts in
    Documentation/memory-barriers.txt.

    Signed-off-by: Paul E. McKenney
    Reviewed-by: Josh Triplett
    Reviewed-by: Peter Zijlstra
    Cc:
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/r/1386799151-2219-2-git-send-email-paulmck@linux.vnet.ibm.com
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • The Documentation/memory-barriers.txt file was written before
    the need for ACCESS_ONCE() was fully appreciated. It therefore
    contains no ACCESS_ONCE() calls, which can be a problem when
    people lift examples from it. This commit therefore adds
    ACCESS_ONCE() calls.

    Signed-off-by: Paul E. McKenney
    Reviewed-by: Josh Triplett
    Reviewed-by: Peter Zijlstra
    Cc:
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/r/1386799151-2219-1-git-send-email-paulmck@linux.vnet.ibm.com
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     

22 Nov, 2013

1 commit

  • This typo has been there forever, it is 7.5 years old, looks like this
    section of our memory ordering documentation is a place where most eyes
    are glazed over already ;-)

    [ Also fix some stray spaces and stray tabs while at it, shrinking the
    file by 49 bytes. Visual output unchanged. ]

    Cc: Peter Zijlstra
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Thomas Gleixner
    Cc: Paul E. McKenney
    Link: http://lkml.kernel.org/n/tip-gncea9cb8igosblizfqMXrie@git.kernel.org
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

20 Aug, 2013

1 commit


09 Jan, 2013

1 commit


24 Oct, 2012

1 commit


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