Re: [PATCH v2 1/3] introduce memcpy_nocache()

2016-12-29 Thread Dan Williams
On Thu, Dec 29, 2016 at 7:52 PM, Al Viro wrote: > On Thu, Dec 29, 2016 at 10:23:15AM -0800, Dan Williams wrote: > >> > BTW, your "it's iovec, only non-temporal stores there" logics in >> > arch_copy_from_iter_pmem() is simply wrong - for one thing, unaligned >> > copies will have parts done via no

Re: [PATCH v2 1/3] introduce memcpy_nocache()

2016-12-29 Thread Al Viro
On Thu, Dec 29, 2016 at 10:23:15AM -0800, Dan Williams wrote: > > BTW, your "it's iovec, only non-temporal stores there" logics in > > arch_copy_from_iter_pmem() is simply wrong - for one thing, unaligned > > copies will have parts done via normal stores, for another 32bit will > > _not_ go for no

Re: [PATCH v2 1/3] introduce memcpy_nocache()

2016-12-29 Thread Dan Williams
On Wed, Dec 28, 2016 at 3:43 PM, Al Viro wrote: > On Tue, Nov 01, 2016 at 04:25:12PM +0200, Boaz Harrosh wrote: > >> >> What about memcpy_to_pmem() in linux/pmem.h it already has all the arch >> >> switches. >> >> >> >> Feels bad to add yet just another arch switch over __copy_user_nocache >> >>

Re: [PATCH v2 1/3] introduce memcpy_nocache()

2016-12-28 Thread Al Viro
On Tue, Nov 01, 2016 at 04:25:12PM +0200, Boaz Harrosh wrote: > >> What about memcpy_to_pmem() in linux/pmem.h it already has all the arch > >> switches. > >> > >> Feels bad to add yet just another arch switch over __copy_user_nocache > >> > >> Just feels like too many things that do the same thi

Re: [PATCH v2 1/3] introduce memcpy_nocache()

2016-11-01 Thread Boaz Harrosh
On 10/28/2016 04:54 AM, Boylston, Brian wrote: > Boaz Harrosh wrote on 2016-10-26: >> On 10/26/2016 06:50 PM, Brian Boylston wrote: >>> Introduce memcpy_nocache() as a memcpy() that avoids the processor cache >>> if possible. Without arch-specific support, this defaults to just >>> memcpy(). For

RE: [PATCH v2 1/3] introduce memcpy_nocache()

2016-10-27 Thread Boylston, Brian
Boaz Harrosh wrote on 2016-10-26: > On 10/26/2016 06:50 PM, Brian Boylston wrote: >> Introduce memcpy_nocache() as a memcpy() that avoids the processor cache >> if possible. Without arch-specific support, this defaults to just >> memcpy(). For now, include arch-specific support for x86. >> >> Cc

RE: [PATCH v2 1/3] introduce memcpy_nocache()

2016-10-27 Thread Boylston, Brian
Thomas Gleixner wrote on 2016-10-26: > On Wed, 26 Oct 2016, Brian Boylston wrote: >> --- a/arch/x86/include/asm/string_32.h >> +++ b/arch/x86/include/asm/string_32.h >> @@ -196,6 +196,9 @@ static inline void *__memcpy3d(void *to, const void >> *from, size_t len) > >> +#define __HAVE_ARCH_MEMCPY_N

Re: [PATCH v2 1/3] introduce memcpy_nocache()

2016-10-26 Thread Boaz Harrosh
On 10/26/2016 06:50 PM, Brian Boylston wrote: > Introduce memcpy_nocache() as a memcpy() that avoids the processor cache > if possible. Without arch-specific support, this defaults to just > memcpy(). For now, include arch-specific support for x86. > > Cc: Ross Zwisler > Cc: Thomas Gleixner >

Re: [PATCH v2 1/3] introduce memcpy_nocache()

2016-10-26 Thread Thomas Gleixner
On Wed, 26 Oct 2016, Brian Boylston wrote: > --- a/arch/x86/include/asm/string_32.h > +++ b/arch/x86/include/asm/string_32.h > @@ -196,6 +196,9 @@ static inline void *__memcpy3d(void *to, const void > *from, size_t len) > +#define __HAVE_ARCH_MEMCPY_NOCACHE > +extern void *memcpy_nocache(void *de

[PATCH v2 1/3] introduce memcpy_nocache()

2016-10-26 Thread Brian Boylston
Introduce memcpy_nocache() as a memcpy() that avoids the processor cache if possible. Without arch-specific support, this defaults to just memcpy(). For now, include arch-specific support for x86. Cc: Ross Zwisler Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Cc: Al Viro Cc: