Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1637707
| From | Dan Williams <dan.j.williams@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations |
| Date | 2017-05-08 22:50 +0200 |
| Message-ID | <tEXLr-ls-5@gated-at.bofh.it> (permalink) |
| References | <tALfQ-5aa-15@gated-at.bofh.it> <tBk3T-3DG-5@gated-at.bofh.it> <tEXBL-g6-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, May 8, 2017 at 1:32 PM, Ross Zwisler <ross.zwisler@linux.intel.com> wrote: > On Fri, Apr 28, 2017 at 12:39:12PM -0700, Dan Williams wrote: >> The pmem driver has a need to transfer data with a persistent memory >> destination and be able to rely on the fact that the destination writes >> are not cached. It is sufficient for the writes to be flushed to a >> cpu-store-buffer (non-temporal / "movnt" in x86 terms), as we expect >> userspace to call fsync() to ensure data-writes have reached a >> power-fail-safe zone in the platform. The fsync() triggers a REQ_FUA or >> REQ_FLUSH to the pmem driver which will turn around and fence previous >> writes with an "sfence". >> >> Implement a __copy_from_user_inatomic_wt, memcpy_page_wt, and memcpy_wt, >> that guarantee that the destination buffer is not dirty in the cpu cache >> on completion. The new copy_from_iter_wt and sub-routines will be used >> to replace the "pmem api" (include/linux/pmem.h + >> arch/x86/include/asm/pmem.h). The availability of copy_from_iter_wt() >> and memcpy_wt() are gated by the CONFIG_ARCH_HAS_UACCESS_WT config >> symbol, and fallback to copy_from_iter_nocache() and plain memcpy() >> otherwise. >> >> This is meant to satisfy the concern from Linus that if a driver wants >> to do something beyond the normal nocache semantics it should be >> something private to that driver [1], and Al's concern that anything >> uaccess related belongs with the rest of the uaccess code [2]. >> >> [1]: https://lists.01.org/pipermail/linux-nvdimm/2017-January/008364.html >> [2]: https://lists.01.org/pipermail/linux-nvdimm/2017-April/009942.html >> >> Cc: <x86@kernel.org> >> Cc: Jan Kara <jack@suse.cz> >> Cc: Jeff Moyer <jmoyer@redhat.com> >> Cc: Ingo Molnar <mingo@redhat.com> >> Cc: Christoph Hellwig <hch@lst.de> >> Cc: "H. Peter Anvin" <hpa@zytor.com> >> Cc: Al Viro <viro@zeniv.linux.org.uk> >> Cc: Thomas Gleixner <tglx@linutronix.de> >> Cc: Matthew Wilcox <mawilcox@microsoft.com> >> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> >> Signed-off-by: Dan Williams <dan.j.williams@intel.com> [..] > I took a pretty hard look at the changes in arch/x86/lib/usercopy_64.c, and > they look correct to me. The inline assembly for non-temporal copies mixed > with C for loop control is IMHO much easier to follow than the pure assembly > of __copy_user_nocache(). > > Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Thanks Ross, I appreciate it.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RFC PATCH] x86, uaccess, pmem: introduce copy_from_iter_writethru for dax + pmem Dan Williams <dan.j.williams@intel.com> - 2017-04-27 00:10 +0200
Re: [RFC PATCH] x86, uaccess, pmem: introduce copy_from_iter_writethru for dax + pmem Ingo Molnar <mingo@kernel.org> - 2017-04-27 08:40 +0200
[PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations Dan Williams <dan.j.williams@intel.com> - 2017-04-28 21:50 +0200
Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations Ingo Molnar <mingo@kernel.org> - 2017-05-05 09:00 +0200
Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations Dan Williams <dan.j.williams@intel.com> - 2017-05-05 16:20 +0200
Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations "Kani, Toshimitsu" <toshi.kani@hpe.com> - 2017-05-05 22:40 +0200
Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations Dan Williams <dan.j.williams@intel.com> - 2017-05-06 00:30 +0200
Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations "Kani, Toshimitsu" <toshi.kani@hpe.com> - 2017-05-06 00:50 +0200
Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations Dan Williams <dan.j.williams@intel.com> - 2017-05-06 04:20 +0200
RE: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations "Kani, Toshimitsu" <toshi.kani@hpe.com> - 2017-05-06 05:20 +0200
Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations Ingo Molnar <mingo@kernel.org> - 2017-05-06 11:50 +0200
Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations Dan Williams <dan.j.williams@intel.com> - 2017-05-06 16:00 +0200
Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations Ingo Molnar <mingo@kernel.org> - 2017-05-08 00:30 +0200
RE: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations "Kani, Toshimitsu" <toshi.kani@hpe.com> - 2017-05-08 05:10 +0200
Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations Ross Zwisler <ross.zwisler@linux.intel.com> - 2017-05-08 22:40 +0200
Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations Dan Williams <dan.j.williams@intel.com> - 2017-05-08 22:50 +0200
csiph-web