mfrw / compcache

Automatically exported from code.google.com/p/compcache
0 stars 0 forks source link

discard/trim support ? #98

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. format a zram device with ext4, and mount it with "discard" option
2. create an (near) uncompressible file on the device
3. delete the file : the memory is not freed.

What version of the product are you using? On what operating system?
Verified on Kernel 2.6.39.4 and 3.1.1, on Debian 64bits.

Please provide any additional information below.

# mount | grep zram
/dev/zram1 on /tmp type ext4 (rw,nosuid,nodev,discard,nobarrier)

Procedure :
# free -m
-/+ buffers/cache:       8196      17885
# dd if=/dev/urandom of=test.zram bs=10M count=50
524288000 bytes (524 MB) copied, 63.3754 s, 8.3 MB/s
# free -m
-/+ buffers/cache:       8471      17610
# rm -f test.zram ; free -m
-/+ buffers/cache:       8468      17613

And the entry /sys/block/zram1/discard doesn't exists.

I didn't find any discard or trim line in my linux sources (in 
/drivers/staging/zram), excepting in the zram.txt.

So, should this feature work ?

Original issue reported on code.google.com by kioob69 on 14 Dec 2011 at 1:01

GoogleCodeExporter commented 9 years ago
mmmm the feature seem to be in the trunk version 
http://code.google.com/p/compcache/source/browse/zram_sysfs.c, but not in the 
linux kernel version.

Original comment by kioob69 on 14 Dec 2011 at 1:10

GoogleCodeExporter commented 9 years ago
Is there ETA for this feature in the vanilla kernel? I have to patch any kernel 
version.

Original comment by fio...@gmail.com on 30 Oct 2012 at 5:53

GoogleCodeExporter commented 9 years ago
Any new features can now be added only after zram moves out of staging for 
which we are aiming kernel-3.8 release.

Original comment by nitingupta910@gmail.com on 30 Oct 2012 at 9:43