* [PATCH] mm: z3fold: deprecated ZSWAP_ZPOOL_DEFAULT_Z3FOLD as well
@ 2024-09-09 20:26 Arnd Bergmann
2024-09-09 20:29 ` Yosry Ahmed
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2024-09-09 20:26 UTC (permalink / raw)
To: Andrew Morton, Yosry Ahmed, Johannes Weiner, Nhat Pham, Chris Down
Cc: Arnd Bergmann, David Hildenbrand, Mike Rapoport (Microsoft),
Peter Xu, Matthew Wilcox (Oracle),
Kees Cook, Vlastimil Babka, Chengming Zhou, Anshuman Khandual,
Vitaly Wool, linux-mm, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Randconfig builds that use ZSWAP_ZPOOL_DEFAULT_Z3FOLD
now cause a harmless warning:
WARNING: unmet direct dependencies detected for Z3FOLD
Depends on [n]: Z3FOLD_DEPRECATED [=n]
Selected by [y]:
- ZSWAP_ZPOOL_DEFAULT_Z3FOLD [=y] && ZSWAP [=y]
Avoid the warning by selecting Z3FOLD_DEPRECATED instead,
but rename this symbol to ZSWAP_ZPOOL_DEFAULT_Z3FOLD_DEPRECATED
in the process so it no longer automatically gets used with
old defconfigs while still allowing users to select it
manually.
Fixes: c68c1bed014d ("mm: z3fold: deprecate CONFIG_Z3FOLD")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
mm/Kconfig | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/mm/Kconfig b/mm/Kconfig
index 7c9930bf8a9d..09aebca1cae3 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -146,12 +146,15 @@ config ZSWAP_ZPOOL_DEFAULT_ZBUD
help
Use the zbud allocator as the default allocator.
-config ZSWAP_ZPOOL_DEFAULT_Z3FOLD
- bool "z3fold"
- select Z3FOLD
+config ZSWAP_ZPOOL_DEFAULT_Z3FOLD_DEPRECATED
+ bool "z3foldi (DEPRECATED)"
+ select Z3FOLD_DEPRECATED
help
Use the z3fold allocator as the default allocator.
+ Deprecated and scheduled for removal in a few cycles,
+ see CONFIG_Z3FOLD_DEPRECATED.
+
config ZSWAP_ZPOOL_DEFAULT_ZSMALLOC
bool "zsmalloc"
select ZSMALLOC
@@ -163,7 +166,7 @@ config ZSWAP_ZPOOL_DEFAULT
string
depends on ZSWAP
default "zbud" if ZSWAP_ZPOOL_DEFAULT_ZBUD
- default "z3fold" if ZSWAP_ZPOOL_DEFAULT_Z3FOLD
+ default "z3fold" if ZSWAP_ZPOOL_DEFAULT_Z3FOLD_DEPRECATED
default "zsmalloc" if ZSWAP_ZPOOL_DEFAULT_ZSMALLOC
default ""
--
2.39.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: z3fold: deprecated ZSWAP_ZPOOL_DEFAULT_Z3FOLD as well
2024-09-09 20:26 [PATCH] mm: z3fold: deprecated ZSWAP_ZPOOL_DEFAULT_Z3FOLD as well Arnd Bergmann
@ 2024-09-09 20:29 ` Yosry Ahmed
2024-09-09 20:42 ` Arnd Bergmann
0 siblings, 1 reply; 4+ messages in thread
From: Yosry Ahmed @ 2024-09-09 20:29 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Andrew Morton, Johannes Weiner, Nhat Pham, Chris Down,
Arnd Bergmann, David Hildenbrand, Mike Rapoport (Microsoft),
Peter Xu, Matthew Wilcox (Oracle),
Kees Cook, Vlastimil Babka, Chengming Zhou, Anshuman Khandual,
Vitaly Wool, linux-mm, linux-kernel
On Mon, Sep 9, 2024 at 1:26 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> Randconfig builds that use ZSWAP_ZPOOL_DEFAULT_Z3FOLD
> now cause a harmless warning:
>
> WARNING: unmet direct dependencies detected for Z3FOLD
> Depends on [n]: Z3FOLD_DEPRECATED [=n]
> Selected by [y]:
> - ZSWAP_ZPOOL_DEFAULT_Z3FOLD [=y] && ZSWAP [=y]
>
> Avoid the warning by selecting Z3FOLD_DEPRECATED instead,
> but rename this symbol to ZSWAP_ZPOOL_DEFAULT_Z3FOLD_DEPRECATED
> in the process so it no longer automatically gets used with
> old defconfigs while still allowing users to select it
> manually.
>
> Fixes: c68c1bed014d ("mm: z3fold: deprecate CONFIG_Z3FOLD")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> mm/Kconfig | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/mm/Kconfig b/mm/Kconfig
> index 7c9930bf8a9d..09aebca1cae3 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -146,12 +146,15 @@ config ZSWAP_ZPOOL_DEFAULT_ZBUD
> help
> Use the zbud allocator as the default allocator.
>
> -config ZSWAP_ZPOOL_DEFAULT_Z3FOLD
> - bool "z3fold"
> - select Z3FOLD
> +config ZSWAP_ZPOOL_DEFAULT_Z3FOLD_DEPRECATED
> + bool "z3foldi (DEPRECATED)"
> + select Z3FOLD_DEPRECATED
Thanks for looking into this!
I was going to fix this by changing "select Z3FOLD" to "depends on
Z3FOLD" instead. It makes the warning go away in my builds. Does this
work for you?
FYI I will send a new version of "mm: z3fold: deprecate CONFIG_Z3FOLD"
as a hotfix after v6.12-rc1 is out as there are currently conflicts,
so I plan to squash the fix into the next version if that's okay with
you.
> help
> Use the z3fold allocator as the default allocator.
>
> + Deprecated and scheduled for removal in a few cycles,
> + see CONFIG_Z3FOLD_DEPRECATED.
> +
> config ZSWAP_ZPOOL_DEFAULT_ZSMALLOC
> bool "zsmalloc"
> select ZSMALLOC
> @@ -163,7 +166,7 @@ config ZSWAP_ZPOOL_DEFAULT
> string
> depends on ZSWAP
> default "zbud" if ZSWAP_ZPOOL_DEFAULT_ZBUD
> - default "z3fold" if ZSWAP_ZPOOL_DEFAULT_Z3FOLD
> + default "z3fold" if ZSWAP_ZPOOL_DEFAULT_Z3FOLD_DEPRECATED
> default "zsmalloc" if ZSWAP_ZPOOL_DEFAULT_ZSMALLOC
> default ""
>
> --
> 2.39.2
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: z3fold: deprecated ZSWAP_ZPOOL_DEFAULT_Z3FOLD as well
2024-09-09 20:29 ` Yosry Ahmed
@ 2024-09-09 20:42 ` Arnd Bergmann
2024-09-09 20:44 ` Yosry Ahmed
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2024-09-09 20:42 UTC (permalink / raw)
To: Yosry Ahmed, Arnd Bergmann
Cc: Andrew Morton, Johannes Weiner, Nhat Pham, Chris Down,
David Hildenbrand, Mike Rapoport, peterx, Matthew Wilcox,
Kees Cook, Vlastimil Babka, Chengming Zhou, Anshuman Khandual,
Vitaly Wool, linux-mm, linux-kernel
On Mon, Sep 9, 2024, at 20:29, Yosry Ahmed wrote:
> On Mon, Sep 9, 2024 at 1:26 PM Arnd Bergmann <arnd@kernel.org> wrote:
>>
>> -config ZSWAP_ZPOOL_DEFAULT_Z3FOLD
>> - bool "z3fold"
>> - select Z3FOLD
>> +config ZSWAP_ZPOOL_DEFAULT_Z3FOLD_DEPRECATED
>> + bool "z3foldi (DEPRECATED)"
>> + select Z3FOLD_DEPRECATED
>
> Thanks for looking into this!
>
> I was going to fix this by changing "select Z3FOLD" to "depends on
> Z3FOLD" instead. It makes the warning go away in my builds. Does this
> work for you?
I had also thought about this but decided that this would
make less sense from a user perspective.
If it builds in all configs, I won't complain though.
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: z3fold: deprecated ZSWAP_ZPOOL_DEFAULT_Z3FOLD as well
2024-09-09 20:42 ` Arnd Bergmann
@ 2024-09-09 20:44 ` Yosry Ahmed
0 siblings, 0 replies; 4+ messages in thread
From: Yosry Ahmed @ 2024-09-09 20:44 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Arnd Bergmann, Andrew Morton, Johannes Weiner, Nhat Pham,
Chris Down, David Hildenbrand, Mike Rapoport, peterx,
Matthew Wilcox, Kees Cook, Vlastimil Babka, Chengming Zhou,
Anshuman Khandual, Vitaly Wool, linux-mm, linux-kernel
On Mon, Sep 9, 2024 at 1:43 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Mon, Sep 9, 2024, at 20:29, Yosry Ahmed wrote:
> > On Mon, Sep 9, 2024 at 1:26 PM Arnd Bergmann <arnd@kernel.org> wrote:
> >>
> >> -config ZSWAP_ZPOOL_DEFAULT_Z3FOLD
> >> - bool "z3fold"
> >> - select Z3FOLD
> >> +config ZSWAP_ZPOOL_DEFAULT_Z3FOLD_DEPRECATED
> >> + bool "z3foldi (DEPRECATED)"
> >> + select Z3FOLD_DEPRECATED
> >
> > Thanks for looking into this!
> >
> > I was going to fix this by changing "select Z3FOLD" to "depends on
> > Z3FOLD" instead. It makes the warning go away in my builds. Does this
> > work for you?
>
> I had also thought about this but decided that this would
> make less sense from a user perspective.
I doubt there are any actual users who care :)
>
> If it builds in all configs, I won't complain though.
I will use "depends on Z3FOLD" in v3 just because it's simpler. If
bots complain, I will fallback to your approach.
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-09-09 20:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-09 20:26 [PATCH] mm: z3fold: deprecated ZSWAP_ZPOOL_DEFAULT_Z3FOLD as well Arnd Bergmann
2024-09-09 20:29 ` Yosry Ahmed
2024-09-09 20:42 ` Arnd Bergmann
2024-09-09 20:44 ` Yosry Ahmed
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox