From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 740291A1E43 for ; Wed, 26 Oct 2016 12:57:09 -0700 (PDT) Received: by mail-wm0-x233.google.com with SMTP id e69so54787376wmg.0 for ; Wed, 26 Oct 2016 12:57:09 -0700 (PDT) Message-ID: <58110A90.9070900@plexistor.com> Date: Wed, 26 Oct 2016 22:57:04 +0300 From: Boaz Harrosh MIME-Version: 1.0 Subject: Re: [PATCH v2 3/3] x86: remove unneeded flush in arch_copy_from_iter_pmem() References: <20161026155021.20892-1-brian.boylston@hpe.com> <20161026155021.20892-4-brian.boylston@hpe.com> In-Reply-To: <20161026155021.20892-4-brian.boylston@hpe.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Brian Boylston , linux-nvdimm@lists.01.org Cc: oliver.moreno@hpe.com, x86@kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , Al Viro , "H. Peter Anvin" , Thomas Gleixner List-ID: On 10/26/2016 06:50 PM, Brian Boylston wrote: > copy_from_iter_nocache() now uses nocache copies for all types of iovecs > on x86, so the flush in arch_copy_from_iter_pmem() is no longer needed. > > Cc: Ross Zwisler > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: "H. Peter Anvin" > Cc: > Cc: Al Viro > Cc: Dan Williams > Signed-off-by: Brian Boylston > Reviewed-by: Toshi Kani > Reported-by: Oliver Moreno > --- > arch/x86/include/asm/pmem.h | 19 +------------------ > 1 file changed, 1 insertion(+), 18 deletions(-) > > diff --git a/arch/x86/include/asm/pmem.h b/arch/x86/include/asm/pmem.h > index 643eba4..2fbf4ae 100644 > --- a/arch/x86/include/asm/pmem.h > +++ b/arch/x86/include/asm/pmem.h > @@ -72,15 +72,6 @@ static inline void arch_wb_cache_pmem(void *addr, size_t size) > clwb(p); > } > > -/* > - * copy_from_iter_nocache() on x86 only uses non-temporal stores for iovec > - * iterators, so for other types (bvec & kvec) we must do a cache write-back. > - */ > -static inline bool __iter_needs_pmem_wb(struct iov_iter *i) > -{ > - return iter_is_iovec(i) == false; > -} > - > /** > * arch_copy_from_iter_pmem - copy data from an iterator to PMEM > * @addr: PMEM destination address > @@ -92,15 +83,7 @@ static inline bool __iter_needs_pmem_wb(struct iov_iter *i) > static inline size_t arch_copy_from_iter_pmem(void *addr, size_t bytes, > struct iov_iter *i) > { > - size_t len; > - > - /* TODO: skip the write-back by always using non-temporal stores */ > - len = copy_from_iter_nocache(addr, bytes, i); > - > - if (__iter_needs_pmem_wb(i)) > - arch_wb_cache_pmem(addr, bytes); > - > - return len; > + return copy_from_iter_nocache(addr, bytes, i); I wish you would remove all this completely. Don't see the point for it anymore Thanks a lot for doing this. I have this patch for ages in my trees and was too lasy to fight them through. Yes it is a big boost for many workloads. Lots of gratitude Boaz > } > > /** > _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm