From: tip-bot for Dan Williams <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@kernel.org, dan.j.williams@intel.com,
torvalds@linux-foundation.org, bp@alien8.de, tony.luck@intel.com,
viro@zeniv.linux.org.uk, akpm@linux-foundation.org,
peterz@infradead.org, hpa@zytor.com,
linux-kernel@vger.kernel.org, luto@amacapital.net,
tglx@linutronix.de
Subject: [tip:core/urgent] lib/iov_iter: Document _copy_to_iter_flushcache()
Date: Sun, 15 Jul 2018 16:31:09 -0700 [thread overview]
Message-ID: <tip-abd08d7d245397bcbded8c6c29ff79a36b3875b0@git.kernel.org> (raw)
In-Reply-To: <153108276767.37979.9462477994086841699.stgit@dwillia2-desk3.amr.corp.intel.com>
Commit-ID: abd08d7d245397bcbded8c6c29ff79a36b3875b0
Gitweb: https://git.kernel.org/tip/abd08d7d245397bcbded8c6c29ff79a36b3875b0
Author: Dan Williams <dan.j.williams@intel.com>
AuthorDate: Sun, 8 Jul 2018 13:46:07 -0700
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 16 Jul 2018 00:05:05 +0200
lib/iov_iter: Document _copy_to_iter_flushcache()
Add some theory of operation documentation to _copy_to_iter_flushcache().
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/153108276767.37979.9462477994086841699.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
lib/iov_iter.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/lib/iov_iter.c b/lib/iov_iter.c
index 94fa361be7bb..09fb73ad9d54 100644
--- a/lib/iov_iter.c
+++ b/lib/iov_iter.c
@@ -727,6 +727,20 @@ size_t _copy_from_iter_nocache(void *addr, size_t bytes, struct iov_iter *i)
EXPORT_SYMBOL(_copy_from_iter_nocache);
#ifdef CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE
+/**
+ * _copy_from_iter_flushcache - write destination through cpu cache
+ * @addr: destination kernel address
+ * @bytes: total transfer length
+ * @iter: source iterator
+ *
+ * The pmem driver arranges for filesystem-dax to use this facility via
+ * dax_copy_from_iter() for ensuring that writes to persistent memory
+ * are flushed through the CPU cache. It is differentiated from
+ * _copy_from_iter_nocache() in that guarantees all data is flushed for
+ * all iterator types. The _copy_from_iter_nocache() only attempts to
+ * bypass the cache for the ITER_IOVEC case, and on some archs may use
+ * instructions that strand dirty-data in the cache.
+ */
size_t _copy_from_iter_flushcache(void *addr, size_t bytes, struct iov_iter *i)
{
char *to = addr;
next prev parent reply other threads:[~2018-07-15 23:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-08 20:45 [PATCH 0/4] lib/iov_iter: Fixes and documentation for pmem user copies Dan Williams
2018-07-08 20:46 ` [PATCH 1/4] lib/iov_iter: Document _copy_to_iter_mcsafe() Dan Williams
2018-07-15 23:30 ` [tip:core/urgent] " tip-bot for Dan Williams
2018-07-08 20:46 ` [PATCH 2/4] lib/iov_iter: Document _copy_to_iter_flushcache() Dan Williams
2018-07-15 23:31 ` tip-bot for Dan Williams [this message]
2018-07-08 20:46 ` [PATCH 3/4] lib/iov_iter: Fix pipe handling in _copy_to_iter_mcsafe Dan Williams
2018-07-15 23:31 ` [tip:core/urgent] lib/iov_iter: Fix pipe handling in _copy_to_iter_mcsafe() tip-bot for Dan Williams
2018-07-08 20:46 ` [PATCH 4/4] x86/asm/memcpy_mcsafe: Fix copy_to_user_mcsafe() exception handling Dan Williams
2018-07-15 23:32 ` [tip:core/urgent] " tip-bot for Dan Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-abd08d7d245397bcbded8c6c29ff79a36b3875b0@git.kernel.org \
--to=tipbot@zytor.com \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=dan.j.williams@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome