Re: [RFC] [Patch v2] Created zramctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 27, 2014 at 10:04:45PM +0300, Timofey Titovets wrote:
> I spend some time and rewrite zramctl for util-linux.

 Thanks! Merged.

> sysfs.h powerful, but i can't understand how working sysfs.h and how i can
> implement it(?), and i think what my helper function is easier now, than
> sysfs.h realization

 I have modified your code to use sysfs stuff and to use libsmartcols
 in better way. So now it's more compatible with another ls-like utils
 we have in util-linux. For example you can specify output columns by
 --output, it makes it more friendly for scripts etc.

 # /zramctl 
 NAME       ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
 /dev/zram1               100M  44K  876B   44K         /mnt/test
 /dev/zram2               123M   4K   78B    4K         [SWAP]
 /dev/zram3                10M   0B    0B    0B         


 Note that I have kernel 3.14, so things like number of compression
 streams and compression algorithm are invisible for me (I going to
 update and test it with new kernel this afternoon).


 Anyway, zRam seems like nice project. I'll try to add support to
 swapon next week. My idea is something like (in fstab):

  /dev/zram0  swap  swap  x-zram.disksize=100M,x-zram.algorithm=lzo,auto


 it means use x-* options (we use this notation for another things) to
 specify zram setting. The controversial thing is that we have to call
 mkswap from swapon, but it's already supported for swap
 reinitialization (after system resume or on page size change etc.)

 ... or is it over-engineering?

    Karel


-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux