[V2] fs/fuse: disable optimization fuse and kio_pcs in debug kernel

Submitted by Pavel Butsykin on June 8, 2018, 10:01 a.m.

Details

Message ID 20180608100139.32126-1-pbutsykin@virtuozzo.com
State New
Series "fs/fuse: disable optimization fuse and kio_pcs in debug kernel"
Headers show

Commit Message

Pavel Butsykin June 8, 2018, 10:01 a.m.
Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
---
 configs/kernel-3.10.0-x86_64-debug.config |  2 ++
 fs/fuse/Kconfig                           |  6 ++++++
 fs/fuse/Makefile                          | 22 ++++++++++++++++++++++
 3 files changed, 30 insertions(+)

Patch hide | download patch | download mbox

diff --git a/configs/kernel-3.10.0-x86_64-debug.config b/configs/kernel-3.10.0-x86_64-debug.config
index b31047705216..6c9c28203443 100644
--- a/configs/kernel-3.10.0-x86_64-debug.config
+++ b/configs/kernel-3.10.0-x86_64-debug.config
@@ -6100,6 +6100,8 @@  CONFIG_FUSE_KIO_NOOP=m
 CONFIG_FUSE_KIO_NULLIO=m
 CONFIG_FUSE_KIO_PCS=m
 
+CONFIG_FUSE_KIO_DEBUG=y
+
 #
 # User resources
 #
diff --git a/fs/fuse/Kconfig b/fs/fuse/Kconfig
index 433a39957c9d..7b61c6fe2d8d 100644
--- a/fs/fuse/Kconfig
+++ b/fs/fuse/Kconfig
@@ -45,3 +45,9 @@  config FUSE_KIO_PCS
 	depends on FUSE_FS
 	help
 	  This FUSE extension allows to forward io requests directly to PCS
+
+config FUSE_KIO_DEBUG
+	bool "Disable optimization for fuse kdirect PCS"
+	depends on DEBUG_KERNEL && FUSE_FS
+	help
+ 	  Say Y if you want to disable optimization for fuse and fuse_kio_pcs modules.
diff --git a/fs/fuse/Makefile b/fs/fuse/Makefile
index cdefac9c4fbe..6d02013ed27a 100644
--- a/fs/fuse/Makefile
+++ b/fs/fuse/Makefile
@@ -2,6 +2,28 @@ 
 # Makefile for the FUSE filesystem.
 #
 
+ifdef CONFIG_FUSE_KIO_DEBUG
+CFLAGS_fuse.o := -O0
+CFLAGS_cuse.o := -O0
+CFLAGS_dev.o := -O0
+CFLAGS_dir.o := -O0
+CFLAGS_file.o := -O0
+CFLAGS_inode.o := -O0
+CFLAGS_control.o := -O0
+
+CFLAGS_kio_noop.o := -O0
+CFLAGS_kio_nullio.o := -O0
+CFLAGS_pcs_fuse_kdirect.o := -O0
+CFLAGS_pcs_sock_io.o := -O0
+CFLAGS_pcs_rpc.o := -O0
+CFLAGS_pcs_req.o := -O0
+CFLAGS_pcs_map.o := -O0
+CFLAGS_pcs_cluster.o := -O0
+CFLAGS_pcs_cluster_core.o := -O0
+CFLAGS_pcs_cs.o := -O0
+CFLAGS_fuse_io.o := -O0
+endif
+
 obj-$(CONFIG_FUSE_FS) += fuse.o
 obj-$(CONFIG_CUSE) += cuse.o
 

Comments

Kirill Tkhai June 8, 2018, 11:58 a.m.
Please, always write description why we need this. This is very useful during kernel rebase.

On 08.06.2018 13:01, Pavel Butsykin wrote:
> Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>

Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com>

> ---
>  configs/kernel-3.10.0-x86_64-debug.config |  2 ++
>  fs/fuse/Kconfig                           |  6 ++++++
>  fs/fuse/Makefile                          | 22 ++++++++++++++++++++++
>  3 files changed, 30 insertions(+)
> 
> diff --git a/configs/kernel-3.10.0-x86_64-debug.config b/configs/kernel-3.10.0-x86_64-debug.config
> index b31047705216..6c9c28203443 100644
> --- a/configs/kernel-3.10.0-x86_64-debug.config
> +++ b/configs/kernel-3.10.0-x86_64-debug.config
> @@ -6100,6 +6100,8 @@ CONFIG_FUSE_KIO_NOOP=m
>  CONFIG_FUSE_KIO_NULLIO=m
>  CONFIG_FUSE_KIO_PCS=m
>  
> +CONFIG_FUSE_KIO_DEBUG=y
> +
>  #
>  # User resources
>  #
> diff --git a/fs/fuse/Kconfig b/fs/fuse/Kconfig
> index 433a39957c9d..7b61c6fe2d8d 100644
> --- a/fs/fuse/Kconfig
> +++ b/fs/fuse/Kconfig
> @@ -45,3 +45,9 @@ config FUSE_KIO_PCS
>  	depends on FUSE_FS
>  	help
>  	  This FUSE extension allows to forward io requests directly to PCS
> +
> +config FUSE_KIO_DEBUG
> +	bool "Disable optimization for fuse kdirect PCS"
> +	depends on DEBUG_KERNEL && FUSE_FS
> +	help
> + 	  Say Y if you want to disable optimization for fuse and fuse_kio_pcs modules.
> diff --git a/fs/fuse/Makefile b/fs/fuse/Makefile
> index cdefac9c4fbe..6d02013ed27a 100644
> --- a/fs/fuse/Makefile
> +++ b/fs/fuse/Makefile
> @@ -2,6 +2,28 @@
>  # Makefile for the FUSE filesystem.
>  #
>  
> +ifdef CONFIG_FUSE_KIO_DEBUG
> +CFLAGS_fuse.o := -O0
> +CFLAGS_cuse.o := -O0
> +CFLAGS_dev.o := -O0
> +CFLAGS_dir.o := -O0
> +CFLAGS_file.o := -O0
> +CFLAGS_inode.o := -O0
> +CFLAGS_control.o := -O0
> +
> +CFLAGS_kio_noop.o := -O0
> +CFLAGS_kio_nullio.o := -O0
> +CFLAGS_pcs_fuse_kdirect.o := -O0
> +CFLAGS_pcs_sock_io.o := -O0
> +CFLAGS_pcs_rpc.o := -O0
> +CFLAGS_pcs_req.o := -O0
> +CFLAGS_pcs_map.o := -O0
> +CFLAGS_pcs_cluster.o := -O0
> +CFLAGS_pcs_cluster_core.o := -O0
> +CFLAGS_pcs_cs.o := -O0
> +CFLAGS_fuse_io.o := -O0
> +endif
> +
>  obj-$(CONFIG_FUSE_FS) += fuse.o
>  obj-$(CONFIG_CUSE) += cuse.o
>  
>
Pavel Butsykin June 8, 2018, 12:44 p.m.
On 08.06.2018 14:58, Kirill Tkhai wrote:
> Please, always write description why we need this. This is very useful during kernel rebase.
>

OK, I suggest the following commit message:

Disabling code optimization for fuse/fuse_kio_pcs will be useful at the
time of stabilization of these modules. After the stabilization of
fuse/fuse_kio_pcs, this patch can be reverted.


> On 08.06.2018 13:01, Pavel Butsykin wrote:
>> Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
> 
> Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com>
> 
>> ---
>>   configs/kernel-3.10.0-x86_64-debug.config |  2 ++
>>   fs/fuse/Kconfig                           |  6 ++++++
>>   fs/fuse/Makefile                          | 22 ++++++++++++++++++++++
>>   3 files changed, 30 insertions(+)
>>
>> diff --git a/configs/kernel-3.10.0-x86_64-debug.config b/configs/kernel-3.10.0-x86_64-debug.config
>> index b31047705216..6c9c28203443 100644
>> --- a/configs/kernel-3.10.0-x86_64-debug.config
>> +++ b/configs/kernel-3.10.0-x86_64-debug.config
>> @@ -6100,6 +6100,8 @@ CONFIG_FUSE_KIO_NOOP=m
>>   CONFIG_FUSE_KIO_NULLIO=m
>>   CONFIG_FUSE_KIO_PCS=m
>>   
>> +CONFIG_FUSE_KIO_DEBUG=y
>> +
>>   #
>>   # User resources
>>   #
>> diff --git a/fs/fuse/Kconfig b/fs/fuse/Kconfig
>> index 433a39957c9d..7b61c6fe2d8d 100644
>> --- a/fs/fuse/Kconfig
>> +++ b/fs/fuse/Kconfig
>> @@ -45,3 +45,9 @@ config FUSE_KIO_PCS
>>   	depends on FUSE_FS
>>   	help
>>   	  This FUSE extension allows to forward io requests directly to PCS
>> +
>> +config FUSE_KIO_DEBUG
>> +	bool "Disable optimization for fuse kdirect PCS"
>> +	depends on DEBUG_KERNEL && FUSE_FS
>> +	help
>> + 	  Say Y if you want to disable optimization for fuse and fuse_kio_pcs modules.
>> diff --git a/fs/fuse/Makefile b/fs/fuse/Makefile
>> index cdefac9c4fbe..6d02013ed27a 100644
>> --- a/fs/fuse/Makefile
>> +++ b/fs/fuse/Makefile
>> @@ -2,6 +2,28 @@
>>   # Makefile for the FUSE filesystem.
>>   #
>>   
>> +ifdef CONFIG_FUSE_KIO_DEBUG
>> +CFLAGS_fuse.o := -O0
>> +CFLAGS_cuse.o := -O0
>> +CFLAGS_dev.o := -O0
>> +CFLAGS_dir.o := -O0
>> +CFLAGS_file.o := -O0
>> +CFLAGS_inode.o := -O0
>> +CFLAGS_control.o := -O0
>> +
>> +CFLAGS_kio_noop.o := -O0
>> +CFLAGS_kio_nullio.o := -O0
>> +CFLAGS_pcs_fuse_kdirect.o := -O0
>> +CFLAGS_pcs_sock_io.o := -O0
>> +CFLAGS_pcs_rpc.o := -O0
>> +CFLAGS_pcs_req.o := -O0
>> +CFLAGS_pcs_map.o := -O0
>> +CFLAGS_pcs_cluster.o := -O0
>> +CFLAGS_pcs_cluster_core.o := -O0
>> +CFLAGS_pcs_cs.o := -O0
>> +CFLAGS_fuse_io.o := -O0
>> +endif
>> +
>>   obj-$(CONFIG_FUSE_FS) += fuse.o
>>   obj-$(CONFIG_CUSE) += cuse.o
>>   
>>