[systemd-devel] [PATCH] run systemd-tmpfiles-clean only when we have AC power

Leonid Isaev lisaev at umail.iu.edu
Thu Apr 3 12:51:00 PDT 2014


On Thu, 3 Apr 2014 21:26:23 +0200
Tomasz Torcz <tomek at pipebreaker.pl> wrote:

> On Thu, Apr 03, 2014 at 03:42:08PM -0300, Cristian Rodríguez wrote:
> > While it is cool to be neat and clean all the time, this
> > task can wait if we are on battery.
> 
>   What if I connect my laptop to AC only when it sleeps? This will
> never run. 

I agree that cleaning /tmp and /run is a low-priority task, but what if there
are custom *.conf files in /etc/tmpfiles.d? AFAIU, these will not be run as
well, but may be needed.

And in the past, the difference in AC-powered and BAT-powered behavior in
pm-utils and Upower has created _lots_ of confusion.

> I also don't think couple stats() and rm's have any
> measurable impact on battery.
> 

Stock tmpfiles.d clean routine applies only to tmpfs (by default) filesystems.
On a battery-powered system, they are most likely clean due to small uptime.

-- 
Leonid Isaev
GnuPG key fingerprint: C0DF 20D0 C075 C3F1 E1BE  775A A7AE F6CB 164B 5A6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140403/2d4d379f/attachment.sig>


More information about the systemd-devel mailing list