public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] config/mips: support zswap function
@ 2024-01-26  7:55 mengfanhui
  2024-03-20  2:00 ` mengfanhui
  2024-03-20  6:00 ` Yosry Ahmed
  0 siblings, 2 replies; 7+ messages in thread
From: mengfanhui @ 2024-01-26  7:55 UTC (permalink / raw)
  To: tsbogend, geert+renesas, mengfanhui; +Cc: linux-mips, linux-kernel

Solution /sys/module/zswap/parameters/enabled attribute node
does not exist issue,handle zpool zbud initialization failed,
open CONFIG_ZSWAP CONFIG_ZPOOL CONFIG_ZBUD configuration,manual
zswap function by /sys/module/zswap/parameters/enabled file

Signed-off-by: mengfanhui <mengfanhui@kylinos.cn>
---
 arch/mips/configs/generic_defconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/mips/configs/generic_defconfig b/arch/mips/configs/generic_defconfig
index 071e2205c7ed..14884df392f4 100644
--- a/arch/mips/configs/generic_defconfig
+++ b/arch/mips/configs/generic_defconfig
@@ -13,6 +13,9 @@ CONFIG_CGROUP_DEVICE=y
 CONFIG_CGROUP_CPUACCT=y
 CONFIG_NAMESPACES=y
 CONFIG_USER_NS=y
+CONFIG_ZSWAP=y
+CONFIG_ZPOOL=y
+CONFIG_ZBUD=y
 CONFIG_SCHED_AUTOGROUP=y
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_BPF_SYSCALL=y
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] config/mips: support zswap function
  2024-01-26  7:55 [PATCH] config/mips: support zswap function mengfanhui
@ 2024-03-20  2:00 ` mengfanhui
  2024-03-24  9:37   ` Thomas Bogendoerfer
  2024-03-20  6:00 ` Yosry Ahmed
  1 sibling, 1 reply; 7+ messages in thread
From: mengfanhui @ 2024-03-20  2:00 UTC (permalink / raw)
  To: tsbogend, geert+renesas; +Cc: linux-mips, linux-kernel

Who will be responsible for reviewing this? This is a necessary feature of the kernel that many testing agencies need to test

在 2024/1/26 15:55, mengfanhui 写道:
> Solution /sys/module/zswap/parameters/enabled attribute node
> does not exist issue,handle zpool zbud initialization failed,
> open CONFIG_ZSWAP CONFIG_ZPOOL CONFIG_ZBUD configuration,manual
> zswap function by /sys/module/zswap/parameters/enabled file
> 
> Signed-off-by: mengfanhui <mengfanhui@kylinos.cn>
> ---
>  arch/mips/configs/generic_defconfig | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/mips/configs/generic_defconfig b/arch/mips/configs/generic_defconfig
> index 071e2205c7ed..14884df392f4 100644
> --- a/arch/mips/configs/generic_defconfig
> +++ b/arch/mips/configs/generic_defconfig
> @@ -13,6 +13,9 @@ CONFIG_CGROUP_DEVICE=y
>  CONFIG_CGROUP_CPUACCT=y
>  CONFIG_NAMESPACES=y
>  CONFIG_USER_NS=y
> +CONFIG_ZSWAP=y
> +CONFIG_ZPOOL=y
> +CONFIG_ZBUD=y
>  CONFIG_SCHED_AUTOGROUP=y
>  CONFIG_BLK_DEV_INITRD=y
>  CONFIG_BPF_SYSCALL=y

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] config/mips: support zswap function
  2024-01-26  7:55 [PATCH] config/mips: support zswap function mengfanhui
  2024-03-20  2:00 ` mengfanhui
@ 2024-03-20  6:00 ` Yosry Ahmed
  2024-03-20  6:44   ` mengfanhui
  2024-03-20  6:59   ` mengfanhui
  1 sibling, 2 replies; 7+ messages in thread
From: Yosry Ahmed @ 2024-03-20  6:00 UTC (permalink / raw)
  To: mengfanhui
  Cc: tsbogend, geert+renesas, linux-mips, linux-kernel, linux-mm,
	hannes, nphamcs, chengming.zhou

On Fri, Jan 26, 2024 at 03:55:47PM +0800, mengfanhui wrote:
> Solution /sys/module/zswap/parameters/enabled attribute node
> does not exist issue,handle zpool zbud initialization failed,
> open CONFIG_ZSWAP CONFIG_ZPOOL CONFIG_ZBUD configuration,manual
> zswap function by /sys/module/zswap/parameters/enabled file
> 
> Signed-off-by: mengfanhui <mengfanhui@kylinos.cn>
> ---
>  arch/mips/configs/generic_defconfig | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/mips/configs/generic_defconfig b/arch/mips/configs/generic_defconfig
> index 071e2205c7ed..14884df392f4 100644
> --- a/arch/mips/configs/generic_defconfig
> +++ b/arch/mips/configs/generic_defconfig
> @@ -13,6 +13,9 @@ CONFIG_CGROUP_DEVICE=y
>  CONFIG_CGROUP_CPUACCT=y
>  CONFIG_NAMESPACES=y
>  CONFIG_USER_NS=y
> +CONFIG_ZSWAP=y
> +CONFIG_ZPOOL=y
> +CONFIG_ZBUD=y

Any reason for choosing zbud over zsmalloc, the default zswap allocator?

>  CONFIG_SCHED_AUTOGROUP=y
>  CONFIG_BLK_DEV_INITRD=y
>  CONFIG_BPF_SYSCALL=y
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] config/mips: support zswap function
  2024-03-20  6:00 ` Yosry Ahmed
@ 2024-03-20  6:44   ` mengfanhui
  2024-03-20  7:28     ` Yosry Ahmed
  2024-03-20  6:59   ` mengfanhui
  1 sibling, 1 reply; 7+ messages in thread
From: mengfanhui @ 2024-03-20  6:44 UTC (permalink / raw)
  To: Yosry Ahmed
  Cc: tsbogend, geert+renesas, linux-mips, linux-kernel, linux-mm,
	hannes, nphamcs, chengming.zhou

Zswap and zsmalloc are compression methods, and kernel configuration can be configured simultaneously.
zbud is an algorithm, and users can use that method if they want to use it.It won't affect each other.

在 2024/3/20 14:00, Yosry Ahmed 写道:
> On Fri, Jan 26, 2024 at 03:55:47PM +0800, mengfanhui wrote:
>> Solution /sys/module/zswap/parameters/enabled attribute node
>> does not exist issue,handle zpool zbud initialization failed,
>> open CONFIG_ZSWAP CONFIG_ZPOOL CONFIG_ZBUD configuration,manual
>> zswap function by /sys/module/zswap/parameters/enabled file
>>
>> Signed-off-by: mengfanhui <mengfanhui@kylinos.cn>
>> ---
>>  arch/mips/configs/generic_defconfig | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/arch/mips/configs/generic_defconfig b/arch/mips/configs/generic_defconfig
>> index 071e2205c7ed..14884df392f4 100644
>> --- a/arch/mips/configs/generic_defconfig
>> +++ b/arch/mips/configs/generic_defconfig
>> @@ -13,6 +13,9 @@ CONFIG_CGROUP_DEVICE=y
>>  CONFIG_CGROUP_CPUACCT=y
>>  CONFIG_NAMESPACES=y
>>  CONFIG_USER_NS=y
>> +CONFIG_ZSWAP=y
>> +CONFIG_ZPOOL=y
>> +CONFIG_ZBUD=y
> 
> Any reason for choosing zbud over zsmalloc, the default zswap allocator?
> 
>>  CONFIG_SCHED_AUTOGROUP=y
>>  CONFIG_BLK_DEV_INITRD=y
>>  CONFIG_BPF_SYSCALL=y
>> -- 
>> 2.25.1
>>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] config/mips: support zswap function
  2024-03-20  6:00 ` Yosry Ahmed
  2024-03-20  6:44   ` mengfanhui
@ 2024-03-20  6:59   ` mengfanhui
  1 sibling, 0 replies; 7+ messages in thread
From: mengfanhui @ 2024-03-20  6:59 UTC (permalink / raw)
  To: Yosry Ahmed, linux-mips
  Cc: tsbogend, geert+renesas, linux-mips, linux-kernel, linux-mm,
	hannes, nphamcs, chengming.zhou



在 2024/3/20 14:00, Yosry Ahmed 写道:
> On Fri, Jan 26, 2024 at 03:55:47PM +0800, mengfanhui wrote:
>> Solution /sys/module/zswap/parameters/enabled attribute node
>> does not exist issue,handle zpool zbud initialization failed,
>> open CONFIG_ZSWAP CONFIG_ZPOOL CONFIG_ZBUD configuration,manual
>> zswap function by /sys/module/zswap/parameters/enabled file
>>
>> Signed-off-by: mengfanhui <mengfanhui@kylinos.cn>
>> ---
>>  arch/mips/configs/generic_defconfig | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/arch/mips/configs/generic_defconfig b/arch/mips/configs/generic_defconfig
>> index 071e2205c7ed..14884df392f4 100644
>> --- a/arch/mips/configs/generic_defconfig
>> +++ b/arch/mips/configs/generic_defconfig
>> @@ -13,6 +13,9 @@ CONFIG_CGROUP_DEVICE=y
>>  CONFIG_CGROUP_CPUACCT=y
>>  CONFIG_NAMESPACES=y
>>  CONFIG_USER_NS=y
>> +CONFIG_ZSWAP=y
>> +CONFIG_ZPOOL=y
>> +CONFIG_ZBUD=y
> 
> Any reason for choosing zbud over zsmalloc, the default zswap allocator?
> 
>>  CONFIG_SCHED_AUTOGROUP=y
>>  CONFIG_BLK_DEV_INITRD=y
>>  CONFIG_BPF_SYSCALL=y
>> -- 
>> 2.25.1
>>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] config/mips: support zswap function
  2024-03-20  6:44   ` mengfanhui
@ 2024-03-20  7:28     ` Yosry Ahmed
  0 siblings, 0 replies; 7+ messages in thread
From: Yosry Ahmed @ 2024-03-20  7:28 UTC (permalink / raw)
  To: mengfanhui
  Cc: tsbogend, geert+renesas, linux-mips, linux-kernel, linux-mm,
	hannes, nphamcs, chengming.zhou

On Wed, Mar 20, 2024 at 02:44:21PM +0800, mengfanhui wrote:
> Zswap and zsmalloc are compression methods, and kernel configuration can be configured simultaneously.
> zbud is an algorithm, and users can use that method if they want to use it.It won't affect each other.

Zswap compressed swapped out pages in-memory. To store those compressed
pages, it uses one of three allocators that implement the zpool API:
zbud, z3fold, and zsmalloc. In that sense, zsmalloc is comparable to
zbud, not zswap. I suspect you are mixing up zsmalloc and zram.

Anyway, zsmalloc is the default allocator and should be better for
almost all use cases. So unless you have a very good reason to use zbud
over zsmalloc, please do not use zbud. We are trying to deprecate zbud
and z3fold.

> 
> 在 2024/3/20 14:00, Yosry Ahmed 写道:
> > On Fri, Jan 26, 2024 at 03:55:47PM +0800, mengfanhui wrote:
> >> Solution /sys/module/zswap/parameters/enabled attribute node
> >> does not exist issue,handle zpool zbud initialization failed,
> >> open CONFIG_ZSWAP CONFIG_ZPOOL CONFIG_ZBUD configuration,manual
> >> zswap function by /sys/module/zswap/parameters/enabled file
> >>
> >> Signed-off-by: mengfanhui <mengfanhui@kylinos.cn>
> >> ---
> >>  arch/mips/configs/generic_defconfig | 3 +++
> >>  1 file changed, 3 insertions(+)
> >>
> >> diff --git a/arch/mips/configs/generic_defconfig b/arch/mips/configs/generic_defconfig
> >> index 071e2205c7ed..14884df392f4 100644
> >> --- a/arch/mips/configs/generic_defconfig
> >> +++ b/arch/mips/configs/generic_defconfig
> >> @@ -13,6 +13,9 @@ CONFIG_CGROUP_DEVICE=y
> >>  CONFIG_CGROUP_CPUACCT=y
> >>  CONFIG_NAMESPACES=y
> >>  CONFIG_USER_NS=y
> >> +CONFIG_ZSWAP=y
> >> +CONFIG_ZPOOL=y
> >> +CONFIG_ZBUD=y
> > 
> > Any reason for choosing zbud over zsmalloc, the default zswap allocator?
> > 
> >>  CONFIG_SCHED_AUTOGROUP=y
> >>  CONFIG_BLK_DEV_INITRD=y
> >>  CONFIG_BPF_SYSCALL=y
> >> -- 
> >> 2.25.1
> >>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] config/mips: support zswap function
  2024-03-20  2:00 ` mengfanhui
@ 2024-03-24  9:37   ` Thomas Bogendoerfer
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Bogendoerfer @ 2024-03-24  9:37 UTC (permalink / raw)
  To: mengfanhui; +Cc: geert+renesas, linux-mips, linux-kernel

On Wed, Mar 20, 2024 at 10:00:49AM +0800, mengfanhui wrote:
> Who will be responsible for reviewing this? This is a necessary feature of the kernel that many testing agencies need to test

so they should add it to their kernel config. I don't see why a default config
should collect every bell and whistle somebody out in the world needs.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-03-24 10:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-26  7:55 [PATCH] config/mips: support zswap function mengfanhui
2024-03-20  2:00 ` mengfanhui
2024-03-24  9:37   ` Thomas Bogendoerfer
2024-03-20  6:00 ` Yosry Ahmed
2024-03-20  6:44   ` mengfanhui
2024-03-20  7:28     ` Yosry Ahmed
2024-03-20  6:59   ` mengfanhui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox