You are not logged in.

#1 2011-08-10 23:09:29

Rulatir
Banned
Registered: 2007-02-05
Posts: 94

[SOLVED][linux 3.1.2] still cannot enable zcache

I can't enable zcache. I added zcache to the kernel command line, but no zcache related entries appear in dmesg (except for the occurrence in the kernel command line), and there is no /sys/kernel/mm/zcache.

When I modprobe zcache, it says:

[  416.832886] zcache: module is from the staging directory, the quality is unknown, you have been warned.
[  416.832892] zcache: module license 'unspecified' taints kernel.

From what I read on other forums, I should also expect additional messages like these:

zcache: cleancache enabled using kernel transcendent memory and compression buddies 
zcache: created ephemeral tmem pool, id=0 
zcache: created ephemeral tmem pool, id=1

... but they do not appear, and of course there is still no /sys/kernel/mm/zcache.

Any ideas?

[SOLVED]

It turns out that zcache must be compiled into the kernel (CONFIG_ZCACHE=y), not as a module (CONFIG_ZCACHE=m). There are two bugs on this (original and my duplicate), and the resolution is wontfix because zcache is in staging and the kernel package maintainer understandably refuses to compile a staging driver into kernel.

I rebuilt the kernel for myself with CONFIG_ZCACHE=y and it works like charm.

Last edited by Rulatir (2011-12-03 22:49:38)

Offline

#2 2011-08-25 21:44:41

Rulatir
Banned
Registered: 2007-02-05
Posts: 94

Re: [SOLVED][linux 3.1.2] still cannot enable zcache

Bump...

Offline

#3 2011-08-25 22:05:22

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: [SOLVED][linux 3.1.2] still cannot enable zcache

wait for 3.1 this is a know bug.

Offline

#4 2011-08-25 22:13:18

slytux
Member
From: New York
Registered: 2010-09-25
Posts: 129

Re: [SOLVED][linux 3.1.2] still cannot enable zcache

Is zcache related to zram?

Offline

#5 2011-08-26 03:05:11

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: [SOLVED][linux 3.1.2] still cannot enable zcache

slytux wrote:

Is zcache related to zram?

Yes.

Offline

#6 2011-10-06 02:59:36

slytux
Member
From: New York
Registered: 2010-09-25
Posts: 129

Re: [SOLVED][linux 3.1.2] still cannot enable zcache

zramswap is in the AUR. Thanks to Matt for sharing his rc script.  (See comments in article)
http://www.webupd8.org/2011/10/increase … -with.html

Offline

#7 2011-11-28 01:03:56

Rulatir
Banned
Registered: 2007-02-05
Posts: 94

Re: [SOLVED][linux 3.1.2] still cannot enable zcache

BUMP! Kernel is now 3.1.2 and the symptom is still the same: no working cleancache/zcache. Djgera, as you said this was a known bug, could you share a link or a google line so I can get to "know" the bug too? Are there any patches around (not hosted at patchwork.kernel.org which is still dead)?

Offline

#8 2011-12-02 02:31:50

Rulatir
Banned
Registered: 2007-02-05
Posts: 94

Re: [SOLVED][linux 3.1.2] still cannot enable zcache

BUMP! As of linux-3.1.4-1, still no working zcache/cleancache, though there is a little improvement: the relevant sysfs interfaces are now present (/sys/kernel/mm/{z,clean}cache). Still no zcache pool creation messages in dmesg though, and predictably the sysfs interface shows that cleancache/zcache is not used (all counters stay at 0).

Does it work for anyone?

Filing a bug now.

Offline

#9 2011-12-02 03:07:22

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED][linux 3.1.2] still cannot enable zcache

Works for me. CONFIG_CLEANCACHE=y and CONFIG_ZIMAGE=y are in my config (not the stock ARCH kernel).

the kernel is happy

$ dmesg | grep -E '(clean|z)cache'
Command line: root=/dev/sda2 ro vga=773 loglevel=3 init=/bin/systemd panic=10 zcache initrd=/initramfs-linux-rampage.img break BOOT_IMAGE=/vmlinuz-linux-rampage 
Kernel command line: root=/dev/sda2 ro vga=773 loglevel=3 init=/bin/systemd panic=10 zcache initrd=/initramfs-linux-rampage.img break BOOT_IMAGE=/vmlinuz-linux-rampage
zcache: cleancache enabled using kernel transcendent memory and compression buddies
zcache: created ephemeral tmem pool, id=0, client=65535
zcache: created ephemeral tmem pool, id=1, client=65535
zcache: created ephemeral tmem pool, id=2, client=65535
zcache: created ephemeral tmem pool, id=3, client=65535
zcache: created ephemeral tmem pool, id=4, client=65535

and sysfs entries show goodness:

$ cd /sys/kernel/mm/cleancache
$ for f in *; do printf '%s: %s\n' "$f" "$(<"$f")"; done
failed_gets: 4388146
flushes: 5623666
puts: 3393314
succ_gets: 113607

$ cd /sys/kernel/mm/zcache
$ for f in *; do printf '%s: %s\n' "$f" "$(<"$f")"; done
aborted_preload 27878
aborted_shrink 449
compress_poor 2826948
curr_obj_count 21113
curr_obj_count_max 24982
curr_objnode_count 13667
curr_objnode_count_max 14825
evicted_buddied_pages 78282
evicted_raw_pages 123267
evicted_unbuddied_pages 90791
failed_alloc 0
failed_eph_puts 2826909
failed_get_free_pages 39528
failed_pers_puts 0
flobj_found 7805
flobj_total 1573504
flush_found 892
flush_total 5624185
mean_compress_poor 0
put_to_flush 67300
zbpg_unused_list_count 3713
zbud_buddied_count 46222
zbud_cumul_chunk_counts 0 28090 16705 6113 6271 7703 10094 9665 7614 6390 6085 5992 6251 6039 5790 5954 6476 6924 6689 7386 8348 7868 7219 7437 7517 8316 7507 8222 8780 8889 8963 8978 8841 9452 9872 10464 11114 11075 11048 10777 10342 9237 8001 8195 7856 8069 8419 8820 9202 9185 8812 8508 8230 7008 5326 4223 3814 4051 4591 5088 5080 6026 <=21:178447 <=32:269116 <=42:370498, mean:29
zbud_cumul_zbytes 915227462
zbud_cumul_zpages 501000
zbud_curr_raw_pages 55722
zbud_curr_zbytes 159468276
zbud_curr_zpages 98231
zbud_unbuddied_list_counts 0 93 165 38 59 63 86 84 72 62 72 55 67 62 78 74 58 76 54 60 80 87 68 58 67 76 64 61 56 58 41 36 52 43 49 48 62 61 61 76 49 50 73 42 37 44 62 38 54 58 38 44 63 87 142 188 319 274 218 312 663 350 
zv_cumul_dist_counts 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mean:0
zv_curr_dist_counts 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mean:0
zv_max_mean_zsize 2560
zv_max_zsize 3584
zv_page_count_policy_percent 75

I'd guess the behavior you're seeing is due to it being built as a module. You might try enabling it sooner (by adding it to your initramfs).

Last edited by falconindy (2011-12-02 03:13:02)

Offline

#10 2011-12-02 08:57:18

nbvcxz
Member
From: Poland
Registered: 2007-12-29
Posts: 202

Re: [SOLVED][linux 3.1.2] still cannot enable zcache

Rulatir wrote:

I can't enable zcache. I added zcache to the kernel command line, but no zcache related entries appear in dmesg (except for the occurrence in the kernel command line), and there is no /sys/kernel/mm/zcache.

I don't know why do you enable it from kernel command line. I just added it to modules=() array. The only information I get is:

[    1.853744] zcache: module is from the staging directory, the quality is unknown, you have been warned.

but /sys/kernel/mm/zcache and /sys/kernel/mm/cleancache exit and are working
So do I something wrong or there is no need to see all the logs?
There is something else: all files size in cleancache and zcache are 4096 but all of them seem to be 0 value
but when I make eg. cat sys/kernel/mm/cleancache/failed_gets I get 0. The same about all files in cleancache and zcache.

Adding to mkinitcpio modules and re-creating image makes no difference.

Last edited by nbvcxz (2011-12-02 09:07:58)


Lenovo G50 | LXQT-git | compton | conky

Offline

#11 2011-12-03 23:16:35

Rulatir
Banned
Registered: 2007-02-05
Posts: 94

Re: [SOLVED][linux 3.1.2] still cannot enable zcache

Merely adding the module to initramfs doesn't do the trick. It must be compiled into the kernel. See the update in the original post.

Offline

#12 2011-12-05 08:07:52

nbvcxz
Member
From: Poland
Registered: 2007-12-29
Posts: 202

Re: [SOLVED][linux 3.1.2] still cannot enable zcache

Do you think that kernel build-in will be always necessery, or it is just temporary bug that it cannot be used as a module?


Lenovo G50 | LXQT-git | compton | conky

Offline

#13 2011-12-06 05:41:58

Rulatir
Banned
Registered: 2007-02-05
Posts: 94

Re: [SOLVED][linux 3.1.2] still cannot enable zcache

nbvcxz wrote:

Do you think that kernel build-in will be always necessery, or it is just temporary bug that it cannot be used as a module?

I have no idea but I believe that zcache will eventually move out of staging, at which point we can ask tpowa again to include it.

Offline

Board footer

Powered by FluxBB