From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>, Rui Salvaterra <rsalvaterra@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
ngupta@vflare.org, sergey.senozhatsky.work@gmail.com,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] zram: break the strict dependency from lzo
Date: Thu, 29 Oct 2020 03:59:27 +0900 [thread overview]
Message-ID: <20201028185927.GB128655@google.com> (raw)
In-Reply-To: <20201028115921.848-1-rsalvaterra@gmail.com>
Cc-ing Andrew
message-id: 20201028115921.848-1-rsalvaterra@gmail.com
On (20/10/28 11:59), Rui Salvaterra wrote:
> There's nothing special about zram and lzo. It works just fine without it, so
> as long as at least one of the other supported compression algorithms is
> selected.
>
> Suggested-by: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
> Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Minchan, I'm fine with the change.
Two things from my side:
1) The commit message, probably, can be a bit more informative. Something
like this?
ZRAM always enables CRYPTO_LZO because lzo-rle is the hardcoded
fallback compression algorithm, which means that on systems where
ZRAM always use, for instance, CRYPTO_ZSTD lzo kernel module
becomes unneeded. This patch removes the hardcoded lzo-lre
dependency, instead ZRAM picks the first supported CRYPTO
compression algorithm, should it be ZSTD or LZ4, etc; and only
forcibly enables CRYPTO_LZO (previous behaviour) if none of the
alternative algorithms were selected.
2) The ZRAM_AUTOSEL_ALGO allows to deselect CRYPTO_LZO only if
CRYPTO_LZ4/CRYPTO_LZ4HC/CRYPTO_842/CRYPTO_ZSTD are compiled in (=y).
If any of the algorithms is selected as a module (=m) then CRYPTO_LZO
is selected as the default algorithm. Apparently depends on !(CONFIG_FOO)
means depends on !(CONFIG_FOO=y).
It appears that the below change fixes it, but it looks a bit ugly.
---
diff --git a/drivers/block/zram/Kconfig b/drivers/block/zram/Kconfig
index 141ce0ebad06..f2fd34de9200 100644
--- a/drivers/block/zram/Kconfig
+++ b/drivers/block/zram/Kconfig
@@ -15,7 +15,7 @@ config ZRAM
config ZRAM_AUTOSEL_ALGO
def_bool y
- depends on ZRAM && !(CRYPTO_LZ4 || CRYPTO_LZ4HC || CRYPTO_842 || CRYPTO_ZSTD)
+ depends on ZRAM && !(CRYPTO_LZ4=m || CRYPTO_LZ4HC=m || CRYPTO_842=m || CRYPTO_ZSTD=m || CRYPTO_LZ4=y || CRYPTO_LZ4HC=y || CRYPTO_842=y || CRYPTO_ZSTD=y)
select CRYPTO_LZO
config ZRAM_WRITEBACK
---
-ss
next prev parent reply other threads:[~2020-10-29 2:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-28 11:59 [PATCH v4] zram: break the strict dependency from lzo Rui Salvaterra
2020-10-28 18:59 ` Sergey Senozhatsky [this message]
2020-11-03 21:28 ` Minchan Kim
2020-11-04 14:12 ` Rui Salvaterra
2020-11-04 20:41 ` Minchan Kim
2020-11-14 0:49 ` Sergey Senozhatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201028185927.GB128655@google.com \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=rsalvaterra@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).