Active Topics

 



Notices


Reply
Thread Tools
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#21
Originally Posted by Estel View Post
ereswap achieve it, by counting - via iostat
Hm, that doesn't seem to be present on-device, and even adding a dependency wouldn't be a great idea as most users shouldn't have the SDK tools repository enabled unless they know what they're doing. But you can cut out the middleman, eg something like:

Code:
M=$(awk "/$swap0/ { print int (\$10 / 2048) }" < /proc/diskstats)
ereswap is licensed under terms of GPL.
Which version? You may also want to add an explicit debian/copyright in the package :-)
 

The Following 3 Users Say Thank You to lma For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#22
@mr_pingu
sudo gainroot != root! The latter handles env. variables properly. for now, ereswap is meant to be used *only* with full profile root, but I have idea how to make it a non-issue in new version.

Originally Posted by lma View Post
Hm, that doesn't seem to be present on-device,
On freshly reflashed device (FIASCO + vanilla eMMC) with CSSU-T and kernel-power 50, I've iostat. If I remember correctly, it's also present on device without CSSU or kp.

Could anyone confirm/deny?

Anyway, thanks for Your code - I'll investigate it, and if no drawbacks present, I'll include it in next version

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!

Last edited by Estel; 2012-05-23 at 15:39.
 

The Following 2 Users Say Thank You to Estel For This Useful Post:
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#23
/proc/stats !
Aha, always learning bout Linux internals...

Just tested with backup N900 (original PR1.3, now 1.3.1) and iostat does not get shipped directly to end user. As busybox is missing a lot of things.
But busybox-power includes this as many other essential things. I can not think of living without it anymore (thx iDont).

Also swapset depends of bb-power (as for setting priority with switch -p), so I do see no argument against dependency to bb-power.
But cleaner solution may be using /proc/stats...
 

The Following 7 Users Say Thank You to peterleinchen For This Useful Post:
Posts: 1,397 | Thanked: 2,126 times | Joined on Nov 2009 @ Dublin, Ireland
#24
In my daily usage I try to avoid as much as possible charging the N900 without need, which thanks to KP is not many times a week.

However, I suspect that reswapping would cause a battery drain, so the best moment for me to do such a task would be when I plug the device to a wall charger, but not with USB connection as I would use the device for transferring files.

Would it be possible to launch the swap cleaning process upon detection of wall charging?.
 

The Following User Says Thank You to ivgalvez For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#25
Yes, it should be quite easy - although, reswapping *doesn't* consume any problematic amount of power. It's hardly distinguishable from normal usage, and, furthermore, it last only for 20-30 seconds.

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following 2 Users Say Thank You to Estel For This Useful Post:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#26
Originally Posted by ivgalvez View Post
In my daily usage I try to avoid as much as possible charging the N900 without need, which thanks to KP is not many times a week.

However, I suspect that reswapping would cause a battery drain, so the best moment for me to do such a task would be when I plug the device to a wall charger, but not with USB connection as I would use the device for transferring files.

Would it be possible to launch the swap cleaning process upon detection of wall charging?.
That's a good idea, but I would leave that outside of the program/package itself. Using dbusscripts or dbuscron should make it easy enough to implement.
 

The Following 4 Users Say Thank You to reinob For This Useful Post:
Posts: 1,680 | Thanked: 3,685 times | Joined on Jan 2011
#27
Originally Posted by reinob View Post
That's a good idea, but I would leave that outside of the program/package itself. Using dbusscripts or dbuscron should make it easy enough to implement.
Oh wow, dbuscron. HTF did I miss that?

Can anyone say if it wastes as much battery power as dbus-scripts? (causes insane numbers of wake-ups)?
__________________
N900: One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.
 

The Following 2 Users Say Thank You to vi_ For This Useful Post:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#28
Re. dbuscron,

This is not really useful information, but: on my "normal" N900 I have neither dbus-scripts nor dbuscron. On my "spare" N900 I installed dbus-scripts (however without writing any actual script) and didn't notice any (measurable) battery hit.

I later uninstalled it and installed dbuscron instead, mostly for philosophical reasons (listening to both session and system bus running a single instance of the daemon). Again, I (still) haven't written any script for it (but the swap recycle is a good candidate).

I have noticed no (measurable) battery impact with dbuscron either. Admitedly, the spare N900 is mostly unused and in off-line mode, so I charge it like once a week or so..

I suppose that the daemon itself (i.e. the listening on dbus) doesn't use much, but depending on which events trigger your script(s) the battery impact may be much bigger..
 

The Following 3 Users Say Thank You to reinob For This Useful Post:
Posts: 1,680 | Thanked: 3,685 times | Joined on Jan 2011
#29
At risk of derailing this discussion from ereswap...

I do not use dbus-scripts because it causes around ~1500 extra wake ups per 30s. and reduces C4 sleep time.

I was simply wondering if dbuscron is as brutal for the CPU?
__________________
N900: One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.
 

The Following 5 Users Say Thank You to vi_ For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#30
No worries, this discussion is interesting for me as possible ways to fully automate process (optionally?) for new versions. So, go ahead.

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 
Reply

Tags
ereswap, fragmentation, microsd, swappiness, swaps


 
Forum Jump


All times are GMT. The time now is 18:27.