Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,770,637 Members 39,143 Now Online
XDA Developers Android and Mobile Development Forum
Announcement from Christopher83: Customized kernel 3.4.x for KK 4.4 rom (CM 11.0 and derivatives) with ION memory allocations

[KERNEL][3.4.101][KK][ION] K^Kernel 3.4.101 v1.5 for KK 4.4 ION+PMEM ADSP [01/08/2014]

Tip us?
 
Christopher83
Old
(Last edited by Christopher83; 18th June 2014 at 06:39 AM.)
#1  
Christopher83's Avatar
Recognized Developer - OP
Thanks Meter 9238
Posts: 1,237
Join Date: Sep 2012
Location: Milan

 
DONATE TO ME
Default [KERNEL][3.4.101][KK][ION] K^Kernel 3.4.101 v1.5 for KK 4.4 ION+PMEM ADSP [01/08/2014]



In this thread you may find my customized kernel 3.4.x for KitKat rom (CM 11 and derivatives) that use ION+PMEM ADSP memory allocations.
Of course, your feedback, as always, are welcome and certainly valuable.


The main features are the following:
- Kernel 3.4.x
- Kernel based on more updated kk_2.7-stable branch of CAF (Code Aurora Forum)
- Sources synched with cm-11.0 repo branch of DevCon Team
- Built with my custom Linaro 4.9.1-2014.07 toolchain optimized for Cortex-A8
- Built with Cortex-A8 and NEON VFP optimization flags (both kernel and modules)
- Built with -O3 optimization flag (both kernel and modules)
- CPU overclockable up to 1824 MHz
- CPU frequencies undervolted (UV version) or extremely undervolted (EXUV version)
- CPU voltage control VDD sys interface (click for more details)
- Dynamic memory allocation of MM ION heap through CMA (Contiguous Memory Allocator)
- Dynamic memory allocation of PMEM ADSP heap through CMA (Contiguous Memory Allocator)
- 396MB, 406MB or 416MB of free RAM
- Init.d support
- Fast Charge support (default disabled, click for more details)
- Battery Life eXtender support (default disabled, click for more details)
- Ram Console support (click for more details)
- TRIM support
- USB OTG support (if also implemented on rom side)
- Lowered display panel voltage
- Lowered vibetonz voltage
- Lowered wifi voltage
- Lowered swappiness (60 -> 45)
- Increased CPU frequency during boot
- Optimized AES and SHA1 routines for ARM cpu architecture
- Fixed 100% battery notification after charger unplug
- Increased audio volume on board side
- Con Kolivas' CK3 Tweaks
- Optimized SLUB memory allocator
- Optimized ARM RWSEM (read/write semaphore) algorithm
- Optimized asynchronous I/O latency on solid state disks
- Disabled Gentle Fair Sleepers for better UI performance
- Filesystem dynamic read-ahead (based on disk size)
- CIFS support on boot
- Memory compaction
- Dynamic compression of clean pagecache pages
- Fast Random generator (frandom) support (click for more details)
- Dynamic FSync v1.2 (click for more details)
- Dynamic dirty page writebacks (click for more details)
- VM tweaks for performance and less battery consumption
- Revised LowMemoryKiller parameters for better performance (click for more details)
- Timer slack controller (click for more details)
- Dynamic management of the minimal timer slack value during suspend/resume (click for more details)
- LowMemoryKiller management of not killable processes (click for more details)
- exFAT support
- Additional TCP Congestion algorithms
- Updated ZRam, ZSMalloc, ZCache built-in modules

Available CPU governors:
- Adaptive
- BrazilianWax
- Conservative
- Hyper
- Intellidemand
- Interactive
- InteractiveX
- LionHeart
- LulzActive
- OnDemand (default)
- OnDemandX
- Performance
- Powersave
- SmartAssV2

Available I/O schedulers:
- BFQ
- CFQ
- Deadline
- Fiops
- Noop
- ROW
- SIO (default)
- V(R)


Kernel Downloads for KitKat ION+PMEM ADSP:



Howto install the kernel:
1) Download the preferred kernel zip file to sdcard or external sdcard
2) Reboot to recovery mode
3) Flash the kernel zip file
4) Wipe cache and dalvik cache if you're coming from another kernel
5) Reboot the system
6) Be sure that KSM is not active inside Settings -> Performance -> Memory management -> Kernel samepage merging


Kernel sources (on GitHub):



Useful info:
- Special features and sysfs settings
- Frequently asked questions



Tables:





Changelog:
Code:
01/08/2014 - K^Kernel 3.4 v1.5 for KitKat ION+PMEM ADSP
- Kernel 3.4.101
- Built with my latest custom Linaro 4.9.1-2014.07 toolchain optimized for Cortex-A8
- usb: gadget: f_accessory: Enabled Zero Length Packet (ZLP) for acc_write (credits to Anson Jacob)
- cgroup: Take css_set_lock from cgroup_css_sets_empty() (credits to Hans de Goede)
- cgroup: Fix use after free of cgrp (cgrp->css_sets) (credits to Hans de Goede)
- Revert "s3c2410_wdt: Add locking to cpu frequency transition notifier" (credits to Mark Salyzyn)
- usb: gadget: f_audio_source: Fixed USB Audio Class Interface Descriptor (credits to Anson Jacob)
- net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol() (credits to Avijit Kanti Das)
- Remove stray bcm4329 files (credits to arco68)
- fs: exFAT: Update to v1.2.7 (credits to arco68)
- ARM: 7583/1: decompressor: Enable unaligned memory access for v6 and above (credits to Dave Martin)

14/07/2014 - K^Kernel 3.4 v1.4 for KitKat ION+PMEM ADSP
- Kernel 3.4.98
- Built with my latest custom Linaro 4.9.1-2014.06 toolchain optimized for Cortex-A8
- misc: pmem: Retry again a few times if DMA allocation fails (credits to Christopher83)
- defconfig: Disable KSM (credits to arco68)
- Revert "msm: mdp: Update sync pt. behaviour" (credits to arco68)
- cpufreq: Persist cpufreq time in state data across hotplug (credits to Ruchi Kandoi)
- prctl: adds the capable(CAP_SYS_NICE) check to PR_SET_TIMERSLACK_PID. (credits to Ruchi Kandoi)
- net: wireless: Increase scan entry expiration to fit new scan time (credits to Dmitry Shmidt)
- DMA: PL330: Fix racy mutex unlock (credits to Javi Merino)
- cpufreq: fix sleeping in atomic context when realloc freq_table for all_time_in_state (credits to Minsung Kim)
- s3c2410_wdt: Add locking to cpu frequency transition notifier (credits to Mark Salyzyn)
- net: core: Support UID-based routing. (credits to Lorenzo Colitti)
- Handle 'sk' being NULL in UID-based routing. (credits to Sreeram Ramachandran)
- rtc: alarm: Squashed revert of power-on alarm feature and related commits (credits to Christopher83)
- binder: search for receiving context pid in global namespace (credits to Ricardo Mendoza)
- staging: binder: add vm_fault handler (credits to Vinayak Menon)
- Staging: android: binder: More offset validation. (credits to Arve Hjønnevåg)

05/07/2014 - K^Kernel 3.4 v1.3 for KitKat ION+PMEM ADSP
- Kernel 3.4.96
- Built with my latest custom Linaro 4.9.1-2014.06 toolchain optimized for Cortex-A8
- block: bfq: Squashed update from BFQ-v7r4 to BFQ-v7r5 (credits to arco68)
- misc: pmem: Support for dynamic allocation through CMA (credits to Christopher83)
- msm7x30: Simplify the code for hybrid memory allocations on board side (credits to Christopher83)
- msm7x30: Allow to optionally enable the use of CMA for ION MM and PMEM ADSP heaps (credits to Christopher83)
- msm7x30: Use CMA for PMEM ADSP (credits to Christopher83)
- msm7x30: Update defconfigs (credits to Christopher83)
- msm7x30: Use a higher memory allocation if CMA is used for ION MM heap (credits to Christopher83)

25/06/2014 - K^Kernel 3.4 v1.2 for KitKat ION+PMEM ADSP
- Kernel 3.4.94
- Built with my latest custom Linaro 4.9.1-2014.06 toolchain optimized for Cortex-A8
- msm: rpc: add shutdown and restart handler for rpc (credits to Angshuman Sarkar)
- msm: rpc: add shutdown and restart handler for rpc (credits to Arun Kumar Neelakantam)
- msm: restart_7k: Disable local IRQ interrupt (credits to Tirupathi Reddy)
- msm7x30: Disable unsupported features (credits to Blefish)
- misc: pmem: Add support for CMA (credits to Blefish)
- msm7x30: Use CMA for PMEM ADSP (credits to Christopher83 and Blefish)
- New memory configurations with 396MB, 406MB or 416MB of free RAM and
  everything should be working, including camera, camcorder and video playback (credits to Christopher83)

23/06/2014 - K^Kernel 3.4 v1.1 for KitKat ION+PMEM ADSP
- Kernel 3.4.94
- Built with my latest custom Linaro 4.9.1-2014.06 toolchain optimized for Cortex-A8
- power: ancora_battery: Remove trailing spaces (credits to Christopher83)
- power: ancora_tmo_battery: Remove trailing spaces (credits to Christopher83)
- power: apache_battery: Remove trailing spaces (credits to Christopher83)
- power: ancora_tmo_battery: Add Battery Life eXtender (BLX) support (credits to Christopher83)
- power: apache_battery: Add Battery Life eXtender (BLX) support (credits to Christopher83)
- power: apache_battery: 100% battery notification after charger unplug (credits to Christopher83)
- power: ancora_battery: Increase battery check interval from 5 seconds to 15 seconds (credits to Christopher83)
- power: ancora_tmo_battery: Increase battery check interval from 5 seconds to 15 seconds (credits to Christopher83)
- power: apache_battery: Increase battery check interval from 5 seconds to 15 seconds (credits to Christopher83)
- ancora_tmo: High memory configurations (credits to Christopher83)
- apache: High memory configurations (credits to Christopher83)
- msm7x30: Better manage cpu frequencies for MSM8255 and MSM8255T (credits to Christopher83)
- ancora_tmo: Add custom defconfigs (credits to Christopher83)
- apache: Add custom defconfigs (credits to Christopher83)
- arm: Add a config option to use GLibC memcpy and memmove versions (credits to Christopher83)
- msm7x30: Update defconfigs to use GLibC versions of memcpy and memmove (credits to Christopher83)
- mmc: msm_sdcc: Advertise erase capability for ancora_tmo and apache (credits to arco68)
- sec_jack: updated driver (credits to CastagnaIT)
- mm: cma: fix alignment requirements for contiguous regions (credits to Marek Szyprowski)
- drivers: cma: represent physical addresses as phys_addr_t (credits to Vitaly Andrianov)
- drivers: dma-contiguous: refactor dma_alloc_from_contiguous() (credits to Michal Nazarewicz)
- mm: cma: fix condition check when setting global cma area (credits to Marek Szyprowski)
- drivers: dma-contiguous: clean source code and prepare for device tree (credits to Marek Szyprowski)
- drivers: dma-contiguous: add initialization from device tree (credits to Marek Szyprowski)
- cma: Remove __init annotations from data structures (credits to Laura Abbott)
- cma: Fix up devicetree bindings (credits to Laura Abbott)
- cma: Add support for associating regions by name (credits to Laura Abbott)
- cma: Remove restriction on region names (credits to Laura Abbott)
- cma: use MEMBLOCK_ALLOC_ANYWHERE for placing CMA regions (credits to Laura Abbott)
- cma: Add API to get the start address of a CMA region (credits to Laura Abbott)
- cma: Remove potential deadlock situation (credits to Laura Abbott)
- cma: Add support for memory limits (credits to Laura Abbott)
- cma: Make locking finer grained (credits to Laura Abbott)
- cma: Drop the right mutex (credits to Laura Abbott)
- dma-contiguous: Return 'zero' pfn in case of error (credits to Chintan Pandya)
- ARM: dma-mapping: fix incorrect freeing of atomic allocations (credits to Aaro Koskinen)
- mm: vmalloc: use const void * for caller argument (credits to Marek Szyprowski)
- ARM: dma-mapping: remove custom consistent dma region (credits to Marek Szyprowski)
- mm: push lru index into shrink_[in]active_list() (credits to Konstantin Khlebnikov)
- mm: vmscan: remove lumpy reclaim (credits to Mel Gorman)
- mm: vmscan: do not stall on writeback during memory compaction (credits to Mel Gorman)
- mm: vmscan: remove reclaim_mode_t (credits to Mel Gorman)
- mm: remove lru type checks from __isolate_lru_page() (credits to Konstantin Khlebnikov)
- mm/memcg: kill mem_cgroup_lru_del() (credits to Konstantin Khlebnikov)
- mm/memcg: scanning_global_lru means mem_cgroup_disabled (credits to Hugh Dickins)
- mm/memcg: use vm_swappiness from target memory cgroup (credits to Konstantin Khlebnikov)
- mm: remove swap token code (credits to Rik van Riel)
- mm/vmscan: store "priority" in struct scan_control (credits to Konstantin Khlebnikov)
- kernel: cgroup: push rcu read locking from css_is_ancestor() to callsite (credits to Johannes Weiner)
- mm: memcg: count pte references from every member of the reclaimed hierarchy (credits to Johannes Weiner)
- mm/vmscan: push zone pointer into shrink_page_list() (credits to Konstantin Khlebnikov)
- mm/vmscan: push lruvec pointer into isolate_lru_pages() (credits to Konstantin Khlebnikov)
- mm/vmscan: remove update_isolated_counts() (credits to Konstantin Khlebnikov)
- mm: cma: discard clean pages during contiguous allocation instead of migration (credits to Minchan Kim)
- cma: decrease cc.nr_migratepages after reclaiming pagelist (credits to Minchan Kim)
- mm/compaction.c: fix deferring compaction mistake (credits to Minchan Kim)
- mm: compaction: Abort async compaction if locks are contended or taking too long (credits to Mel Gorman)
- mm: compaction: update comment in try_to_compact_pages (credits to Mel Gorman)
- mm: compaction: capture a suitable high-order page immediately when it is made available (credits to Mel Gorman)
- mm: compaction: abort compaction loop if lock is contended or run too long (credits to Shaohua Li)
- mm: compaction: move fatal signal check out of compact_checklock_irqsave (credits to Mel Gorman)
- mm: compaction: Update try_to_compact_pages()kerneldoc comment (credits to Mel Gorman)
- mm: compaction: acquire the zone->lru_lock as late as possible (credits to Mel Gorman)
- mm: compaction: acquire the zone->lock as late as possible (credits to Mel Gorman)
- mm: compaction: cache if a pageblock was scanned and no pages were isolated (credits to Mel Gorman)
- mm: cma: WARN if freed memory is still in use (credits to Marek Szyprowski)
- mm: do not use page_count() without a page pin (credits to Minchan Kim)
- mm: clean up __count_immobile_pages() (credits to Minchan Kim)
- mm: compaction: Restart compaction from near where it left off (credits to Mel Gorman)
- mm: compaction: clear PG_migrate_skip based on compaction and reclaim activity (credits to Mel Gorman)
- CMA: migrate mlocked pages (credits to Minchan Kim)
- mm: compaction: correct the nr_strict va isolated check for CMA (credits to Mel Gorman)
- mm: compaction: validate pfn range passed to isolate_freepages_block (credits to Mel Gorman)
- mm: compaction: Move migration fail/success stats to migrate.c (credits to Mel Gorman)
- mm: compaction: Add scanned and isolated counters for compaction (credits to Mel Gorman)
- mm: cma: skip watermarks check for already isolated blocks in split_free_page() (credits to Marek Szyprowski)
- mm: compaction: partially revert capture of suitable high-order page (credits to Mel Gorman)
- compaction: fix build error in CMA && !COMPACTION (credits to Minchan Kim)
- mm: vmscan: do not keep kswapd looping forever due to individual uncompactable zones (credits to Johannes Weiner)
- mm: vmscan: Fix build error (credits to Christopher83)
- msm: Allow lowmem to be non contiguous and mixed. (credits to Neeti Desai)
- msm: Increase the kernel virtual area to include lowmem (credits to Neeti Desai)
- mm: Remove __init annotations from free_bootmem_late (credits to Laura Abbott)
- kernel/lib: add additional debug capabilites for data corruption (credits to Syed Rameez Mustafa)
- mm: panic on the first bad page table entry access (credits to Pushkar Joshi)
- mm: Update is_vmalloc_addr to account for vmalloc savings (credits to Laura Abbott)
- slub: tid must be retrieved from the percpu area of the current processor (credits to Christoph Lameter)
- mm: vmscan: Move pages that fail swapout to LRU active list (credits to Olav Haugan)
- mm: swap: Rate limit swap write errors (credits to Olav Haugan)
- mm: change freepage state correctly in __isolate_free_page (credits to Laura Abbott)
- mm: make is_vmalloc_addr lockless (credits to Laura Abbott)
- mm/compaction: Break out of loop on !PageBuddy in isolate_freepages_block (credits to Laura Abbott)
- mm: compaction: fix bit ranges in {get,clear,set}_pageblock_skip() (credits to Bartlomiej Zolnierkiewicz)
- msm: kgsl: hold a process_private refcount in process_mem_print (credits to Jeremy Gebben)
- msm: kgsl: Look up the process struct in process_mem_open() (credits to Jordan Crouse)
- msm: kgsl: prevent kgsl_get_pagetable from returning a destroyed pt (credits to Jeff Boody)
- msm: kgsl: Fix spinlock recursion in destroy pagetable (credits to Prakash Kamliya)
- gpu: ion: Don't call virt_to_page on addresses from dma_alloc (credits to Laura Abbott)
- gpu: ion: Explictly mark DMA allocations as GFP_KERNEL (credits to Laura Abbott)

17/06/2014 - K^Kernel 3.4 v1.0 for KitKat ION+PMEM ADSP
- First release for Samsung Galaxy W (GT-I8150)
- Kernel 3.4.94
- Sources synched with cm-11.0 repo branch of DevCon Team
- Built with my latest custom Linaro 4.9.1-2014.06 toolchain optimized for Cortex-A8
- New kernel branch based on kk_2.7-stable branch of Code Aurora Forum
- Up to 406MB of free RAM thanks to the dynamic allocation via CMA of ION heap related to MM features (camcorder, video playback/recording/encoding)
- msm7x30: Use CMA for MM ION heap (credits to Christopher83)
- msm7x30: Update defconfigs to enable CMA (credits to Christopher83)
- mm: try_to_unmap_cluster() should lock_page() before mlocking (credits to Vlastimil Babka)
- msm:vidc: Amend error checks on ION API failures (credits to Maheshwar Ajja)
- ion: cma: Add debug heap ops for CMA heap (credits to Chintan Pandya)
- Makefile: Added compilation optimization flags (credits to Christopher83)
- arm: Fix compatibility with linaro toolchain (credits to CastagnaIT)
- arm: Added NEON compilation flag to VFP module (credits to Christopher83)
- acpuclock-7x30: Added overclocking and undervolting support (credits to Christopher83)
- acpuclock-7x30: Increased cpu frequency on boot (credits to Christopher83)
- block: fiops ioscheduler core (credits to Shaohua Li)
- block: fiops read/write request scale (credits to Shaohua Li)
- block: fiops sync/async scale (credits to Shaohua Li)
- block: fiops add ioprio support (credits to Shaohua Li)
- block: fiops preserve vios key for deep queue depth workload (credits to Shaohua Li)
- block: fiops bias sync workload (credits to Shaohua Li)
- block: fiops add some trace information (credits to Shaohua Li)
- block: Simple I/O scheduler (credits to Christopher83)
- block: V(R) I/O scheduler (credits to Christopher83)
- block: Reordered the I/O schedulers (credits to Christopher83)
- char: Added Fast Random generator support (frandom) (credits to Christopher83)
- cpufreq: CPU Voltage Control (VDD sysfs interface) (credits to Christopher83)
- cpufreq: Reordered the CPU governors (credits to Christopher83)
- cpufreq: InteractiveX CPU governor (credits to Christopher83)
- cpufreq: OnDemandX CPU governor (credits to Christopher83)
- cpufreq: Lionheart CPU governor (credits to Christopher83)
- cpufreq: SmartAssV2 CPU governor (credits to Christopher83)
- cpufreq: LulzActive CPU governor (credits to Christopher83)
- cpufreq: Adaptive CPU governor (credits to Christopher83)
- cpufreq: Hyper CPU governor (credits to Christopher83)
- cpufreq: BrazilianWax CPU governor (credits to Christopher83)
- cpufreq: Intellidemand CPU governor (credits to Christopher83)
- fs: Asynchronous I/O latency to a solid-state disk greatly increased (credits to Dave Kleikamp)
- fs/dyn_sync_cntrl: dynamic sync control (credits to faux123)
- fs/dyn_sync_cntrl: check dyn fsync control's active prior to performing fsync ops (credits to Andrew Bartholomew)
- fs/dyn_sync_cntrl: add some cache optimizations (credits to faux123)
- fs/dyn_sync_cntrl: add reboot notifier to force flush outstanding data (credits to faux123)
- fs/dyn_sync_cntrl: add kernel panic notifier to force flush outstanding data (credits to faux123)
- mm: Lowered swappiness 60->45 (credits to Christopher83)
- mm: Optimized SLUB memory allocator (credits to Christopher83)
- mm: Added filesystem dynamic read-ahead (Credits to Chad Gooldman) (credits to Christopher83)
- power: Added Battery Life eXtender (BLX) version 1 (Credits to Ezeekel) Adapted by Christopher83 for I9001 and I8150 devices - If the BLX charging limit is 100%, then the battery is fully charged as if the feature is not active - Wait some seconds after reaching the charging limit before stop the charging (credits to Christopher83)
- power: 100% battery notification after charger unplug (credits to Christopher83)
- rwsem: Optimized ARM RWSEM algorithm (credits to Ashwin Chaugule)
- rwsem-spinlock: Implement writer lock-stealing for better scalability (credits to Yuanhan Liu)
- rwsem: Implement writer lock-stealing for better scalability (credits to Alex Shi)
- rwsem: make the waiter type an enumeration rather than a bitmask (credits to Michel Lespinasse)
- rwsem: shorter spinlocked section in rwsem_down_failed_common() (credits to Michel Lespinasse)
- rwsem: move rwsem_down_failed_common code into rwsem_down_{read,write}_failed (credits to Michel Lespinasse)
- rwsem: simplify rwsem_down_read_failed (credits to Michel Lespinasse)
- rwsem: simplify rwsem_down_write_failed (credits to Michel Lespinasse)
- rwsem: more agressive lock stealing in rwsem_down_write_failed (credits to Michel Lespinasse)
- rwsem: use cmpxchg for trying to steal write lock (credits to Michel Lespinasse)
- rwsem: avoid taking wait_lock in rwsem_down_write_failed (credits to Michel Lespinasse)
- rwsem: skip initial trylock in rwsem_down_write_failed (credits to Michel Lespinasse)
- rwsem: simplify __rwsem_do_wake (credits to Michel Lespinasse)
- rwsem: implement support for write lock stealing on the fastpath (credits to Michel Lespinasse)
- rwsem: do not block readers at head of queue if other readers are active (credits to Michel Lespinasse)
- rwsem: no need for explicit signed longs (credits to Davidlohr Bueso)
- rwsem: check counter to avoid cmpxchg calls (credits to Davidlohr Bueso)
- sched: Disabled Gentle Fair Sleepers for better UI performance (credits to Christopher83)
- lib/memcopy: use glibc version (credits to Miao Xie)
- lib/string: use glibc version (credits to Miao Xie)
- mm: Dynamic management of dirty page writebacks (credits to Christopher83)
- fs: sync: Don't disable fdatasync() (credits to faux123)
- CK3 tweaks (Credits to Con Kolivas) (credits to Christopher83)
- hrtimer: Introduce effective timer slack (credits to Kirill A. Shutemov)
- hrtimer: Implement PR_GET_EFFECTIVE_TIMERSLACK (credits to Kirill A. Shutemov)
- cgroups: Introduce timer slack controller (credits to Kirill A. Shutemov)
- kernel: cgroup_timer_slack: Adaptations for 3.4 kernel (credits to Christopher83)
- kernel: cgroup_timer_slack: Dynamic management of timer slack (credits to Christopher83)
- staging: android: lowmemorykiller: Management of not killable processes (credits to Christopher83)
- fs/sync: Make sync() satisfy many requests with one invocation (credits to Paul E. McKenney)
- decompressor: Add LZ4 decompressor module (credits to Kyungsik Lee)
- lib: Add support for LZ4-compressed kernel (credits to Kyungsik Lee)
- arm: Add support for LZ4-compressed kernel (credits to Kyungsik Lee)
- lib: Add lz4 compressor module (credits to Chanho Min)
- crypto: Add lz4 Cryptographic API (credits to Chanho Min)
- lib/lz4/lz4_compress: fix macro usage error (credits to faux123)
- LZ4: compression/decompression signedness mismatch (v2) (credits to Sergey Senozhatsky)
- Makefile: Use -fno-inline-functions to build with Linaro GCC 4.8 toolchains (credits to Christopher83)
- acpuclock-7x30: Raised some standard UV and stock voltages for high OC cpu frequencies (credits to Christopher83)
- softirq: reduce latencies (credits to Eric Dumazet)
- fs: vfat: reduce the worst case latencies (credits to xiaogang)
- msm: kgsl: Add an input handler to power up the GPU on a  touch event (credits to Tk-Glitch)
- ARM: be strict about FP exceptions in kernel mode (credits to mrg666)
- ARM: add support for kernel mode NEON (credits to mrg666)
- ARM: crypto: add NEON accelerated XOR implementation (credits to Ard Biesheuvel)
- ARM: 7835/2: fix modular build of xor_blocks() with NEON enabled (credits to Ard Biesheuvel)
- ARM: move VFP init to an earlier boot stage (credits to Ard Biesheuvel)
- ARM: Perform the creation of procfs node for VFP later (credits to Christopher83)
- ARM: only allow kernel mode neon with AEABI This prevents the linker erroring with: (credits to Russell King)
- ARM: 7626/1: arm/crypto: Make asm SHA-1 and AES code Thumb-2 compatible (credits to Dave Martin)
- ARM: 7723/1: crypto: sha1-armv4-large.S: fix SP handling (credits to Ard Biesheuvel)
- ARM: 7837/3: fix Thumb-2 bug in AES assembler code (credits to Ard Biesheuvel)
- crypto: create generic version of ablk_helper (credits to Ard Biesheuvel)
- ARM: pull in <asm/simd.h> from asm-generic (credits to Ard Biesheuvel)
- ARM: move AES typedefs and function prototypes to separate header (credits to Ard Biesheuvel)
- ARM: add support for bit sliced AES using NEON instructions (credits to Ard Biesheuvel)
- ARM: add .gitignore entry for aesbs-core.S (credits to Russell King)
- CRYPTO: Fix more AES build errors (credits to Russell King)
- workqueues: Introduce new flag WQ_POWER_EFFICIENT for power oriented workqueues (credits to Viresh Kumar)
- workqueue: Add system wide power_efficient workqueues (credits to Viresh Kumar)
- block: queue work on power efficient wq (credits to Viresh Kumar)
- xsched: Optimize build_sched_domains() for saving first SD node for a cpu (credits to Viresh Kumar)
- PHYLIB: queue work on system_power_efficient_wq (credits to Viresh Kumar)
- ASoC: pcm: Use the power efficient workqueue for delayed powerdown (credits to Mark Brown)
- ASoC: jack: Use power efficient workqueue (credits to Luis Cruz)
- regulator: core: Use the power efficient workqueue for delayed powerdown (credits to Luis Cruz)
- ASM: word-at-a-time: make the interfaces truly generic (Chad Goodman) (credits to poondog)
- LIB: use generic strnlen_user and strncpy_from_user functions (Chad Goodman) (credits to poondog)
- ARM: dcache: select DCACHE_WORD_ACCESS for little-endian ARMv6+ CPUs (Chad Goodman) (credits to poondog)
- ARM: 7927/1: dcache: select DCACHE_WORD_ACCESS for big-endian CPUs (credits to Will Deacon)
- sched: Add sysinterface for GENTLE_FAIR_SLEEPERS (credits to Tk-Glitch)
- sched: Consider max cost of idle balance per sched domain (credits to faux123)
- sched: Periodically decay max cost of idle balance (credits to faux123)
- cpufreq: Optimize cpufreq_frequency_table_verify() (credits to Viresh Kumar)
- ancora : update board (credits to madridii)
- ancora: Increased audio volume on board side (credits to madridii)
- ancora: Lowered WIFI voltage (credits to madridii)
- ancora: Lowered display panel voltage (credits to madridii)
- ancora: Lowered Vibetonz voltage (credits to madridii)
- msm7x30: Update default and custom configs (credits to Christopher83)
- ancora: High memory allocations (credits to Christopher83)
- ancora: Add custom defconfigs (credits to Christopher83)
- Revert "mdp4_overlay_lcdc: Fixed wrong initialization of VSYNC" (credits to arco68)
- mmc: msm_sdcc: Advertise erase capability for ancora (credits to arco68)
- msm_fb: Fix backlight issue on ancora and ancora_tmo (credits to arco68)
- gpu: ion: Sync CMA caching logic with carveout heap. (credits to Blefish)
- defconfigs: Build crypto devices as modules (credits to arco68)
- msm: dma: Moving queue_work() function within spinlock (credits to Utsab Bose)
- msm: kgsl: Add the buffer user address to the debugfs memory list (credits to Jordan Crouse)
- msm: kgsl: use %pK to restrict printing GPU / memory addresses (credits to Jordan Crouse)
- sched: Reset rq->next_interval before going idle (credits to Srivatsa Vaddagiri)
- sched: re-calculate a cpu's next_balance point upon sched domain changes (credits to Srivatsa Vaddagiri)
- ARM: 7486/1: sched_clock: update epoch_cyc on resume (credits to Colin Cross)
- ARM: 7565/1: sched: stop sched_clock() during suspend (credits to Felipe Balbi 2)
- sched: Set MC (multi-core) sched domain's busy_factor attribute to 1 (credits to Srivatsa Vaddagiri)
- msm: kgsl: Cleanup the memory free list (credits to Jordan Crouse)



Credits and Thanks to:
arco68, CastagnaIT and Ivendor for their awesome work and their kernel sources
Ezekeel, Doomlord, Faux123, Stratosk, Tegrak, ErasmuX, Imoseyon, Blefish, mikeioannina, Madridii and other devs I'm surely missing
CyanogenMod, Kernel.org, Code Aurora Forum, Google, Linaro GCC developers
lafactorial, dec0der, ayesse, xlollomanx, gregoriaz, Istanblue, tycoo, hrinfrnlmjsty, makankaki, LeroViten and the other users for their support in testing

XDA:DevDB Information
[GT-I8150][ION] K^Kernel 3.4 for KK 4.4 ION+PMEM ADSP, Kernel for the Samsung Galaxy W I8150

Contributors
Christopher83
Kernel Special Features: Customized kernel 3.4.x for KK 4.4 rom (CM 11.0 and derivatives) with ION memory allocations

Version Information
Status: Stable
Current Stable Version: v1.5
Stable Release Date: 2014-08-01

Created 2014-06-17
Last Updated 2014-08-01


Threads for Samsung Galaxy S Plus (GT-I9001)
K^Kernel 3.4 ION+PMEM ADSP: for KK 4.4 - for JB 4.3 - for JB 4.2.2
K^Kernel 3.4 PMEM: for KK 4.4 - for JB 4.2.2 and JB 4.3
K^Kernel 3.0 PMEM: for JB 4.1.2 and JB 4.2.2 - for ICS
App: Phantom Key Presses Filter

