Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,742,027 Members 48,189 Now Online
XDA Developers Android and Mobile Development Forum

21MB RAM Hack "KANGMEM" updated 5/4! [Source] [zImage]

Tip us?
 
coolbho3000
Old
(Last edited by coolbho3000; 6th May 2010 at 02:10 AM.)
#1  
Senior Recognized Developer - OP
Thanks Meter 758
Posts: 886
Join Date: Dec 2008
Thumbs up 21MB RAM Hack "KANGMEM" updated 5/4! [Source] [zImage]

This time, my RAM hack expands memory by 21MB total from the stock kernel. And this time, no camera PMEM is taken away! This is all thanks to the incrediblec kernel source released by HTC giving me some insight.

This is what I did, starting from the 8MB RAM hack:
- Expanded EBI1_BANK0 by 8MB because the incrediblec source said I could
- Moved 5MB GPU memory from EBI1_BANK0 to SMI
- Created extra memory bank in EBI1_BANK0 totalling 13MB
- Added 8MB camera PMEM back into SMI, and re-enabled camera PMEM

Version 2:
- Eliminated third memory bank in EBI1_BANK0 and added that memory into the first memory bank

As far as I know it's not possible to create a memory bank in the SMI and live to tell the tale, so that's why we're squeezing the 8MB of camera PMEM in there. In total, this adds 21MB of RAM from stock cm-kernel with seemingly no compromises.

The zImage is meant to be a proof of concept and only contains this tweak on top of normal cm-kernel. I don't suggest using this zImage for long, as it doesn't contain any "extras," and the regular custom kernels with all the extra features/optimizations will probably incorporate this soon.

Enjoy!

Version 2
Source: http://dl.dropbox.com/u/36553/board-...angmem2.tar.gz
Test zImage: http://dl.dropbox.com/u/36553/zImage-kangmem2

Old version
Source: http://dl.dropbox.com/u/36553/board-mahimahi.tar.gz
Test zImage (requires 2.6.33.3 wifi modules for wifi to work!): http://dl.dropbox.com/u/36553/zImage-kangmem

Quote:
cat /proc/meminfo
MemTotal: 416632 kB
MemFree: 39932 kB
Buffers: 7988 kB
Cached: 111812 kB
SwapCached: 0 kB
Active: 253484 kB
Inactive: 82412 kB
Active(anon): 220128 kB
Inactive(anon): 0 kB
Active(file): 33356 kB
Inactive(file): 82412 kB
Unevictable: 0 kB
Mlocked: 0 kB
HighTotal: 293888 kB
HighFree: 1200 kB
LowTotal: 122744 kB
LowFree: 38732 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 216104 kB
Mapped: 81076 kB
Shmem: 4032 kB
Slab: 10188 kB
SReclaimable: 4024 kB
SUnreclaim: 6164 kB
KernelStack: 3496 kB
PageTables: 11220 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 208316 kB
Committed_AS: 5665668 kB
VmallocTotal: 778240 kB
VmallocUsed: 144392 kB
VmallocChunk: 592044 kB
Galaxy Nexus (GSM)
Control your Android phone's CPU! SetCPU for Root Users
Follow me on Twitter!

Like my work? Buy SetCPU on the market or buy me some [insert drink here].
 
persiansown
Old
#2  
Recognized Developer
Thanks Meter 718
Posts: 853
Join Date: Jan 2007
Nice job coolbho. Why don't you recommend using it for long?
I do CyanogenMod stuff.

Circle me on Google+
 
coolbho3000
Old
(Last edited by coolbho3000; 3rd May 2010 at 09:28 PM.)
#3  
Senior Recognized Developer - OP
Thanks Meter 758
Posts: 886
Join Date: Dec 2008
Quote:
Originally Posted by persiansown View Post
Nice job coolbho. Why don't you recommend using it for long?
The zimage I built has no optimizations or any changes at all. The patch itself seems to be stable afaik.
Galaxy Nexus (GSM)
Control your Android phone's CPU! SetCPU for Root Users
Follow me on Twitter!

Like my work? Buy SetCPU on the market or buy me some [insert drink here].
 
jlevy73
Old
#4  
jlevy73's Avatar
Senior Member
Thanks Meter 1228
Posts: 9,136
Join Date: Nov 2009
Location: Los Angeles
Quote:
Originally Posted by coolbho3000 View Post
The zimage I built has no optimizations or any changes at all. The patch seems to be stable afaik.
Nice indeed, thanks. How long have you been running this kernel for? Even without the optimizations it should say stable, shouldn't it?

I wonder what the consequences will be by removing the 5mb from the GPU.
 
coolbho3000
Old
#5  
Senior Recognized Developer - OP
Thanks Meter 758
Posts: 886
Join Date: Dec 2008
Quote:
Originally Posted by jlevy73 View Post
Nice indeed, thanks. How long have you been running this kernel for? Even without the optimizations it should say stable, shouldn't it?

I wonder what the consequences will be by removing the 5mb from the GPU.
I've tested it for a few hours, and it seems to be fine. The 5MB was moved, not removed. Instead of removing that 8MB of camera PMEM as the last tweak did, I moved it. There are no RAM banks that are unaccounted for in this patch.
Galaxy Nexus (GSM)
Control your Android phone's CPU! SetCPU for Root Users
Follow me on Twitter!

Like my work? Buy SetCPU on the market or buy me some [insert drink here].
 
jlevy73
Old
#6  
jlevy73's Avatar
Senior Member
Thanks Meter 1228
Posts: 9,136
Join Date: Nov 2009
Location: Los Angeles
Quote:
Originally Posted by coolbho3000 View Post
I've tested it for a few hours, and it seems to be fine. The 5MB was moved, not removed. Instead of removing that 8MB of camera PMEM as the last tweak did, I moved it. There are no RAM banks that are unaccounted for in this patch.
Is this the .33.2 kernel or .33.3?
 
coolbho3000
Old
#7  
Senior Recognized Developer - OP
Thanks Meter 758
Posts: 886
Join Date: Dec 2008
Quote:
Originally Posted by jlevy73 View Post
Is this the .33.2 kernel or .33.3?
It's the 33.3 kernel, but the patch can probably be applied to any kernel from 32. But please bear in mind that the zimage I posted here is not really for general consumption. It works, but it doesn't have any of the extras.
Galaxy Nexus (GSM)
Control your Android phone's CPU! SetCPU for Root Users
Follow me on Twitter!

Like my work? Buy SetCPU on the market or buy me some [insert drink here].
 
pershoot
Old
#8  
Recognized Developer
Thanks Meter 3807
Posts: 7,669
Join Date: Dec 2008
good stuff dude.

i will patch this in and commit to git later tonight and run some tests.

 
intersectRaven
Old
#9  
Recognized Developer
Thanks Meter 1012
Posts: 1,965
Join Date: Mar 2010

 
DONATE TO ME
Interesting. I'll integrate this later when I get to the office.
Xperia Z1 Compact - Stock ROM w/ own kernel
Nexus 7 (2013) - Stock ROM w/ own kernel

Buy me a beer (or something...)
BitCoin donations accepted:
15MZpCG4J21myvk8mxfHgjCrJ97SgaZmwC
 
jlevy73
Old
#10  
jlevy73's Avatar
Senior Member
Thanks Meter 1228
Posts: 9,136
Join Date: Nov 2009
Location: Los Angeles
In the name of XDA science, I installed and so far so good. It's pretty fast, seems a little faster than stock .33.3 but that could just be placebo. The 21mb is definitely real. I will continue to play with it. If I run into any issue I will post logs.

Thanks again.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


TRENDING IN THEMER...