lkml.org 
[lkml]   [2016]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 3/3] x86: remove unneeded flush in arch_copy_from_iter_pmem()
    Date
    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 <ross.zwisler@linux.intel.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: <x86@kernel.org>
    Cc: Al Viro <viro@ZenIV.linux.org.uk>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Signed-off-by: Brian Boylston <brian.boylston@hpe.com>
    Reviewed-by: Toshi Kani <toshi.kani@hpe.com>
    Reported-by: Oliver Moreno <oliver.moreno@hpe.com>
    ---
    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);
    }

    /**
    --
    2.8.3
    \
     
     \ /
      Last update: 2016-10-26 17:53    [W:4.462 / U:0.108 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site