[G1 Android Development] dumfuq:
THIS IS NO LONGER NEEDED AS IT HAS BEEN INCORPORATED INTO THE CMSOURCE. USING KERNELS IN THIS THREAD WILL MOST LIKELY DOWNGRADE YOUR KERNEL UNLESS YOU ARE STILL RUNNING ONE OF THE EARLY TEST BUILDS OF 5.0.8.

IF YOU ARE LOOKING FOR THE NEWER OVERCLOCKED KERNELS TRY HERE...

kernel corner

This is a boot.img with an experimental kernel which enables multitasking for those that have some form of swap enabled on cm-5.0.7. This is probably not the best way to achieve the results, but it does work. If someone has a better way of doing this feel free to post it or whatnot.

I myself was becoming frustrated with webpages having to reload everytime I answered a text or did something else. Not to mention Gmote restarting a show if I came back to it after backgrounding it for similar reasons. So I did this...

The patch:

diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index 50d5f91..7e083f5 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -90,7 +90,7 @@ static int lowmem_shrink(int nr_to_scan, gfp_t gfp_mask)
int selected_oom_adj;
int array_size = ARRAY_SIZE(lowmem_adj);
int other_free = global_page_state(NR_FREE_PAGES);
- int other_file = global_page_state(NR_ACTIVE_FILE) + global_page_state(NR_INACTIVE_FILE);
+ int other_file = global_page_state(NR_ACTIVE_FILE) + global_page_state(NR_INACTIVE_FILE) + 1536;

/*
* If we already have a death outstanding, then

The value was obtained experimentally. Too High of a value caused kernel panics when having a lot of apps backgrounded and switching between them. Too low caused webpage refreshes when switching between a few apps. 1536 seems to allow moderate multitasking without causing the kernel panics. If too many apps are backgrounded then they will still need to be refreshed when reopened.

I have tested this with a basic linux swap partition as well as with compcache w/ backing swap. It does not work however if no swapping technique is employed.

The overclocked version was originally posted in the overclock thread. This one is the same as the second one I posted. Figured some people don't like overclocking so I made a non overclocked one as well. Of course just use fastboot to apply. If your not comfortable flashing random boot.imgs then you should definitely not flash this.

Without overclocking:

cm-5.0.7-ds-mt-boot.img (you don't want this)

koush's anykernel update zip format

cm-2.6.33.4-mt.zip (you want version 7)

With overclocking (as usual this doesn't boot without advanced tweaking):

oc825-5.0.7-ds-mt-test2-boot.img (nope not this one either)

koush's anykernel update zip format

oc825-cm-2.6.33.4-mt.zip (nor this one)

VERSION 7: (this would be the one you want)

This is the overclocked version with farmatito's patch (as per post

#131

).

for cm-5.0.7-stable/cm-5.0.8-test1

oc825-cm-2.6.33.4-mt-v7-signed.zip remember this boots at 825mhz so set your desired frequency/settings in your userinit.sh or init files if you want it to boot.

cm-2.6.33.34-mt-v7-signed.zip (this the kernel from farmatito's boot.img from post #131 repacked into an anykernel so it can be used in either/any rom)

A non overclocked boot.img is available here(cm-5.0.7-stable only).

for cm-5.0.8-test2

oc825-cm-2.6.34-mt-v7-signed.zip

cm-2.6.34-mt-v7-signed.zip

And the diff on this version is...

diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index 50d5f91..8cfbb6e 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -35,6 +35,8 @@
#include <linux/oom.h>
#include <linux/sched.h>
#include <linux/notifier.h>
+#include <linux/swap.h>
+

static uint32_t lowmem_debug_level = 2;
static int lowmem_adj[6] = {
@@ -82,6 +84,7 @@ static int lowmem_shrink(int nr_to_scan, gfp_t gfp_mask)
{
struct task_struct *p;
struct task_struct *selected = NULL;
+ struct sysinfo si;
int rem = 0;
int tasksize;
int i;
@@ -91,6 +94,9 @@ static int lowmem_shrink(int nr_to_scan, gfp_t gfp_mask)
int array_size = ARRAY_SIZE(lowmem_adj);
int other_free = global_page_state(NR_FREE_PAGES);
int other_file = global_page_state(NR_ACTIVE_FILE) + global_page_state(NR_INACTIVE_FILE);
+ si_swapinfo(&si);
+ lowmem_print(3, "OF %ld FREESWPAGES %ld NEWOF %ld\n", other_free, si.freeswap, other_free + si.freeswap);
+ other_free+=si.freeswap;

/*
* If we already have a death outstanding, then

Much thanks to everybody and all who helped, most notably farmatito, phhussen, and cyanogen.