[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] CTCaer:
Dev Update:

Technical.

I'm currently experimenting with Ultra KSM 0.1.0 (ultra kernel same-page merging).

As we talked before, simple KSM is completely useless to any stock-based rom and every CM rom that has not madv_mergeable.

The latest is what says to KSM that it can merge. If missing (the case with any stock based and most cm roms), then KSM does nothing.

Ultra KSM is an improvement to that. It basically can search the whole ram and swap for same pages and then merge them and free up RAM.

The results are incredible indeed. 20k shared pages and from them 450 are different. We talk about a 44:1 ratio.

The saved ram is above 20mb in my rom.

I saw an app (that uses 3d and many libs) at system tuner, easily go from 40mb (actual ram usage) to 30 in just some seconds of uksm running (and the logs don't show garbage collection freeing ram, so it's uksm). Also the "shared" value went up, as it should.

Right now it uses 19.8mb ram.

Example: Imagine 3 apps that use the same code and themes from android framework. Dalvik can't share everything.

So let's say these apps use 4mb for these unshared memory. 4*3=12mb total. With uksm, this automatically becomes 4mb. So you free 8mb ram.

Problems and other:

Ultra-KSM is tunable like KSM. You can disable/enabled it. Choose how much the thread should sleep and other.

Testing for some hours with betterbatterystats on, shows that uksm process can easily sleep and doesn't wake phone.

If it does then it's useless without tuning that.

In the other hand when screen is on, it with show process cpu you can see spikes in cpu usage from uksm (as a kernel thread, the bar is red).

So the first thing to do, is renicing (changing process priority) of uksm to let's say "10".

That way, it will not interfere with anything and especially gaming. Although I didn't saw stutter when uksm does its job.

Also I'm considering to tune uksm to sleep more than 20ms. That when I'll figure out when it does the merging.

Because it doesn't spike cpu usage every 20ms and only after half minute or so.

EDIT2:----

It has nice of "5". I'll make it more through source. Maybe 10 to 15.

--------------

Addressing these, will reduce battery drain from it (well it only runs when phone is on, every now and then,

but CTCaer Kernel aims on battery too) and make sure that uksm will not interfere when spikes with smoothness of ui.

Although, I didn't saw any battery drain change and also the ui never stuttered when uksm was running.

So yeah, this is a first on stock based scene and also in most cm kernels.

You can check that kernels using it are counted in one hand's fingers.

That means it's highly experimental.

You will not see, an update to CTCaer Kernel anytime soon.

Not until I fix some hacks I did for compiling, tuning it and also find time (I'm on uni exams period).

Anyone that is willing to test responsibly the "uksm test build", throw me a pm.

As it's not recommended for daily usage, you have to know basic things:

Like checking/using sysfs, meminfo/vmstats, betterbatterystats, system tuner (either free or pro), debug options in settings.

EDIT:---------

Forgot to tell, that the test build have lower voltages, so for some it may not work.

-----------------

For kernel developers, the source code is here, uksm patches.

Any contribute/fix/mod/tune/whatever to source is welcomed.

U-KSM original code by: Nai Xia

END OF UPDATE LOG-------------------------------------

Any app that creates a swap file and mounts it can do the job.

My script is mostly for people that don't want an app running

and just want to enable swap to play a game and then disable it.

Fastest way to run a script is by installing script manager, find the script where you saved it, select su (you need root permission for swap)

and then run it.