[CAF][kk_2.7-stable branch kernel][395 mb ram][Everything is working]

Search This thread

sir mordred

Senior Member
Sep 22, 2013
724
1,112
mmcblk0p15
photo.jpg


Hi guys

ım presenting you CAF kk_2.7-stable branch based kernel

Kernel sources are coming from Christopher83's K^Kernel sources (hats off to @Christopher83)

I just compiled the kernel for W

btw

What is CAF?

CAF = Code Aurora Forum. CAF is where Qualcomm engineers work to optimize the Linux kernel exclusively for Qualcomm chipsets. Device manufacturers use the kernel source from CAF to create kernels for their Qualcomm devices, but the code they get from CAF is always several months older than the latest code available on CAF. By grabbing the latest kernel source from CAF and adding device spesific patches(ancora sensor drivers), we have a most updated and pure CAF based kernel that has all of the latest improvements and optimizations from Qualcomm :good:


There is another great feature in this kernel

İntroduced and made by Christopher83 (big thanx to him)

The new dynamic allocation through CMA of ION Heap (to free more ram and dynamically allocate ram when needed from MM features)

with this feature we have +30 mb more ram without breaking any function (so 720p video recording is working :))

yesterday ı tried various ram maps and 395 mb ram should be max ram for us withou breaking any function

I compile the kernel with Christopher83's latest Linaro GCC 4.9.1 toolchain

Additional changes:

ı changed bootlogo(reverted back to old bootlogo)

ı improved boot speed (through ramdisk and through kernel)

ramdisk side:ı applied this change:https://github.com/LegacyXperia/android_device_semc_msm7x30-common/commit/bf6a68f34a6980a690c1503c600970444077bbb6

kernel side ı applied this change:https://github.com/Christopher83/samsung-kernel-msm7x30/commit/a629d801db0110a8d08224efa97f0cc6a6fa9142

so boot time noticeably was reduced



Kernel Download Link:

Version 1:https://yadi.sk/d/SF-hpZOUTcgRA

Version 2:

-395 mb (Everything is working include 720p video recording)https://yadi.sk/d/hars4yBHTcg2w
-400 mb hugemem(Everything is working except 720p video recording)https://yadi.sk/d/8-JkpMH1TY7Zd

Version 3:

-406 mb (hugemem)(Everything is working except 720p video recording):https://yadi.sk/d/hLhlCO3vUDAv5

Just flash it via cwm and Don't forget to wipe cache and wipe dalvik cache after installation

ATTENTİON:

The new dynamic allocation requires to AVOID the memory management with KSM... if you activate the KSM option, after some time the allocation fail so the 720P recording and playback will be broken!! In this case disable the KSM option inside "Settings -> Performance -> Memory Management" and reboot the phone to fix!!


Credits:

-ADC Team
-Christopher83
-Arco68
-Code Aurora Forum engineers(Qualcomm engineers)
-me :D

Enjoy! :good:
 
Last edited:
Hi guys

ım presenting you CAF kk_2.7-stable branch based kernel

Kernel sources are coming from ADC Team's sources (great team hats off to @Christopher83 especially)

I just compiled the kernel for W

btw

What is CAF?

CAF = Code Aurora Forum. CAF is where Qualcomm engineers work to optimize the Linux kernel exclusively for Qualcomm chipsets. Device manufacturers use the kernel source from CAF to create kernels for their Qualcomm devices, but the code they get from CAF is always several months older than the latest code available on CAF. By grabbing the latest kernel source from CAF and adding device spesific patches(ancora sensor drivers), we have a pure CAF based kernel that has all of the latest improvements and optimizations from Qualcomm :good:


There is another great feature in this kernel

İntroduced and made by Christopher83 (big thanx to him)

The new dynamic allocation through CMA of ION Heap (to free more ram and dynamically allocate ram when needed from MM features)

with this feature we have +30 mb more ram without breaking any function (so 720p video recording is working :))

yesterday ı tried various ram maps and 395 mb ram should be max ram for us withou breaking any function

I compile the kernel with Christopher83's latest Linaro GCC 4.9.1 toolchain

Additional changes:

ı changed bootlogo(reverted back to old bootlogo)

ı improved boot speed (through ramdisk and through kernel)

ramdisk side:ı applied this change:https://github.com/LegacyXperia/and...mmit/bf6a68f34a6980a690c1503c600970444077bbb6

kernel side ı applied this change:https://github.com/Christopher83/sa...mmit/a629d801db0110a8d08224efa97f0cc6a6fa9142

so boot time noticeably was reduced



Kernel Download Link:https://yadi.sk/d/a95ESFt7TRbTr

ATTENTİON:

The new dynamic allocation requires to AVOID the memory management with KSM... if you activate the KSM option, after some time the allocation fail so the 720P recording and playback will be broken!! In this case disable the KSM option inside "Settings -> Performance -> Memory Management" and reboot the phone to fix!!

ATTENTİON 2:

Only use this kernel on 5/28 build

Credits:

-ADC Team
-Christopher83
-Arco68
-Code Aurora Forum engineers(Qualcomm engineers)
-me :D

Enjoy! :good:
So, we can't use it with 4.4.3, right?

Inviato dal mio GT-I8150 utilizzando Tapatalk
 
  • Like
Reactions: fivezall

Christopher83

Inactive Recognized Developer
Sep 2, 2012
1,446
12,703
Milan
Is better disable ksm before flashing this kernel? or only if we have a trouble with that?
KSM (Kernel Samepage Merge), let us save a bit of RAM space used by kernel (max 10MB during my analysis) by merging duplicated memory pages used by different processes, even if it has also some performance impacts, since it uses CPU time to perform those memory scanning and merging operations.
So, in few words, it could free up a bit of RAM, but sometimes keeps the CPU busy to complete its work.

After introducing the dynamic allocation of MM ION heap, KSM could cause issues while playing HW/HW+ videos or while trying to record a 720p video with camcorder.
This is due to the impossibility to allocate one or more memory pages that have been merged by KSM inside the memory area reserved for dynamic allocations for MM ION heap through CMA (Contiguous Memory Allocator).

I'm looking for a solution for this "incompatibility", but at the moment the tried changes didn't work.
So, as a workaround, don't activate KSM until we find a fully working solution, since the RAM freed by dynamic allocation is surely higher than KSM freed RAM without any performance impact during normal usage, only a little time needed to start video playback or video recording (the time to dinamically allocate the needed amount of memory for MM ION heap).

I hope what I wrote is clear...

Have a nice Sunday.
 
Last edited:

sir mordred

Senior Member
Sep 22, 2013
724
1,112
mmcblk0p15
KSM (Kernel Samepage Merge), let us save a bit of RAM space used by kernel (max 10MB during my analysis) by merging duplicated memory pages used by different processes, even if it has also some performance impacts, since it uses CPU time to perform those memory scanning and merging operations.
So, in few words, it could free a bit of RAM, but sometimes keeps the CPU busy to complete its work.

After introducing the dynamic allocation of MM ION heap, KSM could cause issues while playing HW/HW+ videos or while trying to record a video with camcorder.
This is due to the impossibility to allocate one or more memory pages that have been merged by KSM inside the memory area reserved for dynamic allocations for MM ION heap through CMA (Contiguous Memory Allocator).

I'm looking for a solution for this "incompatibility", but at the moment the tried changes didn't work.
So, as a workaround, don't activate KSM until we find a fully working solution, since the RAM freed by dynamic allocation is surely higher than KSM freed RAM without any performance impact during normal usage, only a little time needed to start video playback or video recording (the time to dinamically allocate the needed amount of memory for MM ION heap).

I hope what I wrote is clear...

Have a nice Sunday.

Really sir.... You are an encyclopedia. So deep and correct

thanx for your explanation

regards
 

Christopher83

Inactive Recognized Developer
Sep 2, 2012
1,446
12,703
Milan
glad to see our community are still growing. good luck on you guys' development :D

sir @Christopher83 would u mind explaining more about the dynamic CMA? is it this one?
Hi Hadi,
take a look at these articles:
http://lwn.net/Articles/447405/
http://lwn.net/Articles/486301/

With the time, CMA has been integrated also on ION driver and when you set the heap type to ION_HEAP_TYPE_DMA, ion_cma_heap will be used. On more recent hardware is also possible to use ion_cp_heap with is_cma flag set.
 
Last edited:

hurtsky

Senior Member
Jul 5, 2012
1,876
4,682
hurtsky.com
  • Like
Reactions: fivezall

Top Liked Posts

  • There are no posts matching your filters.
  • 40
    photo.jpg


    Hi guys

    ım presenting you CAF kk_2.7-stable branch based kernel

    Kernel sources are coming from Christopher83's K^Kernel sources (hats off to @Christopher83)

    I just compiled the kernel for W

    btw

    What is CAF?

    CAF = Code Aurora Forum. CAF is where Qualcomm engineers work to optimize the Linux kernel exclusively for Qualcomm chipsets. Device manufacturers use the kernel source from CAF to create kernels for their Qualcomm devices, but the code they get from CAF is always several months older than the latest code available on CAF. By grabbing the latest kernel source from CAF and adding device spesific patches(ancora sensor drivers), we have a most updated and pure CAF based kernel that has all of the latest improvements and optimizations from Qualcomm :good:


    There is another great feature in this kernel

    İntroduced and made by Christopher83 (big thanx to him)

    The new dynamic allocation through CMA of ION Heap (to free more ram and dynamically allocate ram when needed from MM features)

    with this feature we have +30 mb more ram without breaking any function (so 720p video recording is working :))

    yesterday ı tried various ram maps and 395 mb ram should be max ram for us withou breaking any function

    I compile the kernel with Christopher83's latest Linaro GCC 4.9.1 toolchain

    Additional changes:

    ı changed bootlogo(reverted back to old bootlogo)

    ı improved boot speed (through ramdisk and through kernel)

    ramdisk side:ı applied this change:https://github.com/LegacyXperia/android_device_semc_msm7x30-common/commit/bf6a68f34a6980a690c1503c600970444077bbb6

    kernel side ı applied this change:https://github.com/Christopher83/samsung-kernel-msm7x30/commit/a629d801db0110a8d08224efa97f0cc6a6fa9142

    so boot time noticeably was reduced



    Kernel Download Link:

    Version 1:https://yadi.sk/d/SF-hpZOUTcgRA

    Version 2:

    -395 mb (Everything is working include 720p video recording)https://yadi.sk/d/hars4yBHTcg2w
    -400 mb hugemem(Everything is working except 720p video recording)https://yadi.sk/d/8-JkpMH1TY7Zd

    Version 3:

    -406 mb (hugemem)(Everything is working except 720p video recording):https://yadi.sk/d/hLhlCO3vUDAv5

    Just flash it via cwm and Don't forget to wipe cache and wipe dalvik cache after installation

    ATTENTİON:

    The new dynamic allocation requires to AVOID the memory management with KSM... if you activate the KSM option, after some time the allocation fail so the 720P recording and playback will be broken!! In this case disable the KSM option inside "Settings -> Performance -> Memory Management" and reboot the phone to fix!!


    Credits:

    -ADC Team
    -Christopher83
    -Arco68
    -Code Aurora Forum engineers(Qualcomm engineers)
    -me :D

    Enjoy! :good:
    15
    Kernel updated

    Changelog:

    -New kernel based on Christopher83's K^Kernel
    -Added All features of K^Kernel (http://xdaforums.com/showthread.php?t=2580112)
    -Added 2.0 Ghz overclock support
    -Added TRİM support
    -Disabled KSM through kernel for avoiding conflict between new memory allocation and KSM (so there is no more KSM option in settings)
    -İmproved boot speed
    -Off-mode Charging animation bug is fixed through ramdisk(thanx to our master sir Arco68)

    thanx to all for your support guys :good:

    Enjoy ;)
    12
    Well done!

    Sent from my GT-I9001 with Tapatalk 4
    11
    Is better disable ksm before flashing this kernel? or only if we have a trouble with that?
    KSM (Kernel Samepage Merge), let us save a bit of RAM space used by kernel (max 10MB during my analysis) by merging duplicated memory pages used by different processes, even if it has also some performance impacts, since it uses CPU time to perform those memory scanning and merging operations.
    So, in few words, it could free up a bit of RAM, but sometimes keeps the CPU busy to complete its work.

    After introducing the dynamic allocation of MM ION heap, KSM could cause issues while playing HW/HW+ videos or while trying to record a 720p video with camcorder.
    This is due to the impossibility to allocate one or more memory pages that have been merged by KSM inside the memory area reserved for dynamic allocations for MM ION heap through CMA (Contiguous Memory Allocator).

    I'm looking for a solution for this "incompatibility", but at the moment the tried changes didn't work.
    So, as a workaround, don't activate KSM until we find a fully working solution, since the RAM freed by dynamic allocation is surely higher than KSM freed RAM without any performance impact during normal usage, only a little time needed to start video playback or video recording (the time to dinamically allocate the needed amount of memory for MM ION heap).

    I hope what I wrote is clear...

    Have a nice Sunday.
    7
    Kernel updated

    Changelog:

    -increased ram to 406 mb
    -disabled ZRAM (we have already 64+ mb ram with this kernel so we dont need silly ZRAM and also in my test ZRAm was produced lag on games)
    -Experimentally ı lowered display panel voltage to half(theoretically 2x more usage when display on)
    -Merged latest changes which made by arco
    -kernel 3.4.94

    Enjoy ;)