linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: Kconfig: fixup zsmalloc configuration
@ 2024-09-03  4:00 Sergey Senozhatsky
  2024-09-03  4:43 ` Sergey Senozhatsky
  2024-09-03 17:55 ` Johannes Weiner
  0 siblings, 2 replies; 5+ messages in thread
From: Sergey Senozhatsky @ 2024-09-03  4:00 UTC (permalink / raw)
  To: Andrew Morton, Johannes Weiner, Minchan Kim
  Cc: linux-mm, linux-kernel, Sergey Senozhatsky

zsmalloc is not exclusive to zswap. Commit aa3ba6d72ce0
("mm: Kconfig: fixup zsmalloc configuration") made CONFIG_ZSMALLOC
only visible when CONFIG_ZSWAP is selected, which makes it
impossible to menuconfig zsmalloc-specific features (stats,
chain-size, etc.) on systems that use ZRAM but don't have ZSWAP
enabled.

Make zsmalloc depend on both ZRAM and ZSWAP.

Fixes: Fixes: aa3ba6d72ce0 ("mm: Kconfig: fixup zsmalloc configuration")
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
---
 mm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/Kconfig b/mm/Kconfig
index b23913d4e47e..1aa282e35dc7 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -188,7 +188,7 @@ config Z3FOLD
 
 config ZSMALLOC
 	tristate
-	prompt "N:1 compression allocator (zsmalloc)" if ZSWAP
+	prompt "N:1 compression allocator (zsmalloc)" if (ZSWAP || ZRAM)
 	depends on MMU
 	help
 	  zsmalloc is a slab-based memory allocator designed to store
-- 
2.46.0.469.g59c65b2a67-goog



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

* Re: [PATCH] mm: Kconfig: fixup zsmalloc configuration
  2024-09-03  4:00 [PATCH] mm: Kconfig: fixup zsmalloc configuration Sergey Senozhatsky
@ 2024-09-03  4:43 ` Sergey Senozhatsky
  2024-09-03 17:55 ` Johannes Weiner
  1 sibling, 0 replies; 5+ messages in thread
From: Sergey Senozhatsky @ 2024-09-03  4:43 UTC (permalink / raw)
  To: Sergey Senozhatsky
  Cc: Andrew Morton, Johannes Weiner, Minchan Kim, linux-mm,
	linux-kernel

On (24/09/03 13:00), Sergey Senozhatsky wrote:
> 
> Fixes: Fixes: aa3ba6d72ce0 ...
> 

Developers, developers


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

* Re: [PATCH] mm: Kconfig: fixup zsmalloc configuration
  2024-09-03  4:00 [PATCH] mm: Kconfig: fixup zsmalloc configuration Sergey Senozhatsky
  2024-09-03  4:43 ` Sergey Senozhatsky
@ 2024-09-03 17:55 ` Johannes Weiner
  2024-09-03 21:28   ` Andrew Morton
  1 sibling, 1 reply; 5+ messages in thread
From: Johannes Weiner @ 2024-09-03 17:55 UTC (permalink / raw)
  To: Sergey Senozhatsky; +Cc: Andrew Morton, Minchan Kim, linux-mm, linux-kernel

On Tue, Sep 03, 2024 at 01:00:22PM +0900, Sergey Senozhatsky wrote:
> zsmalloc is not exclusive to zswap. Commit aa3ba6d72ce0
> ("mm: Kconfig: fixup zsmalloc configuration") made CONFIG_ZSMALLOC
> only visible when CONFIG_ZSWAP is selected, which makes it
> impossible to menuconfig zsmalloc-specific features (stats,
> chain-size, etc.) on systems that use ZRAM but don't have ZSWAP
> enabled.
> 
> Make zsmalloc depend on both ZRAM and ZSWAP.
> 
> Fixes: Fixes: aa3ba6d72ce0 ("mm: Kconfig: fixup zsmalloc configuration")

I can't find this commit upstream.

It looks like this was actually broken by

commit b3fbd58fcbb10725a1314688e03b1af6827c42f9
Author: Johannes Weiner <hannes@cmpxchg.org>
Date:   Thu May 19 14:08:53 2022 -0700

    mm: Kconfig: simplify zswap configuration

instead?

The patch itself looks good to me.

> Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
> ---
>  mm/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/Kconfig b/mm/Kconfig
> index b23913d4e47e..1aa282e35dc7 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -188,7 +188,7 @@ config Z3FOLD
>  
>  config ZSMALLOC
>  	tristate
> -	prompt "N:1 compression allocator (zsmalloc)" if ZSWAP
> +	prompt "N:1 compression allocator (zsmalloc)" if (ZSWAP || ZRAM)
>  	depends on MMU
>  	help
>  	  zsmalloc is a slab-based memory allocator designed to store
> -- 
> 2.46.0.469.g59c65b2a67-goog
> 


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

* Re: [PATCH] mm: Kconfig: fixup zsmalloc configuration
  2024-09-03 17:55 ` Johannes Weiner
@ 2024-09-03 21:28   ` Andrew Morton
  2024-09-04  3:12     ` Sergey Senozhatsky
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2024-09-03 21:28 UTC (permalink / raw)
  To: Johannes Weiner; +Cc: Sergey Senozhatsky, Minchan Kim, linux-mm, linux-kernel

On Tue, 3 Sep 2024 13:55:28 -0400 Johannes Weiner <hannes@cmpxchg.org> wrote:

> On Tue, Sep 03, 2024 at 01:00:22PM +0900, Sergey Senozhatsky wrote:
> > zsmalloc is not exclusive to zswap. Commit aa3ba6d72ce0
> > ("mm: Kconfig: fixup zsmalloc configuration") made CONFIG_ZSMALLOC
> > only visible when CONFIG_ZSWAP is selected, which makes it
> > impossible to menuconfig zsmalloc-specific features (stats,
> > chain-size, etc.) on systems that use ZRAM but don't have ZSWAP
> > enabled.
> > 
> > Make zsmalloc depend on both ZRAM and ZSWAP.
> > 
> > Fixes: Fixes: aa3ba6d72ce0 ("mm: Kconfig: fixup zsmalloc configuration")
> 
> I can't find this commit upstream.
> 
> It looks like this was actually broken by
> 
> commit b3fbd58fcbb10725a1314688e03b1af6827c42f9
> Author: Johannes Weiner <hannes@cmpxchg.org>
> Date:   Thu May 19 14:08:53 2022 -0700
> 
>     mm: Kconfig: simplify zswap configuration
> 
> instead?

Agree, I edited that into the changelog.


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

* Re: [PATCH] mm: Kconfig: fixup zsmalloc configuration
  2024-09-03 21:28   ` Andrew Morton
@ 2024-09-04  3:12     ` Sergey Senozhatsky
  0 siblings, 0 replies; 5+ messages in thread
From: Sergey Senozhatsky @ 2024-09-04  3:12 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Johannes Weiner, Sergey Senozhatsky, Minchan Kim, linux-mm,
	linux-kernel

On (24/09/03 14:28), Andrew Morton wrote:
> On Tue, 3 Sep 2024 13:55:28 -0400 Johannes Weiner <hannes@cmpxchg.org> wrote:
> 
> > On Tue, Sep 03, 2024 at 01:00:22PM +0900, Sergey Senozhatsky wrote:
> > > zsmalloc is not exclusive to zswap. Commit aa3ba6d72ce0
> > > ("mm: Kconfig: fixup zsmalloc configuration") made CONFIG_ZSMALLOC
> > > only visible when CONFIG_ZSWAP is selected, which makes it
> > > impossible to menuconfig zsmalloc-specific features (stats,
> > > chain-size, etc.) on systems that use ZRAM but don't have ZSWAP
> > > enabled.
> > > 
> > > Make zsmalloc depend on both ZRAM and ZSWAP.
> > > 
> > > Fixes: Fixes: aa3ba6d72ce0 ("mm: Kconfig: fixup zsmalloc configuration")
> > 
> > I can't find this commit upstream.
> > 
> > It looks like this was actually broken by
> > 
> > commit b3fbd58fcbb10725a1314688e03b1af6827c42f9
> > Author: Johannes Weiner <hannes@cmpxchg.org>
> > Date:   Thu May 19 14:08:53 2022 -0700
> > 
> >     mm: Kconfig: simplify zswap configuration
> > 
> > instead?
> 
> Agree, I edited that into the changelog.

My bad, I didn't pay attention to what checkpatch suggested as an edit.
Thanks for spotting this Johannes and thanks for fixing this up Andrew!


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

end of thread, other threads:[~2024-09-04  3:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-03  4:00 [PATCH] mm: Kconfig: fixup zsmalloc configuration Sergey Senozhatsky
2024-09-03  4:43 ` Sergey Senozhatsky
2024-09-03 17:55 ` Johannes Weiner
2024-09-03 21:28   ` Andrew Morton
2024-09-04  3:12     ` Sergey Senozhatsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).