FORUMS

Which OEM Would You Like to Help?

Most manufacturers have moments of greatness and moments of decadence, and in the past few years … more

Root T-Mobile S6/Edge on 5.1.1 Without Tripping Knox

If you purchase phones from a carrier, you may be no stranger to the difficulties … more

IonVR Coming Soon, HTC M9 Dev Edition Gets Android 5.1 – XDA TV

The HTC M9 Developer Edition has received Android 5.1. That and … more

Android 5.1.1 Omni ROM For Motorola Xoom

Back in Feb 2011, the Motorola Xoom became the first device to be sold with Android 3.0 … more

arter97 kernel for Galaxy S3

1,683 posts
Thanks Meter: 10,944
 
Post Reply Subscribe to Thread Email Thread
24th June 2015, 04:03 PM |#3001  
Senior Member
Flag Ha Noi
Thanks Meter: 63
 
More
Info 2 after shutting down the phone : not charged
hi @arter97 : thanks for supporting kerne l. after flash Kernel v4.1 for SHV e210s .
error : after shutting down the phone : not charged. you can fix this error, thanks
 
 
29th June 2015, 04:23 PM |#3002  
animehawk82's Avatar
Member
Flag Madrid
Thanks Meter: 22
 
More
Hey guys.
Can anyone tell me which is the latest kernel version for 4.4.4. Based rom?
29th June 2015, 05:54 PM |#3003  
kazuya_kun's Avatar
Senior Member
Flag Düsseldorf
Thanks Meter: 42
 
Donate to Me
More
Quote:
Originally Posted by animehawk82

Hey guys.
Can anyone tell me which is the latest kernel version for 4.4.4. Based rom?

Just download the latest kernel version, which should be v4.1

Greetings kaz

---------- Post added at 18:54 ---------- Previous post was at 18:50 ----------

Quote:
Originally Posted by huongthanh8690

hi @arter97 : thanks for supporting kerne 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
The Following 2 Users Say Thank You to kazuya_kun For This Useful Post: [ View ]
29th June 2015, 06:39 PM |#3004  
Lord Boeffla's Avatar
Recognized Developer
Flag Potsdam
Thanks Meter: 31,192
 
Donate to Me
More
Quote:
Originally Posted by kazuya_kun


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
29th June 2015, 07:03 PM |#3005  
kazuya_kun's Avatar
Senior Member
Flag Düsseldorf
Thanks Meter: 42
 
Donate to Me
More
Quote:
Originally Posted by Lord Boeffla

... or bootloader version, most likely.

Andi

ah hey andi ^^

can you tell me what to do to fix this? Reflash the Kernel or the ROM or can I download a bootloader that is flashable?
This happened quite some time ago but I didn't really needed to fix it, since my Phone is almost never Off xD

hope you can help us ^^

greetings kaz
30th June 2015, 02:43 PM |#3006  
mikeyinid's Avatar
Senior Member
Flag Nampa
Thanks Meter: 3,635
 
More
Quote:
Originally Posted by agusdallalba

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:
  • 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
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.

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:
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
(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.

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.

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.
The Following User Says Thank You to mikeyinid For This Useful Post: [ View ]
2nd July 2015, 06:11 PM |#3007  
Junior Member
Thanks Meter: 3
 
More
thanks arter97!!! waiting for dual boot cm12 with miui v6 if possible
2nd July 2015, 06:36 PM |#3008  
Senior Member
Thanks Meter: 945
 
More
Quote:
Originally Posted by mikeyinid

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.

Yeah, for some reason vnswap0 did not work almost at all if swappiness was set to any value below the abnormal 130%
I remember that quite well when i had this kernel installed on my S3
3rd July 2015, 01:41 AM |#3009  
Member
Thanks Meter: 4
 
More
With this kernel on gt-9300 and timasek ROM cm 12.1 (latest version from clean install) someone got no working of WiFi?

Inviato dal mio GT-I9300 utilizzando Tapatalk
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes