public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] Zram handle util
@ 2014-07-19 17:28 Timofey Titovets
  2014-07-19 19:12 ` Sami Kerola
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Timofey Titovets @ 2014-07-19 17:28 UTC (permalink / raw)
  To: util-linux

Good time of day.
I want hear your opinions.
Several days ago, i writed zramctl util (on C++) for have useful app for 
setup zrams..
Code hosted her: https://github.com/Nefelim4ag/zramctl

Examples:
zramctl find # return name of first free device (zram0)
zramctl find 1024M lz4 4 # (i not implement -? options now)
			 # 4 - threads
			 # setup and return name of device (zram1)
zramctl reset zram0 zram1 ...


I want to port it on C and try include it in util-linux, like losetup.
It has a sense? What do you think?

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: [RFC] Zram handle util
@ 2014-07-20 14:45 Timofey Titovets
  2014-07-20 15:42 ` Sami Kerola
  0 siblings, 1 reply; 18+ messages in thread
From: Timofey Titovets @ 2014-07-20 14:45 UTC (permalink / raw)
  To: util-linux

(Sami Kerola sorry for spamming, i just can't catch this message in
mailing list)

Thanks for comment and boilerplate.c file.

I think it can't be related to systemd or udev, because as i know zram
configure and using with using many different scripts or through udev
config files. May be in future i open discuss in systemd-devel about
zramctl but now, i try to close several things in systemd todo, like
readahead optimization.

> By glance it seems a good utility would be able to integrate with udev
> and systemd, it should have add, remove, and possibly modify method. I
> would prefer the command to list what is current status of zram
> devices when nothing else is instructed. And of course manual page is
> needed. See util-linux/Documentation/howto-man-page.txt file to get
> manual done.

Also, kernel can't add or delete zram devices on demand, it hard coded
in module. Yes, i can reload module every time, but it awkward.
I write patch for correct this https://lkml.org/lkml/2014/7/17/664 ,
but now it not merged(and will it?).

I just want to make all acceptable generic solution (i can configure
loop devices through sysfs, but i have losetup...).

zramctl have status command:
$ zramctl status
 NAME     DISKSIZE       ORIG    COMPRES  ALG  THR
 zram0  1073741824     401408              8101   lz4   4
 zram1  1073741824              0                   0   lz4   4

> Without any investigation I have no idea what should be done with
> systemd integration. The zramctl might need a systemd service file,
> and possibly some sort of configuration file to setup the devices at
> boot desired way. Or something totally different. I am sure there is
> someone who knows what should be done, and with a bit of luck the mail
> archive discussion I pointed out has an answer to this already.
> --
> Sami Kerola
> http://www.iki.fi/kerolasa/

I also have custom systemd-swap script (handle swap device, zram
swaps, file swaps), what depend on zramctl, and i think if systemd
maintainers will want to expand various swap setting inside systemd, i
implement can it.

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-08-02 14:22 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-19 17:28 [RFC] Zram handle util Timofey Titovets
2014-07-19 19:12 ` Sami Kerola
     [not found]   ` <CAGqmi765JkidXDpi6bP2qUk5U7Xry5nF7y0WY4Y6M_Fq8Eiqeg@mail.gmail.com>
2014-07-19 22:44     ` Fwd: " Timofey Titovets
2014-07-20  9:38     ` Timofey Titovets
2014-07-20 20:36 ` Davidlohr Bueso
2014-07-21  7:57   ` Minchan Kim
2014-07-21  8:10     ` Karel Zak
2014-07-23 17:28 ` [RFC] [Patch] Created zramctl Timofey Titovets
2014-07-23 17:43   ` Dave Reisner
2014-07-23 17:51     ` Timofey Titovets
2014-07-24  7:29     ` Karel Zak
2014-07-24  7:26   ` Karel Zak
2014-07-24 10:23   ` Benno Schulenberg
2014-07-27 19:04 ` [RFC] [Patch v2] " Timofey Titovets
2014-08-01 10:37   ` Karel Zak
2014-08-02 14:22     ` Timofey Titovets
  -- strict thread matches above, loose matches on Subject: below --
2014-07-20 14:45 [RFC] Zram handle util Timofey Titovets
2014-07-20 15:42 ` Sami Kerola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox