[v6,01/24] x86/mm: Define CONFIG_SPF

Message ID 1515777968-867-2-git-send-email-ldufour@linux.vnet.ibm.com
State Not Applicable
Headers show
Series
  • Speculative page faults
Related show

Commit Message

Laurent Dufour Jan. 12, 2018, 5:25 p.m.
Introduce CONFIG_SPF which turns on the Speculative Page Fault handler when
building for 64bits with SMP.

Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
---
 arch/x86/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Thomas Gleixner Jan. 12, 2018, 6:57 p.m. | #1
On Fri, 12 Jan 2018, Laurent Dufour wrote:

> Introduce CONFIG_SPF which turns on the Speculative Page Fault handler when
> building for 64bits with SMP.
> 
> Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
> ---
>  arch/x86/Kconfig | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index a317d5594b6a..d74353b85aaf 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -2882,6 +2882,10 @@ config X86_DMA_REMAP
>  config HAVE_GENERIC_GUP
>  	def_bool y
>  
> +config SPF
> +	def_bool y
> +	depends on X86_64 && SMP

Can you please put that into a generic place as

    config SPF
    	   bool

and let the architectures select it.

Also SPF could be bit more elaborate and self explaining for the causual
reader. 3 letter acronyms are reserved for non existing agencies.

Thanks,

	tglx
Laurent Dufour Jan. 15, 2018, 5:37 p.m. | #2
Hi Thomas,

Thanks for reviewing this series.

On 12/01/2018 19:57, Thomas Gleixner wrote:
> On Fri, 12 Jan 2018, Laurent Dufour wrote:
> 
>> Introduce CONFIG_SPF which turns on the Speculative Page Fault handler when
>> building for 64bits with SMP.
>>
>> Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
>> ---
>>  arch/x86/Kconfig | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>> index a317d5594b6a..d74353b85aaf 100644
>> --- a/arch/x86/Kconfig
>> +++ b/arch/x86/Kconfig
>> @@ -2882,6 +2882,10 @@ config X86_DMA_REMAP
>>  config HAVE_GENERIC_GUP
>>  	def_bool y
>>  
>> +config SPF
>> +	def_bool y
>> +	depends on X86_64 && SMP
> 
> Can you please put that into a generic place as
> 
>     config SPF
>     	   bool
> 
> and let the architectures select it.

I'll change that to let the architectures (x86 and ppc64 currently)
selecting it, but the definition will remain in the arch/xxx/Kconfig file
since it depends on the architecture support in the page fault handler.

> Also SPF could be bit more elaborate and self explaining for the causual
> reader. 3 letter acronyms are reserved for non existing agencies.

That's true 3 letter acronyms are already reserved...
I'll change it to CONFIG_SPECULATIVE_PAGE_FAULT as suggested by Matthew Wilcox.

Thanks,
Laurent.
Thomas Gleixner Jan. 15, 2018, 5:49 p.m. | #3
On Mon, 15 Jan 2018, Laurent Dufour wrote:
> On 12/01/2018 19:57, Thomas Gleixner wrote:
> > On Fri, 12 Jan 2018, Laurent Dufour wrote:
> > 
> >> Introduce CONFIG_SPF which turns on the Speculative Page Fault handler when
> >> building for 64bits with SMP.
> >>
> >> Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
> >> ---
> >>  arch/x86/Kconfig | 4 ++++
> >>  1 file changed, 4 insertions(+)
> >>
> >> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> >> index a317d5594b6a..d74353b85aaf 100644
> >> --- a/arch/x86/Kconfig
> >> +++ b/arch/x86/Kconfig
> >> @@ -2882,6 +2882,10 @@ config X86_DMA_REMAP
> >>  config HAVE_GENERIC_GUP
> >>  	def_bool y
> >>  
> >> +config SPF
> >> +	def_bool y
> >> +	depends on X86_64 && SMP
> > 
> > Can you please put that into a generic place as
> > 
> >     config SPF
> >     	   bool
> > 
> > and let the architectures select it.
> 
> I'll change that to let the architectures (x86 and ppc64 currently)
> selecting it, but the definition will remain in the arch/xxx/Kconfig file
> since it depends on the architecture support in the page fault handler.

Errm. No.

	config SPECULATIVE_PAGE_FAULT
      		bool

goes into a generic config file, e.g. mm/Kconfig

Each architecture which implements support does:

	select SPECULATIVE_PAGE_FAULT

in arch/xxx/Kconfig

Thanks,

	tglx
Laurent Dufour Jan. 15, 2018, 6:37 p.m. | #4
On 15/01/2018 18:49, Thomas Gleixner wrote:
> On Mon, 15 Jan 2018, Laurent Dufour wrote:
>> On 12/01/2018 19:57, Thomas Gleixner wrote:
>>> On Fri, 12 Jan 2018, Laurent Dufour wrote:
>>>
>>>> Introduce CONFIG_SPF which turns on the Speculative Page Fault handler when
>>>> building for 64bits with SMP.
>>>>
>>>> Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
>>>> ---
>>>>  arch/x86/Kconfig | 4 ++++
>>>>  1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>>>> index a317d5594b6a..d74353b85aaf 100644
>>>> --- a/arch/x86/Kconfig
>>>> +++ b/arch/x86/Kconfig
>>>> @@ -2882,6 +2882,10 @@ config X86_DMA_REMAP
>>>>  config HAVE_GENERIC_GUP
>>>>  	def_bool y
>>>>  
>>>> +config SPF
>>>> +	def_bool y
>>>> +	depends on X86_64 && SMP
>>>
>>> Can you please put that into a generic place as
>>>
>>>     config SPF
>>>     	   bool
>>>
>>> and let the architectures select it.
>>
>> I'll change that to let the architectures (x86 and ppc64 currently)
>> selecting it, but the definition will remain in the arch/xxx/Kconfig file
>> since it depends on the architecture support in the page fault handler.
> 
> Errm. No.
> 
> 	config SPECULATIVE_PAGE_FAULT
>       		bool
> 
> goes into a generic config file, e.g. mm/Kconfig
> 
> Each architecture which implements support does:
> 
> 	select SPECULATIVE_PAGE_FAULT
> 
> in arch/xxx/Kconfig

Oh ok, I think I got it this time ;)

Will do this way, this will be smarter.

Thanks a lot,
Laurent.

Patch

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index a317d5594b6a..d74353b85aaf 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2882,6 +2882,10 @@  config X86_DMA_REMAP
 config HAVE_GENERIC_GUP
 	def_bool y
 
+config SPF
+	def_bool y
+	depends on X86_64 && SMP
+
 source "net/Kconfig"
 
 source "drivers/Kconfig"