Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1550300
| From | Linus Torvalds <torvalds@linux-foundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC] memcpy_nocache() and memcpy_writethrough() |
| Date | 2017-01-04 00:50 +0100 |
| Message-ID | <sVH05-4YR-3@gated-at.bofh.it> (permalink) |
| References | (6 earlier) <sUhAK-5fV-7@gated-at.bofh.it> <sV0Hv-9w-13@gated-at.bofh.it> <sV32F-1Sa-1@gated-at.bofh.it> <sVEEV-3Cx-3@gated-at.bofh.it> <sVGGJ-4S6-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Jan 3, 2017 at 3:22 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> 1) memcpy_to_pmem() seems to rely upon the __copy_from_user_nocache()
> having only used movnt; it does not attempt clwb at all.
>
> 2) __copy_from_user_nocache() for short copies does not use movnt at all.
> In that case neither sfence nor clwb is issued.
Quite frankly, the whole "memcpy_nocache()" idea or (ab-)using
copy_user_nocache() just needs to die. It's idiotic.
As you point out, it's also fundamentally buggy crap.
Throw it away. There is no possible way this is ever valid or
portable. We're not going to lie and claim that it is.
If some driver ends up using "movnt" by hand, that is up to that
*driver*. But no way in hell should we care about this one whit in the
sense of <linux/uaccess.h>. Get rid of that shit.
So Al - just ignore this whole issue. It's not your headache. Any code
that tries to depend on some non-caching memcpy is terminally buggy,
and those code paths need to fix themselves, not ask others to fix
their braindamage for them.
Linus
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v2 1/3] introduce memcpy_nocache() Al Viro <viro@ZenIV.linux.org.uk> - 2016-12-29 00:50 +0100
Re: [PATCH v2 1/3] introduce memcpy_nocache() Dan Williams <dan.j.williams@intel.com> - 2016-12-29 19:30 +0100
Re: [PATCH v2 1/3] introduce memcpy_nocache() Al Viro <viro@ZenIV.linux.org.uk> - 2016-12-30 05:00 +0100
Re: [PATCH v2 1/3] introduce memcpy_nocache() Dan Williams <dan.j.williams@intel.com> - 2016-12-30 06:00 +0100
[RFC] memcpy_nocache() and memcpy_writethrough() Al Viro <viro@ZenIV.linux.org.uk> - 2016-12-31 03:30 +0100
RE: [RFC] memcpy_nocache() and memcpy_writethrough() "Elliott, Robert (Persistent Memory)" <elliott@hpe.com> - 2017-01-02 03:40 +0100
Re: [RFC] memcpy_nocache() and memcpy_writethrough() Al Viro <viro@ZenIV.linux.org.uk> - 2017-01-02 06:10 +0100
Re: [RFC] memcpy_nocache() and memcpy_writethrough() Dan Williams <dan.j.williams@intel.com> - 2017-01-03 22:20 +0100
Re: [RFC] memcpy_nocache() and memcpy_writethrough() Al Viro <viro@ZenIV.linux.org.uk> - 2017-01-04 00:30 +0100
Re: [RFC] memcpy_nocache() and memcpy_writethrough() Linus Torvalds <torvalds@linux-foundation.org> - 2017-01-04 00:50 +0100
Re: [RFC] memcpy_nocache() and memcpy_writethrough() Dan Williams <dan.j.williams@intel.com> - 2017-01-04 02:00 +0100
Re: [RFC] memcpy_nocache() and memcpy_writethrough() Dan Williams <dan.j.williams@intel.com> - 2017-01-04 02:40 +0100
Re: [RFC] memcpy_nocache() and memcpy_writethrough() Al Viro <viro@ZenIV.linux.org.uk> - 2017-01-04 03:00 +0100
Re: [RFC] memcpy_nocache() and memcpy_writethrough() Dan Williams <dan.j.williams@intel.com> - 2017-01-04 03:20 +0100
csiph-web