Hey guys.
Can anyone tell me which is the latest kernel version for 4.4.4. Based rom?
Can anyone tell me which is the latest kernel version for 4.4.4. Based rom?
Hey guys.
Can anyone tell me which is the latest kernel version for 4.4.4. Based rom?
hi @arter97 : thanks for supporting kerne :good: l. after flash Kernel v4.1 for SHV e210s .
error : after shutting down the phone : not charged. you can fix this error, thanks
Do you mean, that charging when the phone is off does not work? I have the same problem but with boeffla kernel (could be xposed or other modding stuff). The problem could be a kernel bug or something related to your phone (apps, settings etc.)
Greetings kaz
... or bootloader version, most likely.
Andi
Since nobody answered my question on how vnswap worked I went on to find out. And I concluded it's not using the MMC at all, at least in CM12.
This is how it works:
I started with the vnswap source code
This is probably the worst piece of kernel code I've ever seen. I'd love to see Linus Torvalds' reaction if Samsung ever tries to submit this to the mainline kernel
As far as I can tell vnswap it's a block device that pretends to be a bigger block device. When there's a write request to it, it builds up a map where each section of the vnswap0 file points to another file you can set in /sys/block/vnswap0/swap_filename. For this to make sense file is should be smaller than or equal to /sys/block/vnswap0/disksize, but it can be anything. It does make sure it's smaller than 1GB, but I don't see why.
This alone can't swap anything, so what's going on? I turns out the kernel has zswap enabled by default. Which according to the official zswap documentation it's an in-memory pool of compressed memory pages, exactly like zram, but dynamic. What I mean with 'dynamic' is that It will use up to /sys/module/zswap/parameters/max_pool_percent of memory, instead of having a fixed uncompressed size like zram. So for examplewhile with zram if there is 500MB of data that compresses to 250MB and you have set a 400MB zram disk, only 400MB of he original 500MB will be compressed, zswap on the other hand will compress everything until the compressed size of the data reaches by default 20% of physical memory. Pages that don't compress well are written to the swap device. However, with zswap the swap device will never be used completely, so it makes sense to use vnswap to 'lie' to the kernel and make it think it has a bigger swap space than what it actually has.
This is how it is implemented:
The vnswap switch in aTweaks ultimately (in source code, this goes to this goes to this goes to this) ends up running /sbin/sswap -s on every boot. I couldn't find a source for this binary, so I ran strace on it. This is what it does:
What it does not do is set /sys/block/vnswap0/swap_filename to anything! There is code to do this in the binary, as that path and /sys/block/vnswap0/init_backing_storage can be found by running the strings command through it.
- Reads /sys/block/mmcblk0/device/name, but I can't tell what for without a code decompiler.
- Opens /sys/block/mmcblk0/device/smart, but this file doesn't exist!
- Sets /sys/block/vnswap0/disksize to 512MiB
- Performs a mkswap /dev/block/vnswap0 manually
- The equivalent of swapon /dev/block/vnswap0 --discard
Running sswap -h reveals a 'Nandless mode'. But sswap -s and sswap -s -r do exactly the same things according to strace.
And this is why I think this isn't working correctly.
Both sswap -s and sswap -s -r (-r for Nandless) act the same and neither set a backing storage file for vnswap0.
Writes to vnswap0 (with dd if=/dev/zero of=/dev/block/vnswap0 bs=4096) are extremely fast (~200MB/s) and throw lots of 'lost page write due to I/O error on vnswap0' errors to dmesg.
After setting up vnswap manually with:
(I figured out the steps from the vnswap source code) I get no I/O errors and writes to vnswap are ~20MB/s as expected from NAND.Code:dd if=/dev/zero of=/cache/swap bs=4096 count=131072 #512 MiB echo -n '/cache/swap' > /sys/block/vnswap0/swap_filename echo > /sys/block/vnswap0/init_backing_storage
So right now vnswap acts exactly like zram, which for me is great, but may be not what @arter97 wanted. I think this happens because the sswap binary is not compatible with CM12, the i9300, or maybe my particular NAND chip. To know if yours is working 'properly' run cat /sys/block/vnswap0/init_backing_storage in adb shell or the Terminal Emulator app. If the second number is 0 then vnswap is not backed by anything.
Yeah, for some reason vnswap0 did not work almost at all if swappiness was set to any value below the abnormal 130%Sorry to bring up old stuff, but I've been researching zswap and Samsungs DHA for memory management and this post comes up in Google searches. You have some very valid points you bring up in this thread, but, I think where you may be wrong is vnswap IS what backs up zswap. If you look through dmsg you can clearly see where it's being set, and that vnswap0 is the swap area set to back zswap. The real secret to utilizing zswap, which is where Samsung dropped the ball, is lowering swappiness and forcing zswap to do what it does, keep compressed pages in RAM.
Sorry to bring up old stuff, but I've been researching zswap and Samsungs DHA for memory management and this post comes up in Google searches. You have some very valid points you bring up in this thread, but, I think where you may be wrong is vnswap IS what backs up zswap. If you look through dmsg you can clearly see where it's being set, and that vnswap0 is the swap area set to back zswap. The real secret to utilizing zswap, which is where Samsung dropped the ball, is lowering swappiness and forcing zswap to do what it does, keep compressed pages in RAM.
Just download the latest kernel version, which should be v4.1
Greetings kaz
---------- Post added at 18:54 ---------- Previous post was at 18:50 ----------
Do you mean, that charging when the phone is off does not work? I have the same problem but with boeffla kernel (could be xposed or other modding stuff). The problem could be a kernel bug or something related to your phone (apps, settings etc.)
Greetings kaz
After fixing minor issues(Wi-Fi on CM ROMs), this project will be abandoned.
This kernel is my very first custom kernel project.
After some general experiences with Android/Linux kernels, I went on making custom kernels for Galaxy S4 LTE-A, Note 3, S5, Nexus 5, Nexus 7, LG G Watch and now Galaxy S6.
During this 1~2 years of period, I learnt what I was doing wrong and what can be better.
A totally new, re-based, reworked kernel with a different name will be under development with ultimate goal "stability".
A lots of features considered unnecessary and dirty will be gone.
Undervolt, Multi-boot, aTweaks(yes, the kernel configurator app), unnecessary CPU governors, intelli-plug, Knock-On(Touchwake), Android logger control, Boost-boot, mDNIe control will be one of them.
It's my own judgement call for reaching out more general users with no weird and funky issues.
Every commits will be reviewed.
Commits which I don't understand that just has a fancy name will also be not applied.
/* Warning */
Redistribution, modifying files used within this project's file or integrating with other projects are prohibited with no exceptions other than my projects.
Making mirrors, re-uploading to another servers are also prohibited with no exceptions.
After fixing minor issues(Wi-Fi on CM ROMs), this project will be abandoned.
This kernel is my very first custom kernel project.
After some general experiences with Android/Linux kernels, I went on making custom kernels for Galaxy S4 LTE-A, Note 3, S5, Nexus 5, Nexus 7, LG G Watch and now Galaxy S6.
During this 1~2 years of period, I learnt what I was doing wrong and what can be better.
A totally new, re-based, reworked kernel with a different name will be under development with ultimate goal "stability".
A lots of features considered unnecessary and dirty will be gone.
Undervolt, Multi-boot, aTweaks(yes, the kernel configurator app), unnecessary CPU governors, intelli-plug, Knock-On(Touchwake), Android logger control, Boost-boot, mDNIe control will be one of them.
It's my own judgement call for reaching out more general users with no weird and funky issues.
Every commits will be reviewed.
Commits which I don't understand that just has a fancy name will also be not applied.