Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1636778

Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations

From "Kani, Toshimitsu" <toshi.kani@hpe.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations
Date 2017-05-06 00:50 +0200
Message-ID <tDUcV-80b-5@gated-at.bofh.it> (permalink)
References <tALfQ-5aa-15@gated-at.bofh.it> <tBk3T-3DG-5@gated-at.bofh.it> <tDSb8-6HT-13@gated-at.bofh.it> <tDTTA-7R3-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 2017-05-05 at 15:25 -0700, Dan Williams wrote:
> On Fri, May 5, 2017 at 1:39 PM, Kani, Toshimitsu <toshi.kani@hpe.com>
> wrote:
 :
> > > ---
> > > Changes since the initial RFC:
> > > * s/writethru/wt/ since we already have ioremap_wt(),
> > > set_memory_wt(), etc. (Ingo)
> > 
> > Sorry I should have said earlier, but I think the term "wt" is
> > misleading.  Non-temporal stores used in memcpy_wt() provide WC
> > semantics, not WT semantics.
> 
> The non-temporal stores do, but memcpy_wt() is using a combination of
> non-temporal stores and explicit cache flushing.
> 
> > How about using "nocache" as it's been
> > used in __copy_user_nocache()?
> 
> The difference in my mind is that the "_nocache" suffix indicates
> opportunistic / optional cache pollution avoidance whereas "_wt"
> strictly arranges for caches not to contain dirty data upon
> completion of the routine. For example, non-temporal stores on older
> x86 cpus could potentially leave dirty data in the cache, so
> memcpy_wt on those cpus would need to use explicit cache flushing.

I see.  I agree that its behavior is different from the existing one
with "_nocache".   That said, I think "wt" or "write-through" generally
means that writes allocate cachelines and keep them clean by writing to
memory.  So, subsequent reads to the destination will hit the
cachelines.  This is not the case with this interface.

Thanks,
-Toshi
 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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