summaryrefslogtreecommitdiffstats
path: root/Documentation/core-api/refcount-vs-atomic.rst
Commit message (Collapse)AuthorAgeFilesLines
* refcount_t: Add ACQUIRE ordering on success for dec(sub)_and_test() variantsElena Reshetova2019-02-041-3/+21
| | | | | | | | | | | | | | | | | | | | | | | This adds an smp_acquire__after_ctrl_dep() barrier on successful decrease of refcounter value from 1 to 0 for refcount_dec(sub)_and_test variants and therefore gives stronger memory ordering guarantees than prior versions of these functions. Co-developed-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Elena Reshetova <elena.reshetova@intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Andrea Parri <andrea.parri@amarulasolutions.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Will Deacon <will.deacon@arm.com> Cc: dvyukov@google.com Cc: keescook@chromium.org Cc: stern@rowland.harvard.edu Link: https://lkml.kernel.org/r/1548847131-27854-2-git-send-email-elena.reshetova@intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
* Documentation: refcount-vs-atomic: Update reference to LKMM doc.Andrea Parri2018-05-081-1/+1
| | | | | | | The LKMM project has moved to 'tools/memory-model/'. Signed-off-by: Andrea Parri <andrea.parri@amarulasolutions.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* docs: refcount_t documentationElena Reshetova2017-12-111-0/+150
Some functions from refcount_t API provide different memory ordering guarantees that their atomic counterparts. This adds a document outlining these differences ( Documentation/core-api/refcount-vs-atomic.rst) as well as some other minor improvements. Signed-off-by: Elena Reshetova <elena.reshetova@intel.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>