Threads for Samsung Galaxy W (GT-I8150)
K^Kernel 3.4 ION+PMEM ADSP: for KK 4.4

Threads for Developers
Tools: Cross Compiler Toolchains (Linaro GCC 4.9, 4.8, 4.7 and 4.6)
The Following 65 Users Say Thank You to Christopher83 For This Useful Post: [ Click to Expand ]
 
Christopher83
Old
(Last edited by Christopher83; 17th June 2014 at 10:41 PM.)
#2  
Christopher83's Avatar
Recognized Developer - OP
Thanks Meter 9238
Posts: 1,237
Join Date: Sep 2012
Location: Milan

 
DONATE TO ME
Special features and sysfs settings (Part 1):

Here you can find some useful scripts that can be used with the following described features:

CPU voltage control VDD sys interface
This feature allows to customize the voltage assumed by each cpu scaling frequency.
It could be useful if you'd like to decrease one or more voltages for battery saving purposes (undervolting), or to increase/adjust them to prevent phone freezes (overvolting).

How to customize the voltages:
 

1) By downloading and using Trickster MOD or IncrediControl and changing the voltages table inside the SVS tab
2) By using customized init.d scripts (the custom values will be always restored after a reboot, if you don't format the system partition)
- Download one of the script named 01vdd_levels*
- If the file has been saved with .txt extension (stock browser), rename it by removing the .txt extension
- Edit the file by setting your customized voltages, where each line has this syntax
Code:
echo "cpu_freq_HZ mV" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
cpu_freq_HZ is the cpu frequency in Hz you'd like to change
mV is the voltage you want to set

For example, the following line means that when the cpu frequency is 1516800 Hz = 1516 MHz, the voltage used will be 1175 mV
Code:
echo "1516800 1175" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
- Copy the new file inside /etc/init.d
- Give the rwxr-xr-x permissions to the file (read, write, execution for owner, read and execution for group users, read and execution for others)
- Reboot
3) By using Terminal Emulator (note that the values you set will be lost after a reboot/shutdown)
- Open Terminal Emulator
- Run these commands
Code:
su
# Run a command for each cpu frequency voltage you'd like to change
echo "cpu_freq_HZ mV" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
cpu_freq_HZ is the cpu frequency in Hz you'd like to change
mV is the voltage you want to set

For example, the following line means that when the cpu frequency is 1516800 Hz = 1516 MHz, the voltage used will be 1175 mV
Code:
echo "1516800 1175" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels

Alternative Extreme Undervolted (ExUV) settings
If after overclocking your I8150 you noticed some freezes when on ExUV kernel builds, you may use an alternative extremely undervolted setting with the init.d script you can find here: 01vdd_levels_alt_exuv
- Download the script
- If the file has been saved with .txt extension (stock browser), rename it by removing the .txt extension
- Copy the new file inside /etc/init.d
- Give the rwxr-xr-x permissions to the file (read, write, execution for owner, read and execution for group users, read and execution for others)
- Reboot


Force Fast Charge
This feature allows you to force AC charging for any charger that is detected as USB (eg. PC USB ports, USB Car Chargers) and pull the full current the charger can support, in such a way as to speed up the time required for a complete battery recharge.
By enabling this feature, the USB / ADB data transfers will be disabled (security limitation to protect your data).

How to enable/disable the Force Fast Charge:
 

1) By using the related setting inside System->Advanced->Force Fast Charge (only on CM 10 Beta 3 and next releases)
2) By downloading and using Trickster MOD or IncrediControl or NsTools
2) By directly editing the file /sys/kernel/fast_charge/force_fast_charge and setting 1 to enable the force charge, 0 to disable it (note that set value will be lost after a reboot/shutdown)
3) By using Terminal Emulator (note that set value will be lost after a reboot/shutdown)
- Open Terminal Emulator
- Run this command to enable the force fast charge feature
Code:
su
echo 1 > /sys/kernel/fast_charge/force_fast_charge
- Then, when you want to restore the normal status, run this command to disable the force fast charge feature
Code:
su
echo 0 > /sys/kernel/fast_charge/force_fast_charge
4) By using a customized init.d script, but I don't recommend it because you have to remember to disable the feature every time you want to connect your device to a pc for data transfering after every reboot

Battery life extender (BLX)
This feature has been developed by Ezekeel and allows to set a customized battery charging limit (100% is the default stock value, if you want, you can set a lower value).
As Ezekeel said, it is commonly accepted that both very low and very high charge states accelerate the degradation of the battery capacity (that is why you should store Li-Ion batteries at around 40% charge).
If you set a charging limit equal to 100, this feature will be disabled.

How to activate this feature and set a customized charging limit:
 

1) By downloading and using Trickster MOD or NsTools by setting the customized battery life extender charging limit
2) By using a customized init.d script (the custom value will be always restored after a reboot, if you don't format the system partition)
- Download the script named 15blx
- If the file has been saved with .txt extension (stock browser), rename it by removing the .txt extension
- Edit the file by setting your preferred charging limit (the downloaded script will set the charging limit to 95%)
- Copy the new file inside /etc/init.d
- Give the rwxr-xr-x permissions to the file (read, write, execution for owner, read and execution for group users, read and execution for others)
- Reboot
3) By directly editing the file /sys/class/misc/batterylifeextender/charging_limit (the value you set will be lost after a reboot/shutdown)
4) By using Terminal Emulator (note that set value will be lost after a reboot/shutdown)
- Open Terminal Emulator
- Run these commands (changing the charging limit = 95 with the preferred one)
Code:
su
echo 95 > /sys/class/misc/batterylifeextender/charging_limit

LowMemoryKiller
The LowMemoryKiller driver is used to kill a selected process and free the memory when it is under one of the defined thresholds.
The tuning of the driver could be achieved by means of two parameters exposed by the kernel module via sysfs interface:
 

- /sys/module/lowmemorykiller/parameters/minfree
This file includes a comma separated array of the threshold numbers for minfree memory size (in page units).
The parameter value set for K^Kernel is "2048,4096,6656,9216,14336,19456".
- /sys/module/lowmemorykiller/parameters/adj
This file includes the comma separated array of oomadj factors, if the corresponding minfree threshold has been reached, one of the process with an oomadj greater than this number will be killed.
The oomadj factor is a property associated to each process, its value is in a range from -17 to +15, the processes with a higher oomadj factor will be the first to be killed when a specific minfree threshold has been reached.
The parameter value set for K^Kernel is "0,20,50,100,250,500".

Frandom - Fast Random Generator
As Eli Billauer (the creator of this module) said, Frandom is a Linux kernel random number generator, which is 10-50 times faster than what you get from Linux built-in /dev/urandom. And it uses very little (/dev/frandom) or none (/dev/erandom) of the kernel's entropy pool, so it is very useful for applications that require a handy source for lots of random data.

How to test if frandom builtin module is correctly working:
 

- Download the script named frandom_test.sh
- Using your preferred file explorer, copy the file inside the folder /data/local of your device
- Give the rwxr-xr-x permissions to the file (read, write, execution for owner, read and execution for group users, read and execution for others)
- Open Terminal Emulator
- Run this command
Code:
/data/local/frandom_test.sh
You should see a result similar to this one:

If the urandom tests take more than 1 or 2 seconds and are more different than related frandom tests, then the random number generation is not fully optimized for your currently used kernel...
How to disable / re-enable the redirection to frandom module during boot process:
 

By using Terminal Emulator:
- Run these commands to create the flag file and disable Frandom redirection:
Code:
su
touch /data/frandom_disabled
- Or run these commands to delete the flag file and re-enable Frandom redirection:
Code:
su
rm /data/frandom_disabled
The change will take effect after a reboot.

RAM Console
This feature is useful expecially for development and debugging purposes, when occurs kernel panic / unexpected shutdowns or reboots. Pratically, the kernel messages are also stored inside a little RAM portion and restored during reboot after a kernel panic, inside the file /proc/last_kmsg.


Dynamic FSync
This feature has been developed by Faux123 and allows to dynamically manage the synchronous writes performed on file system (FSync).
It uses asynchronous writes when the screen is on, instead of synchronous writes, to have better performance and a slightly lower battery drain, while when the screen is off the synchronous writes are re-enabled to flush all the outstanding writes and prevent possible data loss.

How to enable/disable the Dynamic FSync (default enabled):
 

1) By downloading and using Trickster MOD
2) By directly editing the file /sys/kernel/dyn_fsync/Dyn_fsync_active and setting 1 to enable the dynamic fsync, 0 to disable it (note that set value will be lost after a reboot/shutdown)
3) By using Terminal Emulator (note that set value will be lost after a reboot/shutdown)
- Open Terminal Emulator
- Run this command to disable the dynamic fsync feature
Code:
su
echo 0 > /sys/kernel/dyn_fsync/Dyn_fsync_active
- Or run this command to re-enable the dynamic fsync feature
Code:
su
echo 1 > /sys/kernel/dyn_fsync/Dyn_fsync_active

Dynamic dirty page writebacks
This feature has been developed by me and allows to dynamically manage the dirty page writebacks with two different intervals, one when the screen is on and another when the screen is off.
It is based on a commit of Francisco Franco, but instead of using hard coded values and of disabling at all the dirty page writebacks while the screen is on (possibility of data loss), I preferred to use a customizable higher dirty page writebacks interval (15 seconds) than the default one (5 seconds) while the screen is on and a customizable default interval (5 seconds) when the screen is off.
By using a higher interval we have better performance and less battery consumption, with a very low risk of data loss.

How to customize the dynamic dirty page writebacks feature (default enabled):
 

Three new procfs parameters are exposed inside /proc/sys/vm path:
- dynamic_dirty_writeback is the activation status of this feature, set 1 to enable it, set 0 to disable it and use the standard behaviour
- dirty_writeback_active_centisecs is the interval for the dirty page writebacks when the system is active (screen on), the default value is 1500 centisecs (15 seconds)
- dirty_writeback_suspend_centisecs is the interval for the dirty page writebacks when the system is suspended (screen off), the default value is 500 centisecs (5 seconds)

In my kernel builds, during boot, I set other customized values:
- an interval of 30 seconds while the screen is on
- an interval of 10 seconds when the screen is off

1) By directly editing one of the file written above inside /proc/sys/vm and setting the preferred value (note that set value will be lost after a reboot/shutdown)
2) By using Terminal Emulator (note that set value will be lost after a reboot/shutdown)
- Open Terminal Emulator
- Run this command to disable the dynamic dirty page writebacks feature
Code:
su
echo 0 > /proc/sys/vm/dynamic_dirty_writeback
- Or run this command to re-enable the dynamic dirty page writebacks feature
Code:
su
echo 1 > /proc/sys/vm/dynamic_dirty_writeback
- Run this command to set customize the two intervals (30 seconds while the screen is on, 10 seconds when the screen is off)
Code:
su
echo "3000" > /proc/sys/vm/dirty_writeback_active_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_suspend_centisecs
The Following 29 Users Say Thank You to Christopher83 For This Useful Post: [ Click to Expand ]
 
Christopher83
Old
(Last edited by Christopher83; 17th June 2014 at 10:43 PM.)
#3  
Christopher83's Avatar
Recognized Developer - OP
Thanks Meter 9238
Posts: 1,237
Join Date: Sep 2012
Location: Milan

 
DONATE TO ME
Special features and sysfs settings (Part 2):

Timer slack controller and dynamic management of the minimal timer slack value
The timer slack controller is a feature developed by Kirill Shutemov and it allows to set the minimal timer slack value for every process contained within a control group (cgroup).
A timer slack allows the kernel to manage processes wakeup requests at some future time.
Thanks to this feature, the kernel can set a specific timer slack for the involved processes, minimizing the number of wakeups and allowing a lower system's power consumption.
For further info: Timer slack for slacker developers

I also implemented a new feature in addition to the above one that allows the dynamic management of the minimal timer slack value.
So, it's possible to use different minimal timer slack value when the system is active and when has been suspended.

How to customize the dynamic timer slack controller feature:
 

Three new cgroup parameters are exposed inside each processes hierarchy contained in /dev/cpuctl path:
- timer_slack.min_slack_ns is the timer slack used when the system is active for the current processes hierarchy
- timer_slack.min_slack_suspend_ns is the timer slack used when the system is suspended for the current processes hierarchy
- timer_slack.effective_slack_suspend_ns is the timer slack currently used

At the moment, the values chosen and used by K^Kernel are the following:
- core processes (/dev/cpuctl), 0 ns when the system is active, 50000 ns when the system is suspended
- foreground apps/processes (/dev/cpuctl/apps), 0 ns when the system is active, 250000 ns when the system is suspended
- background non interactive apps/processes (/dev/cpuctl/apps/bg_non_interactive), 100000000 ns when the system is active, 250000000 ns when the system is suspended

1) By directly editing one of the file written above inside /dev/cpuctl and inside each hierarchy subfolder, by setting the preferred value (note that set value will be lost after a reboot/shutdown)
2) By using Terminal Emulator (note that set value will be lost after a reboot/shutdown)
- Open Terminal Emulator
- Run these commands to set the minimal timer slack for generic and core apps/processes
Code:
su
echo 0 > /dev/cpuctl/timer_slack.min_slack_ns
echo 50000 > /dev/cpuctl/timer_slack.min_slack_suspend_ns
- Run these commands to set the minimal timer slack for apps/processes in foreground
Code:
su
echo 0 > /dev/cpuctl/apps/timer_slack.min_slack_ns
echo 100000 > /dev/cpuctl/apps/timer_slack.min_slack_suspend_ns
- Run these commands to set the minimal timer slack for apps/processes in background and non interactive
Code:
su
echo 100000000 > /dev/cpuctl/apps/bg_non_interactive/timer_slack.min_slack_ns
echo 250000000 > /dev/cpuctl/apps/bg_non_interactive/timer_slack.min_slack_suspend_ns

LowMemoryKiller management of not killable processes
This feature allows to define processes and system processes white-lists filled with the preferred process names and to not be killed by lowmemorykiller, unless it is absolutely necessary.

This feature exposes four new lowmemorykiller parameters:
- donotkill_proc, is the flag to enable / disable this feature for the processes chosen by the user
- donotkill_sysproc, is the flag to enable / disable this feature for the system processes chosen by the user
- donotkill_proc_names, is the list of process names (comma separated) chosen by the user to be preserved from killing
- donotkill_sysproc_names, is the list of user system process names (comma separated) chosen by the user to be preserved from killing

When the lowmemorykiller needs to free ram, it will first kill the processes not included inside the two process name lists chosen by the user.
If there are no more standard killable processes, then it will be necessary to kill one of the processes included inside one of the two white-lists, to prevent system hangs, slowdowns, etc.

How to customize the white lists of processes to preserve from killing:
 

On K^Kernel the feature is enabled by default and the provided processes white lists are the following:
- donotkill_proc_names = "com.cyanogenmod.trebuchet,com.anddoes.launcher,co m.teslacoilsw.launcher,org.adwfreak.launcher,gtp.n extlauncher,android.inputmethod.latin,com.touchtyp e.swiftkey"
this means that Trebuchet Launcher, Apex Launcher, Nova Launcher, ADW Launcher, Next Launcher, stock keyboard and SwiftKey keyboard will be preserved from killing
- donotkill_sysproc_names = "android.process.acore,com.android.phone,com.bel.a ndroid.dspmanager"
this means that the system process, the phone process and DSP Manager will be preserved from killing

1) By using a customized init.d script (the custom value will be always restored after a reboot, if you don't format the system partition)
- Download the script named 80dnkp
- If the file has been saved with .txt extension (stock browser), rename it by removing the .txt extension
- Edit the file by setting your preferred status and processes list
- Copy the new file inside /etc/init.d
- Give the rwxr-xr-x permissions to the file (read, write, execution for owner, read and execution for group users, read and execution for others)
- Reboot
2) By directly editing the files inside /sys/module/lowmemorykiller/parameters (note that set values will be lost after a reboot/shutdown)
3) By using Terminal Emulator (note that set values will be lost after a reboot/shutdown)
- Open Terminal Emulator
- Run these commands if you want to enable the feature
Code:
# To enable this feature for the processes chosen by the user
echo 1 > /sys/module/lowmemorykiller/parameters/donotkill_proc
# To enable this feature for the system processes chosen by the user
echo 1 > /sys/module/lowmemorykiller/parameters/donotkill_sysproc
- Run these commands if you want to disable the feature
Code:
# To disable this feature for the processes chosen by the user
echo 0 > /sys/module/lowmemorykiller/parameters/donotkill_proc
# To disable this feature for the system processes chosen by the user
echo 0 > /sys/module/lowmemorykiller/parameters/donotkill_sysproc
- Run this command if you want to add, for example, Trebuchet Launcher (CM default launcher) and the default keyboard to the processes white list
Code:
echo "com.cyanogenmod.trebuchet,android.inputmethod.latin" > /sys/module/lowmemorykiller/parameters/donotkill_proc_names
- Run this command if you want to add, for example, the system process, the phone process and DSP Manager to the system processes white list
Code:
echo "android.process.acore,com.android.phone,com.bel.android.dspmanager" > /sys/module/lowmemorykiller/parameters/donotkill_sysproc_names

ZRAM module
As explained on Wikipedia, this feature, provided in this kernel as a standalone loadable module, increases performance by avoiding paging on disk and instead uses a compressed block device in RAM in which paging takes place until it is necessary to use the swap space on the hard disk drive.
In few words, the memory pages no more used and so to be swapped are sent to zRam device blocks, compressed and stored in memory instead of disk allowing better performance and also lower memory usage, on the other hand, a little higher amount of cpu is needed to perform compression and decompression of memory pages.
Since we have a device with a low amount of free memory, this feature could be useful to have more free ram.

How to change the size of zRam or to disable it (thanks to @ktulu84 for sharing these scripts):
 

To change the size of zRam (the custom value will be always restored after a reboot, if you don't format the system partition):
- Download the script named 60zram
- If the file has been saved with .txt extension (stock browser), rename it by removing the .txt extension
- Edit the file by setting your preferred zRam size (change SIZE value, default is 100 MB)
- Copy the new file inside /etc/init.d
- Give the rwxr-xr-x permissions to the file (read, write, execution for owner, read and execution for group users, read and execution for others)
- Reboot

If you want to use default zRam size, simply remove the file placed inside /etc/init.d and reboot.

To disable zRam (the custom value will be always restored after a reboot, if you don't format the system partition):
- Download the script named 60disable_zram
- If the file has been saved with .txt extension (stock browser), rename it by removing the .txt extension
- Copy the new file inside /etc/init.d
- Give the rwxr-xr-x permissions to the file (read, write, execution for owner, read and execution for group users, read and execution for others)
- Reboot

If you want to re-enable zRam, simply remove the file placed inside /etc/init.d and reboot.
The Following 25 Users Say Thank You to Christopher83 For This Useful Post: [ Click to Expand ]
 
Christopher83
Old
(Last edited by Christopher83; 11th July 2014 at 09:02 AM.)
#4  
Christopher83's Avatar
Recognized Developer - OP
Thanks Meter 9238
Posts: 1,237
Join Date: Sep 2012
Location: Milan

 
DONATE TO ME
FAQ - Frequently asked questions:

Q: What are the differences between EXUV and UV kernel versions?
A: The EXUV kernel versions have extremely undervolted settings for the cpu frequencies, they allows to have a very low battery drain, instead the UV kernel versions have undervolted settings a bit higher than EXUV versions, but always lower than stock kernel settings.
The EXUV kernel versions could give some problems (freezes, shutdowns, huge lags) on some devices because the cpu doesn't support too low voltage settings.
For a lower battery consumption, I suggest you to try EXUV versions first and to switch to UV versions only if you encounter one of the above mentioned problems.

Q: What are the differences between 396MB, 406MB and 416MB versions?
A: 396MB, 406MB and 416MB kernel versions have different free ram available for user space, with a higher free ram your device will work better with heavy apps, many concurrently used apps, heavy games, etc.
- 396MB versions are more stable, everything is fully working, but you could have some slowdowns with apps that require a high amount of free memory.
- 406MB versions have additional 10 MB of free ram, they are suitable for the users that use the device primarly for calls, messages, simple apps and simple games. The camera, video recording (both 480p and 720p modes) and video playback are fully working.
- 416MB versions have additional 20 MB of free ram, they are suitable for the users that use the device also with heavy apps, various concurrently used apps and games. The camera, video recording (both 480p and 720p modes) and video playback are fully working.

Q: Why should I deactivate KSM (Kernel Samepage Merge)?
A: 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, but 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 and PMEM ADSP heaps, KSM could cause issues while trying to use camera or camcorder and playing HW/HW+ videos.
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 or PMEM ADSP heaps 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.
The option can be deactivated inside Settings -> Performance -> Memory management -> Kernel samepage merging.

Q: How can I get the Performance and Developer Options entries inside Settings menu?
A: Go inside Settings -> About Phone -> Scroll down and tap 7 times on Build number (it's an Easter Egg).

Q: How can I get the log after an unexpected shutdown / reboot?
A: After an unexpected shutdown / reboot of the device, if the problem may be kernel related, you should have the /proc/last_kmsg, if so, send me that log and I'll check it to find the possible cause of the problem.

Q: How can I get the logs when I encounter strange system issues while it's running?
A: Check first if the problems could be related to an app you're using and if you changed something in the last days before facing those issues.
If the problem started after installing the kernel, then let me have you logcat and dmesg:
- Open Terminal Emulator and execute these commands:
Code:
su
dmesg > /sdcard/dmesg.txt
locat -v time -d > /sdcard/logcat.txt
- Open you preferred file manager and go inside the internal sd card partition /sdcard
- Send me the dmesg.txt and logcat.txt files, if you want zip them first

Q: How can I mount a shared Windows folder with CIFS module?
1) By using Terminal Emulator
Code:
mount -o unc=\\\\ip\\share,noserverino,username=user,password=password -t cifs //ip/share /mnt/cifs
2) Downloading and using CifsManager and configuring the new share as follow:
- Share Path = ip/share
- Mount Point = /mnt/cifs/share
- Username = username
- Password = password
- Options = unc=\\\\ip\\share,noserverino

Where:
ip is the ip address of your pc where the folder is shared
share is the shared folder name
user is the user name that can access the shared folder
password is the user password
/mnt/cifs is the mount point (must be created if you'd like to use the command approach with Terminal Emulator)
The Following 25 Users Say Thank You to Christopher83 For This Useful Post: [ Click to Expand ]
 
Christopher83
Old
#5  
Christopher83's Avatar
Recognized Developer - OP
Thanks Meter 9238
Posts: 1,237
Join Date: Sep 2012
Location: Milan

 
DONATE TO ME
Reserved, just in case...


Threads for Samsung Galaxy S Plus (GT-I9001)
K^Kernel 3.4 ION+PMEM ADSP: for KK 4.4 - for JB 4.3 - for JB 4.2.2
K^Kernel 3.4 PMEM: for KK 4.4 - for JB 4.2.2 and JB 4.3
K^Kernel 3.0 PMEM: for JB 4.1.2 and JB 4.2.2 - for ICS
App: Phantom Key Presses Filter

Threads for Samsung Galaxy W (GT-I8150)
K^Kernel 3.4 ION+PMEM ADSP: for KK 4.4

Threads for Developers
Tools: Cross Compiler Toolchains (Linaro GCC 4.9, 4.8, 4.7 and 4.6)
The Following 17 Users Say Thank You to Christopher83 For This Useful Post: [ Click to Expand ]
 
dec0der
Old
#6  
dec0der's Avatar
Senior Member
Thanks Meter 676
Posts: 1,310
Join Date: Mar 2013
Nice one! by the way, is this compatible with CyanogenMod 11.0 (20140616)? Thanks
 
LabBoy97
Old
#7  
Member
Thanks Meter 8
Posts: 72
Join Date: Feb 2014
Can this run on DCM 4.4.3

Sent from my GT-I8150 using XDA Premium 4 mobile app
 
dec0der
Old
#8  
dec0der's Avatar
Senior Member
Thanks Meter 676
Posts: 1,310
Join Date: Mar 2013
Quote:
Originally Posted by LabBoy97 View Post
Can this run on DCM 4.4.3

Sent from my GT-I8150 using XDA Premium 4 mobile app
Yes. Read HERE
The Following User Says Thank You to dec0der For This Useful Post: [ Click to Expand ]
 
SagiTHORus_
Old
#9  
SagiTHORus_'s Avatar
Senior Member
Thanks Meter 32
Posts: 104
Join Date: Mar 2013
Great !! is this kernel TRIM supported ?
Things are always seems impossible until you done it ...
 
farisnanosoft
Old
#10  
Member
Thanks Meter 7
Posts: 68
Join Date: Dec 2012
is the blnv10 supported?

Tags
cm 11.0, ion, kernel 3.4, kk-4.4, linaro gcc
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes