Re: [PATCH v4 4/7] x86, mm, pat: Add pgprot_writethrough() for WT
On Mon, Nov 3, 2014 at 7:34 PM, Elliott, Robert (Server Storage) wrote: > > >> -Original Message- >> From: Andy Lutomirski [mailto:l...@amacapital.net] >> Sent: Monday, November 03, 2014 5:01 PM >> To: Thomas Gleixner >> Cc: Kani, Toshimitsu; Elliott, Robert (Server Storage); h...@zytor.com; >> mi...@redhat.com; a...@linux-foundation.org; a...@arndb.de; linux- >> m...@kvack.org; linux-kernel@vger.kernel.org; jgr...@suse.com; >> stefan.ba...@canonical.com; h...@hmh.eng.br; yi...@plexistor.com; >> konrad.w...@oracle.com >> Subject: Re: [PATCH v4 4/7] x86, mm, pat: Add pgprot_writethrough() for >> WT >> >> On Mon, Nov 3, 2014 at 2:53 PM, Thomas Gleixner >> wrote: > ... >> On the other hand, I thought that _GPL was supposed to be more about >> whether the thing using it is inherently a derived work of the Linux >> kernel. Since WT is an Intel concept, not a Linux concept, then I >> think that this is a hard argument to make. > > IBM System/360 Model 85 (1968) had write-through (i.e., store-through) > caching. Intel might claim Write Combining, though. > Arguably WC is, and was, mostly a hack to enable full cacheline writes without an instruction to do it directly. x86 has such an instruction now, so WC is less necessary. In any event, my point wasn't that Intel should get any particular credit here; it's that this is really a straightforward interface to program a hardware feature that predates the interface. --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v4 4/7] x86, mm, pat: Add pgprot_writethrough() for WT
> -Original Message- > From: Andy Lutomirski [mailto:l...@amacapital.net] > Sent: Monday, November 03, 2014 5:01 PM > To: Thomas Gleixner > Cc: Kani, Toshimitsu; Elliott, Robert (Server Storage); h...@zytor.com; > mi...@redhat.com; a...@linux-foundation.org; a...@arndb.de; linux- > m...@kvack.org; linux-kernel@vger.kernel.org; jgr...@suse.com; > stefan.ba...@canonical.com; h...@hmh.eng.br; yi...@plexistor.com; > konrad.w...@oracle.com > Subject: Re: [PATCH v4 4/7] x86, mm, pat: Add pgprot_writethrough() for > WT > > On Mon, Nov 3, 2014 at 2:53 PM, Thomas Gleixner > wrote: ... > On the other hand, I thought that _GPL was supposed to be more about > whether the thing using it is inherently a derived work of the Linux > kernel. Since WT is an Intel concept, not a Linux concept, then I > think that this is a hard argument to make. IBM System/360 Model 85 (1968) had write-through (i.e., store-through) caching. Intel might claim Write Combining, though. N�r��yb�X��ǧv�^�){.n�+{zX����ܨ}���Ơz�&j:+v���zZ+��+zf���h���~i���z��w���?�&�)ߢf��^jǫy�m��@A�a��� 0��h���i
Re: [PATCH v4 4/7] x86, mm, pat: Add pgprot_writethrough() for WT
On Mon, 2014-11-03 at 23:53 +0100, Thomas Gleixner wrote: > On Mon, 3 Nov 2014, Toshi Kani wrote: > > On Mon, 2014-11-03 at 22:10 +, Elliott, Robert (Server Storage) > > wrote: > > : > > > > Subject: [PATCH v4 4/7] x86, mm, pat: Add pgprot_writethrough() for > > > > WT > > > > > > > > This patch adds pgprot_writethrough() for setting WT to a given > > > > pgprot_t. > > > > > > > > Signed-off-by: Toshi Kani > > > > Reviewed-by: Konrad Rzeszutek Wilk > > > ... > > > > diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c > > > > index a214f5a..a0264d3 100644 > > > > --- a/arch/x86/mm/pat.c > > > > +++ b/arch/x86/mm/pat.c > > > > @@ -896,6 +896,16 @@ pgprot_t pgprot_writecombine(pgprot_t prot) > > > > } > > > > EXPORT_SYMBOL_GPL(pgprot_writecombine); > > > > > > > > +pgprot_t pgprot_writethrough(pgprot_t prot) > > > > +{ > > > > + if (pat_enabled) > > > > + return __pgprot(pgprot_val(prot) | > > > > + cachemode2protval(_PAGE_CACHE_MODE_WT)); > > > > + else > > > > + return pgprot_noncached(prot); > > > > +} > > > > +EXPORT_SYMBOL_GPL(pgprot_writethrough); > > > ... > > > > > > Would you be willing to use EXPORT_SYMBOL for the new > > > pgprot_writethrough function to provide more flexibility > > > for modules to utilize the new feature? In x86/mm, 18 of 60 > > > current exports are GPL and 42 are not GPL. > > > > I simply used EXPORT_SYMBOL_GPL() since pgprot_writecombine() used > > it. :-) This interface is intended to be used along with > > remap_pfn_range() and ioremap_prot(), which are both exported with > > EXPORT_SYMBOL(). So, it seems reasonable to export it with > > EXPORT_SYMBOL() as well. I will make this change. > > NAK. > > This is new functionality and we really have no reason to give the GPL > circumventors access to it. Thanks for the background info about EXPORT_SYMBOL. I will keep it no change. -Toshi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v4 4/7] x86, mm, pat: Add pgprot_writethrough() for WT
On Mon, 3 Nov 2014, Andy Lutomirski wrote: > On Mon, Nov 3, 2014 at 2:53 PM, Thomas Gleixner wrote: > > On Mon, 3 Nov 2014, Toshi Kani wrote: > >> On Mon, 2014-11-03 at 22:10 +, Elliott, Robert (Server Storage) > >> wrote: > >> > > +EXPORT_SYMBOL_GPL(pgprot_writethrough); > >> > ... > >> > > >> > Would you be willing to use EXPORT_SYMBOL for the new > >> > pgprot_writethrough function to provide more flexibility > >> > for modules to utilize the new feature? In x86/mm, 18 of 60 > >> > current exports are GPL and 42 are not GPL. > >> > >> I simply used EXPORT_SYMBOL_GPL() since pgprot_writecombine() used > >> it. :-) This interface is intended to be used along with > >> remap_pfn_range() and ioremap_prot(), which are both exported with > >> EXPORT_SYMBOL(). So, it seems reasonable to export it with > >> EXPORT_SYMBOL() as well. I will make this change. > > > > NAK. > > > > This is new functionality and we really have no reason to give the GPL > > circumventors access to it. > > I have mixed feelings about this. > > On the one hand, I agree with your sentiment. > > On the other hand, I thought that _GPL was supposed to be more about > whether the thing using it is inherently a derived work of the Linux > kernel. Since WT is an Intel concept, not a Linux concept, then I > think that this is a hard argument to make. If your argument stands then almost nothing in Linux which is related to hardware can stand on its own as it is always dependent on the underlying hardware. But that's not true. The software support for that particular hardware feature is always Linux specific. The point about derived work, which Linus made, is that the GPL might not necessarily apply to something which was developed completely independent of Linux in the first place and then adopted via a wrapper layer. This applies pretty much to the odd binary graphics drivers which got retrofitted with a Linux interface by wrapping the existing binary blob. We have always accomodated with this by not changing the replacement interfaces for something with was EXPORT_SYMBOL to EXPORT_SYMBOL_GPL. Though we have forced binary blobs away from abusing stuff by removing such exports; google for the removal of the init_mm export. But that does not mean that we are obliged to expose new Linux infrastucture which supports existing Intel hardware properties to drivers which prefer to be closed for whatever reason. Quite the contrary. We want to expose these new features to the fair players. The HP driver can live with the less performant modes and if it wants to use WT, that's none of our problems at all. Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v4 4/7] x86, mm, pat: Add pgprot_writethrough() for WT
On Mon, Nov 3, 2014 at 2:53 PM, Thomas Gleixner wrote: > On Mon, 3 Nov 2014, Toshi Kani wrote: >> On Mon, 2014-11-03 at 22:10 +, Elliott, Robert (Server Storage) >> wrote: >> : >> > > Subject: [PATCH v4 4/7] x86, mm, pat: Add pgprot_writethrough() for >> > > WT >> > > >> > > This patch adds pgprot_writethrough() for setting WT to a given >> > > pgprot_t. >> > > >> > > Signed-off-by: Toshi Kani >> > > Reviewed-by: Konrad Rzeszutek Wilk >> > ... >> > > diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c >> > > index a214f5a..a0264d3 100644 >> > > --- a/arch/x86/mm/pat.c >> > > +++ b/arch/x86/mm/pat.c >> > > @@ -896,6 +896,16 @@ pgprot_t pgprot_writecombine(pgprot_t prot) >> > > } >> > > EXPORT_SYMBOL_GPL(pgprot_writecombine); >> > > >> > > +pgprot_t pgprot_writethrough(pgprot_t prot) >> > > +{ >> > > + if (pat_enabled) >> > > + return __pgprot(pgprot_val(prot) | >> > > + cachemode2protval(_PAGE_CACHE_MODE_WT)); >> > > + else >> > > + return pgprot_noncached(prot); >> > > +} >> > > +EXPORT_SYMBOL_GPL(pgprot_writethrough); >> > ... >> > >> > Would you be willing to use EXPORT_SYMBOL for the new >> > pgprot_writethrough function to provide more flexibility >> > for modules to utilize the new feature? In x86/mm, 18 of 60 >> > current exports are GPL and 42 are not GPL. >> >> I simply used EXPORT_SYMBOL_GPL() since pgprot_writecombine() used >> it. :-) This interface is intended to be used along with >> remap_pfn_range() and ioremap_prot(), which are both exported with >> EXPORT_SYMBOL(). So, it seems reasonable to export it with >> EXPORT_SYMBOL() as well. I will make this change. > > NAK. > > This is new functionality and we really have no reason to give the GPL > circumventors access to it. I have mixed feelings about this. On the one hand, I agree with your sentiment. On the other hand, I thought that _GPL was supposed to be more about whether the thing using it is inherently a derived work of the Linux kernel. Since WT is an Intel concept, not a Linux concept, then I think that this is a hard argument to make. Not that I mind encouraging HP to GPL everything. Although my experiences so far with HP servers have been so uniformly negative that I really just want to stay far away from anything storage-related by HP for several years, so I'm very unlikely to own an affected piece of hardware any time soon. (Sorry, HP.) --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v4 4/7] x86, mm, pat: Add pgprot_writethrough() for WT
On Mon, 3 Nov 2014, Toshi Kani wrote: > On Mon, 2014-11-03 at 22:10 +, Elliott, Robert (Server Storage) > wrote: > : > > > Subject: [PATCH v4 4/7] x86, mm, pat: Add pgprot_writethrough() for > > > WT > > > > > > This patch adds pgprot_writethrough() for setting WT to a given > > > pgprot_t. > > > > > > Signed-off-by: Toshi Kani > > > Reviewed-by: Konrad Rzeszutek Wilk > > ... > > > diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c > > > index a214f5a..a0264d3 100644 > > > --- a/arch/x86/mm/pat.c > > > +++ b/arch/x86/mm/pat.c > > > @@ -896,6 +896,16 @@ pgprot_t pgprot_writecombine(pgprot_t prot) > > > } > > > EXPORT_SYMBOL_GPL(pgprot_writecombine); > > > > > > +pgprot_t pgprot_writethrough(pgprot_t prot) > > > +{ > > > + if (pat_enabled) > > > + return __pgprot(pgprot_val(prot) | > > > + cachemode2protval(_PAGE_CACHE_MODE_WT)); > > > + else > > > + return pgprot_noncached(prot); > > > +} > > > +EXPORT_SYMBOL_GPL(pgprot_writethrough); > > ... > > > > Would you be willing to use EXPORT_SYMBOL for the new > > pgprot_writethrough function to provide more flexibility > > for modules to utilize the new feature? In x86/mm, 18 of 60 > > current exports are GPL and 42 are not GPL. > > I simply used EXPORT_SYMBOL_GPL() since pgprot_writecombine() used > it. :-) This interface is intended to be used along with > remap_pfn_range() and ioremap_prot(), which are both exported with > EXPORT_SYMBOL(). So, it seems reasonable to export it with > EXPORT_SYMBOL() as well. I will make this change. NAK. This is new functionality and we really have no reason to give the GPL circumventors access to it. Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v4 4/7] x86, mm, pat: Add pgprot_writethrough() for WT
On Mon, 2014-11-03 at 22:10 +, Elliott, Robert (Server Storage) wrote: : > > Subject: [PATCH v4 4/7] x86, mm, pat: Add pgprot_writethrough() for > > WT > > > > This patch adds pgprot_writethrough() for setting WT to a given > > pgprot_t. > > > > Signed-off-by: Toshi Kani > > Reviewed-by: Konrad Rzeszutek Wilk > ... > > diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c > > index a214f5a..a0264d3 100644 > > --- a/arch/x86/mm/pat.c > > +++ b/arch/x86/mm/pat.c > > @@ -896,6 +896,16 @@ pgprot_t pgprot_writecombine(pgprot_t prot) > > } > > EXPORT_SYMBOL_GPL(pgprot_writecombine); > > > > +pgprot_t pgprot_writethrough(pgprot_t prot) > > +{ > > + if (pat_enabled) > > + return __pgprot(pgprot_val(prot) | > > + cachemode2protval(_PAGE_CACHE_MODE_WT)); > > + else > > + return pgprot_noncached(prot); > > +} > > +EXPORT_SYMBOL_GPL(pgprot_writethrough); > ... > > Would you be willing to use EXPORT_SYMBOL for the new > pgprot_writethrough function to provide more flexibility > for modules to utilize the new feature? In x86/mm, 18 of 60 > current exports are GPL and 42 are not GPL. I simply used EXPORT_SYMBOL_GPL() since pgprot_writecombine() used it. :-) This interface is intended to be used along with remap_pfn_range() and ioremap_prot(), which are both exported with EXPORT_SYMBOL(). So, it seems reasonable to export it with EXPORT_SYMBOL() as well. I will make this change. Thanks, -Toshi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v4 4/7] x86, mm, pat: Add pgprot_writethrough() for WT
> -Original Message- > From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > ow...@vger.kernel.org] On Behalf Of Kani, Toshimitsu > Sent: Monday, 27 October, 2014 5:56 PM > To: h...@zytor.com; t...@linutronix.de; mi...@redhat.com; akpm@linux- > foundation.org; a...@arndb.de > Cc: linux...@kvack.org; linux-kernel@vger.kernel.org; > jgr...@suse.com; stefan.ba...@canonical.com; l...@amacapital.net; > h...@hmh.eng.br; yi...@plexistor.com; konrad.w...@oracle.com; Kani, > Toshimitsu > Subject: [PATCH v4 4/7] x86, mm, pat: Add pgprot_writethrough() for > WT > > This patch adds pgprot_writethrough() for setting WT to a given > pgprot_t. > > Signed-off-by: Toshi Kani > Reviewed-by: Konrad Rzeszutek Wilk ... > diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c > index a214f5a..a0264d3 100644 > --- a/arch/x86/mm/pat.c > +++ b/arch/x86/mm/pat.c > @@ -896,6 +896,16 @@ pgprot_t pgprot_writecombine(pgprot_t prot) > } > EXPORT_SYMBOL_GPL(pgprot_writecombine); > > +pgprot_t pgprot_writethrough(pgprot_t prot) > +{ > + if (pat_enabled) > + return __pgprot(pgprot_val(prot) | > + cachemode2protval(_PAGE_CACHE_MODE_WT)); > + else > + return pgprot_noncached(prot); > +} > +EXPORT_SYMBOL_GPL(pgprot_writethrough); ... Would you be willing to use EXPORT_SYMBOL for the new pgprot_writethrough function to provide more flexibility for modules to utilize the new feature? In x86/mm, 18 of 60 current exports are GPL and 42 are not GPL. --- Rob ElliottHP Server Storage -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/