N2 kernel config missing LZ4 module for zram

Post Reply
iefbr14
Posts: 3
Joined: Thu Aug 29, 2019 2:08 am
languages_spoken: english
ODROIDs: xu4, n2
Has thanked: 2 times
Been thanked: 0
Contact:

N2 kernel config missing LZ4 module for zram

Unread post by iefbr14 » Thu Aug 29, 2019 2:43 am

Hello!

I recently purchased an N2 to replace a XU4 and found that the N2 kernel config is missing the LZ4 compression module which I'm using with zram.

The XU4 default config is as follows:

Code: Select all

#
# Compression
#
CONFIG_CRYPTO_DEFLATE=m
CONFIG_CRYPTO_LZO=m
CONFIG_CRYPTO_842=m
CONFIG_CRYPTO_LZ4=m
CONFIG_CRYPTO_LZ4HC=m
The N2 default is:

Code: Select all

#
# Compression
#
CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_LZO=y
# CONFIG_CRYPTO_842 is not set
# CONFIG_CRYPTO_LZ4 is not set
# CONFIG_CRYPTO_LZ4HC is not set
I've compiled my own kernel for the N2 with the appropriate config and everything is working fine for me after having done so... It might be handy to include these modules in the future. Not sure if it would help anybody else, but it would save me from rolling my own. :D

Very happy with the N2 thus far... runs soooo much cooler (and faster) than the old XU4.

Thank you.

User avatar
odroid
Site Admin
Posts: 32166
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 122 times
Been thanked: 297 times
Contact:

Re: N2 kernel config missing LZ4 module for zram

Unread post by odroid » Thu Aug 29, 2019 10:33 am

We already tested the ZRAM functionality by installing zram-config a couple of weeks ago.

Code: Select all

root@odroid:~# uname -a
Linux odroid 4.9.187-52 #1 SMP PREEMPT Tue Aug 6 01:05:58 -03 2019 aarch64 aarch64 aarch64 GNU/Linux

root@odroid:~# free -m
              total        used        free      shared  buff/cache   available
Mem:           3712         154        3435           3         122        3521
Swap:          1856           0        1856

root@odroid:~# cat /proc/swaps 
Filename                                Type            Size    Used    Priority
/dev/zram0                              partition       316772  0       5
/dev/zram1                              partition       316772  0       5
/dev/zram2                              partition       316772  0       5
/dev/zram3                              partition       316772  0       5
/dev/zram4                              partition       316772  0       5
/dev/zram5                              partition       316772  0       5
Which Kernel version do you use?

iefbr14
Posts: 3
Joined: Thu Aug 29, 2019 2:08 am
languages_spoken: english
ODROIDs: xu4, n2
Has thanked: 2 times
Been thanked: 0
Contact:

Re: N2 kernel config missing LZ4 module for zram

Unread post by iefbr14 » Thu Aug 29, 2019 11:46 am

Hello! Thanks for the reply. :)

I'm running kernel 4.9.187-53 from the Ubuntu-minimal image. I'm not as familiar with Ubuntu so I was unaware that the zram-config package even existed -- its not included in the minimal image by default. I was doing the zram config manually... but now I've installed zram-config instead.

Anyway, zram is working (using both my manual config and the zram-config package!) but its using LZO compression...

Code: Select all

root@odroid:~# zramctl
NAME       ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram5 lzo         309.4M   4K   76B   12K       6 [SWAP]
/dev/zram4 lzo         309.4M   4K   76B   12K       6 [SWAP]
/dev/zram3 lzo         309.4M   4K   76B   12K       6 [SWAP]
/dev/zram2 lzo         309.4M   4K   76B   12K       6 [SWAP]
/dev/zram1 lzo         309.4M   4K   76B   12K       6 [SWAP]
/dev/zram0 lzo         309.4M   4K   76B   12K       6 [SWAP]
I wanted to use LZ4 compression instead of LZO as its likely to be faster decompressing at the expense of slightly worse compression. The issue is the default N2 kernel config only includes DEFLATE and LZO. Its missing LZ4 (and a couple others.) I guess its not critical to use LZ4 instead of LZO, but still might be worthwhile to include all the options as modules -- similar to the default config options for the XU4 4.14.x kernel.

Thanks!

User avatar
odroid
Site Admin
Posts: 32166
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 122 times
Been thanked: 297 times
Contact:

Re: N2 kernel config missing LZ4 module for zram

Unread post by odroid » Thu Aug 29, 2019 2:03 pm

I see.
We will check it.
These users thanked the author odroid for the post:
iefbr14 (Fri Aug 30, 2019 6:44 am)

iefbr14
Posts: 3
Joined: Thu Aug 29, 2019 2:08 am
languages_spoken: english
ODROIDs: xu4, n2
Has thanked: 2 times
Been thanked: 0
Contact:

Re: N2 kernel config missing LZ4 module for zram

Unread post by iefbr14 » Fri Aug 30, 2019 6:47 am

Not high priority (obviously) but I appreciate your efforts in supporting the Odroid community. I'm a big Hardkernel fan! :)

User avatar
odroid
Site Admin
Posts: 32166
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 122 times
Been thanked: 297 times
Contact:

Re: N2 kernel config missing LZ4 module for zram

Unread post by odroid » Wed Sep 04, 2019 8:16 am

Kernel 4.9.190 update has included it.
https://github.com/hardkernel/linux/com ... 04f502de2b
These users thanked the author odroid for the post (total 2):
iefbr14 (Thu Sep 05, 2019 12:17 pm) • xabolcs (Wed Sep 18, 2019 2:02 am)

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: blu and 1 guest