pmem: add wb_cache_pmem() to the PMEM API
authorRoss Zwisler <[email protected]>
Fri, 22 Jan 2016 23:10:37 +0000 (15:10 -0800)
committerLinus Torvalds <[email protected]>
Sat, 23 Jan 2016 01:02:18 +0000 (17:02 -0800)
commit3f4a2670deea53e3765e24a7f46aafe6f077cb68
tree1fcaf61e9a5c1a626e58a2ed25c7c8f7d46324b1
parentde14b9cb5e02b5daaea139590393af5ccccc4229
pmem: add wb_cache_pmem() to the PMEM API

__arch_wb_cache_pmem() was already an internal implementation detail of
the x86 PMEM API, but this functionality needs to be exported as part of
the general PMEM API to handle the fsync/msync case for DAX mmaps.

One thing worth noting is that we really do want this to be part of the
PMEM API as opposed to a stand-alone function like clflush_cache_range()
because of ordering restrictions.  By having wb_cache_pmem() as part of
the PMEM API we can leave it unordered, call it multiple times to write
back large amounts of memory, and then order the multiple calls with a
single wmb_pmem().

Signed-off-by: Ross Zwisler <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: "J. Bruce Fields" <[email protected]>
Cc: "Theodore Ts'o" <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Andreas Dilger <[email protected]>
Cc: Dave Chinner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Jeff Layton <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Dave Hansen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
arch/x86/include/asm/pmem.h
include/linux/pmem.h