From: "Kani, Toshimitsu" <toshi.kani@hpe.com>
To: "dan.j.williams@intel.com" <dan.j.williams@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"jmoyer@redhat.com" <jmoyer@redhat.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"hch@lst.de" <hch@lst.de>,
"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"x86@kernel.org" <x86@kernel.org>,
"mawilcox@microsoft.com" <mawilcox@microsoft.com>,
"hpa@zytor.com" <hpa@zytor.com>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"ross.zwisler@linux.intel.com" <ross.zwisler@linux.intel.com>,
"jack@suse.cz" <jack@suse.cz>
Subject: Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations
Date: Fri, 5 May 2017 22:44:40 +0000 [thread overview]
Message-ID: <1494024273.30303.71.camel@hpe.com> (raw)
In-Reply-To: <CAPcyv4igCk9EBXSCVr8W1B-oNwq8q5kr7AMTkwvnMAhdwMgjRA@mail.gmail.com>
T24gRnJpLCAyMDE3LTA1LTA1IGF0IDE1OjI1IC0wNzAwLCBEYW4gV2lsbGlhbXMgd3JvdGU6DQo+
IE9uIEZyaSwgTWF5IDUsIDIwMTcgYXQgMTozOSBQTSwgS2FuaSwgVG9zaGltaXRzdSA8dG9zaGku
a2FuaUBocGUuY29tPg0KPiB3cm90ZToNCiA6DQo+ID4gPiAtLS0NCj4gPiA+IENoYW5nZXMgc2lu
Y2UgdGhlIGluaXRpYWwgUkZDOg0KPiA+ID4gKiBzL3dyaXRldGhydS93dC8gc2luY2Ugd2UgYWxy
ZWFkeSBoYXZlIGlvcmVtYXBfd3QoKSwNCj4gPiA+IHNldF9tZW1vcnlfd3QoKSwgZXRjLi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GQgbmVlZCB0byB1c2UgZXhwbGljaXQgY2FjaGUgZmx1
c2hpbmcuDQoNCkkgc2VlLiAgSSBhZ3JlZSB0aGF0IGl0cyBiZWhhdmlvciBpcyBkaWZmZXJlbnQg
ZnJvbSB0aGUgZXhpc3Rpbmcgb25lDQp3aXRoICJfbm9jYWNoZSIuICAgVGhhdCBzYWlkLCBJIHRo
aW5rICJ3dCIgb3IgIndyaXRlLXRocm91Z2giIGdlbmVyYWxseQ0KbWVhbnMgdGhhdCB3cml0ZXMg
YWxsb2NhdGUgY2FjaGVsaW5lcyBhbmQga2VlcCB0aGVtIGNsZWFuIGJ5IHdyaXRpbmcgdG8NCm1l
bW9yeS4gIFNvLCBzdWJzZXF1ZW50IHJlYWRzIHRvIHRoZSBkZXN0aW5hdGlvbiB3aWxsIGhpdCB0
aGUNCmNhY2hlbGluZXMuICBUaGlzIGlzIG5vdCB0aGUgY2FzZSB3aXRoIHRoaXMgaW50ZXJmYWNl
Lg0KDQpUaGFua3MsDQotVG9zaGkNCiA=
WARNING: multiple messages have this Message-ID (diff)
From: "Kani, Toshimitsu" <toshi.kani@hpe.com>
To: "dan.j.williams@intel.com" <dan.j.williams@intel.com>
Cc: "jack@suse.cz" <jack@suse.cz>,
"mawilcox@microsoft.com" <mawilcox@microsoft.com>,
"x86@kernel.org" <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"hpa@zytor.com" <hpa@zytor.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"hch@lst.de" <hch@lst.de>
Subject: Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations
Date: Fri, 5 May 2017 22:44:40 +0000 [thread overview]
Message-ID: <1494024273.30303.71.camel@hpe.com> (raw)
In-Reply-To: <CAPcyv4igCk9EBXSCVr8W1B-oNwq8q5kr7AMTkwvnMAhdwMgjRA@mail.gmail.com>
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
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
WARNING: multiple messages have this Message-ID (diff)
From: "Kani, Toshimitsu" <toshi.kani@hpe.com>
To: "dan.j.williams@intel.com" <dan.j.williams@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"jmoyer@redhat.com" <jmoyer@redhat.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"hch@lst.de" <hch@lst.de>,
"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"x86@kernel.org" <x86@kernel.org>,
"mawilcox@microsoft.com" <mawilcox@microsoft.com>,
"hpa@zytor.com" <hpa@zytor.com>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"ross.zwisler@linux.intel.com" <ross.zwisler@linux.intel.com>,
"jack@suse.cz" <jack@suse.cz>
Subject: Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations
Date: Fri, 5 May 2017 22:44:40 +0000 [thread overview]
Message-ID: <1494024273.30303.71.camel@hpe.com> (raw)
In-Reply-To: <CAPcyv4igCk9EBXSCVr8W1B-oNwq8q5kr7AMTkwvnMAhdwMgjRA@mail.gmail.com>
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
WARNING: multiple messages have this Message-ID (diff)
From: "Kani, Toshimitsu" <toshi.kani@hpe.com>
To: "dan.j.williams@intel.com" <dan.j.williams@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"jmoyer@redhat.com" <jmoyer@redhat.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"hch@lst.de" <hch@lst.de>,
"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"x86@kernel.org" <x86@kernel.org>,
"mawilcox@microsoft.com" <mawilcox@microsoft.com>,
"hpa@zytor.com" <hpa@zytor.com>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"ross.zwisler@linux.intel.com" <ross.zwisler@linux.intel.com>,
"jack@suse.cz" <jack@suse.cz>
Subject: Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations
Date: Fri, 5 May 2017 22:44:40 +0000 [thread overview]
Message-ID: <1494024273.30303.71.camel@hpe.com> (raw)
In-Reply-To: <CAPcyv4igCk9EBXSCVr8W1B-oNwq8q5kr7AMTkwvnMAhdwMgjRA@mail.gmail.com>
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
next prev parent reply other threads:[~2017-05-05 22:44 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-25 1:22 [NAK] copy_from_iter_ops() Al Viro
2017-04-25 2:35 ` Dan Williams
2017-04-26 21:56 ` [RFC PATCH] x86, uaccess, pmem: introduce copy_from_iter_writethru for dax + pmem Dan Williams
2017-04-26 21:56 ` Dan Williams
2017-04-26 21:56 ` Dan Williams
2017-04-27 6:30 ` Ingo Molnar
2017-04-27 6:30 ` Ingo Molnar
2017-04-27 6:30 ` Ingo Molnar
2017-04-28 19:39 ` [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations Dan Williams
2017-04-28 19:39 ` Dan Williams
2017-04-28 19:39 ` Dan Williams
2017-05-05 6:54 ` Ingo Molnar
2017-05-05 6:54 ` Ingo Molnar
2017-05-05 6:54 ` Ingo Molnar
2017-05-05 14:12 ` Dan Williams
2017-05-05 14:12 ` Dan Williams
2017-05-05 14:12 ` Dan Williams
2017-05-05 20:39 ` Kani, Toshimitsu
2017-05-05 20:39 ` Kani, Toshimitsu
2017-05-05 20:39 ` Kani, Toshimitsu
2017-05-05 20:39 ` Kani, Toshimitsu
2017-05-05 22:25 ` Dan Williams
2017-05-05 22:25 ` Dan Williams
2017-05-05 22:25 ` Dan Williams
2017-05-05 22:44 ` Kani, Toshimitsu [this message]
2017-05-05 22:44 ` Kani, Toshimitsu
2017-05-05 22:44 ` Kani, Toshimitsu
2017-05-05 22:44 ` Kani, Toshimitsu
2017-05-06 2:15 ` Dan Williams
2017-05-06 2:15 ` Dan Williams
2017-05-06 2:15 ` Dan Williams
2017-05-06 3:17 ` Kani, Toshimitsu
2017-05-06 3:17 ` Kani, Toshimitsu
2017-05-06 3:17 ` Kani, Toshimitsu
2017-05-06 3:17 ` Kani, Toshimitsu
2017-05-06 9:46 ` Ingo Molnar
2017-05-06 9:46 ` Ingo Molnar
2017-05-06 9:46 ` Ingo Molnar
2017-05-06 13:57 ` Dan Williams
2017-05-06 13:57 ` Dan Williams
2017-05-06 13:57 ` Dan Williams
2017-05-07 8:57 ` Ingo Molnar
2017-05-07 8:57 ` Ingo Molnar
2017-05-07 8:57 ` Ingo Molnar
2017-05-08 3:01 ` Kani, Toshimitsu
2017-05-08 3:01 ` Kani, Toshimitsu
2017-05-08 3:01 ` Kani, Toshimitsu
2017-05-08 20:32 ` Ross Zwisler
2017-05-08 20:32 ` Ross Zwisler
2017-05-08 20:32 ` Ross Zwisler
2017-05-08 20:40 ` Dan Williams
2017-05-08 20:40 ` Dan Williams
2017-05-08 20:40 ` Dan Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1494024273.30303.71.camel@hpe.com \
--to=toshi.kani@hpe.com \
--cc=dan.j.williams@intel.com \
--cc=hch@lst.de \
--cc=hpa@zytor.com \
--cc=jack@suse.cz \
--cc=jmoyer@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=mawilcox@microsoft.com \
--cc=mingo@redhat.com \
--cc=ross.zwisler@linux.intel.com \
--cc=tglx@linutronix.de \
--cc=viro@zeniv.linux.org.uk \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.