yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] ihancioglu:
Hi [MENTION=4203114]mrg666[/MENTION],

I think you are using ART runtime. I would like to ask you a question. I just switched ART on my N4 but odex files and .dex files which located /dalvik-cache is still in place. As I read from the blogs explained ART , that files should be translated to .oat files.

Do you know where this .oat files?

Thanks,
[Nexus 4 Original Android Development] mrg666:
The files seem to be still in the /data/dalvik-cache directory. All of the dex files were rewritten after switching to art and i assumed they were converted to art format. Someone correct me if I am wrong.
[Nexus 4 Original Android Development] mrg666:
I have updated the MiRaGe builds in the OP with the following changes

- synced with mainline Linux 3.4.75

- add support for kernel mode NEON and NEON accelerated XOR implementation

- af_unix: speedup /proc/net/unix

- lib/int_sqrt.c: optimize square root algorithm

- net: loopback: set default mtu to 64K

- ext4: speed up truncate/unlink by not using bforget() unless needed

- softirq: reduce latencies

- sync: don't block the flusher thread waiting on IO

- sched: Implement smarter wake-affine logic

- PM / tracing: remove deprecated power trace API

- wireless: remove wext sysfs

- sched: Remove stale power aware scheduling remnants and dysfunctional knobs

This is a very large update and comes with many updates/optimizations. Everything seems to be running fine and I have not heard any problem reports with the test build.

Happy Holidays!
[Nexus 4 Original Android Development] Mercado_Negro:
Thanks. I thought new versions would be packaged in any-kernel zips from now on.
[Nexus 4 Original Android Development] mrg666:
Here are the any-kernel update packages.

http://www.mediafire.com/download/of2bha5sajyzsqe/MiRaGe_mako_kernelup_KOT_122113.zip

http://www.mediafire.com/download/40o6qm9dmad7y5n/MiRaGe_mako_oc_kernelup_KOT_122113.zip

These are fine for now but I want to do a little more work on the install script before switching to any kernel updater.
[Nexus 4 Original Android Development] Mercado_Negro:
Thanks. Good to know you still have it on your plans.

---------- Post added at 01:50 PM ---------- Previous post was at 01:04 PM ----------

Just tried the latest version and apparently this kernel isn't actually good for gaming, too much lag. I was monitoring cores while playing Dead Trigger 2 and they barely ramp up to max freq and most of the time stay at 486MHz, even on high loads, which is probably the cause of these lags. Is this correct? Maybe it's just the way you like it :)
[Nexus 4 Original Android Development] mrg666:
There is no lag that I see here and cpu cores ramp up normally when there is cpu load. See the attached screenshot.

The update frequency of the system monitor is much less than the cpu governor updates. With a sustained load as I apply in the screenshot, system monitor is able capture the cpu frequency at max. The lag on the other hand is related to background processes or specific to the game. Give longer time for the system to settle down after booting the kernel the first time.
[Nexus 4 Original Android Development] Mercado_Negro:
Ok, maybe it's just me but it doesn't happen on Stock, using Slim's kernel or franco.Kernel.
[Nexus 4 Original Android Development] mrg666:
I have added the explanation and screen shot above. A game isn't ideal for applying sustained cpu load. If you want to keep the CPU at max frequency, you can just switch to performance governor (or another kernel of course). With the default interactive governor, CPU never stays at max frequency longer than necessary or unless there is sustained load. Same goes for the additional cores with the autosmp hotplug driver. This is my preference and I will keep it that way.
[Nexus 4 Original Android Development] Mercado_Negro:
It's ok, thanks for the explanation. I'm just sharing my experience with your kernel, no need to get in defensive mood my friend :)

I'm not after sustained load, it's just probably the way you coded the behavior of cores and how much they ramp up that isn't enough for this. The load per core isn't too much which probably doesn't make them ramp up high enough to keep the smoothness of the game.

I think it's not necessary to let it settle in this case because I dirty flashed SlimKat after and ran the game which preformed flawlessly. Then, after playing for 10 minutes or so I flashed franco.Kernel and it also performed just fine. I just wanted to compare different kernels after I saw the way yours behaved.

Just my experience, like I said.
[Nexus 4 Original Android Development] mrg666:
I am not able to follow your post and not really interested in receiving further feedback from you. Please carry your discussion to your favorite kernel thread. Thanks.
[Nexus 4 Original Android Development] Mercado_Negro:
Ok, no problem. You should remove the part where it says "comments, suggestions are always welcome" from the OP. People wouldn't waste their time then sharing their feedback (load isn't too much per core while playing which probably doesn't make them ramp up high enough to keep the smoothness <- that was my comment and suggestion).

Have a nice day.
[Nexus 4 Original Android Development] mrg666:
I have updated the build with one tiny fix by stratosk that removes a warning message in the kernel log. Thanks to sratosk for the fix.
[Nexus 4 Original Android Development] RealSlimShadyMC:
Devs code what they want to code? Don't like it? Go fúck off to another kernel thread. He hasn't "coded anything wrong", this is his preferred setup and he'd be one weak arguer if he changed default behaviour become you had some frame drops in Angry Birds.

---------- Post added at 12:59 AM ---------- Previous post was at 12:57 AM ----------

Thanked by mistake.
[Nexus 4 Original Android Development] mrg666:
I was reading about controlled queue delay algorithm (see the links below) and I have seen that it was implemented in the mainline Linux with version 3.5.

http://queue.acm.org/detail.cfm?id=2209336

https://lwn.net/Articles/496509/

I have backported the CoDel queue management algorithm from the Linux repo and built the test kernels below. If you want to test with me, please give your feedback about the networking performance. It might not make much difference on a mobile device but anyway ... If there are no problems, I will probably keep this.

http://www.mediafire.com/download/n3nvwu66ucybq6u/MiRaGe_mako_test_kernel_KOT_122213.zip

http://www.mediafire.com/download/n28czh62okui8xy/MiRaGe_mako_oc_test_kernel_KOT_122213.zip
[Nexus 4 Original Android Development] RealSlimShadyMC:
Testing right now. I wonder how insanely fast it might get with this and Internet Speed Master TCP patch
[Nexus 4 Original Android Development] mrg666:
Can you give me a link to that patch?
[Nexus 4 Original Android Development] RealSlimShadyMC:
https://play.google.com/store/apps/details?id=com.nezdroid.internetspeedmaster
[Nexus 4 Original Android Development] mrg666:
Thanks! I thought it was a patch for the kernel code. Please let me know how the testing goes.
[Nexus 4 Original Android Development] RealSlimShadyMC:
No probs :) This is a very nice kernel. Not a lot to tweak, not a lot to go wrong ;) Although I am a fan of heavy customisation, I really like your work and will continue to use it until the day the Nexus 4 gets ditched by Google :P
[Nexus 4 Original Android Development] mrg666:
I think/hope we will get one more OS update before getting ditched. After that, I will build the latest AOSP ROMs for another year if nothing happens to this N4 in the mean time. Thanks!
[Nexus 4 Original Android Development] RealSlimShadyMC:
We'll get at least 4.5, or the "L" build of Android. I assume that the "18 months" was a coverup because TI ditched their mobile SoCs, like the GNex's. That's also good to hear, I love the dev community of Nexus devices :D
[Nexus 4 Original Android Development] mrg666:
The new build (and the last for this year) is up with the following changes

- CODEL net scheduler backported and enabled as default

- Ext4 journaling optimization from Linux 3.11

- All of the /dev/random updates backported from Linux 3.13-rc4. Entropy never goes down to 200s anymore.

Happy Holidays and a Wonderful 2014, everyone :D
[Nexus 4 Original Android Development] :
Lovely work, have a wonderful holiday
[Nexus 4 Original Android Development] tvall:
another build? but the last one was running flawlessly.... how much more perfect can you get this thing?
[Nexus 4 Original Android Development] mrg666:
Perfection is a mirage :cyclops:
[Nexus 4 Original Android Development] DontPushButtons:
I see what you did there.
[Nexus 4 Original Android Development] mrg666:
I swear it wasn't me :)
[Nexus 4 Original Android Development] Theasa92:
Thanks

Thanks man !!

I got my Nex4 to run at 1.728 GHz which is awesome !
[Nexus 4 Original Android Development] RealSlimShadyMC:
1.728GHz isn't an achievement, since its actually the stock frequency of the S4 Pro Krait 200 cores, our N4 is under clocked to save power. 1.8/9 or 2GHz is a real achievement ;)
[Nexus 4 Original Android Development] Theasa92:
Yup I realised that a while after posting. I remember 1.9 wa the highest .. Is there any devices running stable at 2 GHz ?

Do you recommend any kernel that can achieve these numbers ? I would love to try!
[Nexus 4 Original Android Development] RealSlimShadyMC:
Neo kernel used to support 2GHz but there's a tiny chance your CPU can handle it. Even 1.9 is starting to push it. 1.8 should be dead easy. Most other kernels, Faux's, AK's, Matr1x's to name a few all support it, but really there isn't much gain past 1.7GHz
[Nexus 4 Original Android Development] Theasa92:
Except for some extra heat ;) .. I wish mirage can push the GPU further .. I'll have to replace it with another for the GPU oomph. As for the 2 GHz thing .. I'll just experiment a while .. See if I have one of the "higher tier" CPUs :D
[Nexus 4 Original Android Development] RealSlimShadyMC:
450-487MHz is the optimal zone for the A320, anything beyond that is heat and battery really. Also, Neo dev removed his 2GHz, although if you wanna experiment, download a kernel, decompile the boot.img and add the extra freq and voltage for it :P I think that's the method, don't quote me, I'm not a dev (yet ;) )
[Nexus 4 Original Android Development] Theasa92:
I'm a Java dev and of course Android :D thanks for your tips man. I haven't played my nex4 since I got it 5 months ago .. GTA san andreas is the one to blame haha
[Nexus 4 Original Android Development] mrg666:
There is a new MiRaGe build in the OP with the following changes.

- update interactive governor from CAF

- update ondemand governor from CAF

- improve autosmp to reduce overhead further

- add LoUIS API for cache maintenance ops to reduce cpu hotplug latency

- remove smd_debug and perf_debug

- several other fixes

Cheers!
[Nexus 4 Original Android Development] tvall:
so... Everyone here is playing card games or watching movies, so i added sweep2wake and doubletap2wake to this kernel. link below if anyone else wants it. sweep2wake works okay. doubletap2wake sometimes doesn't respond for me, and sometimes my touchscreen doesn't respond at all without turning the feature off and back on. dt2w is enabled by default but s2w is disabled (config is at /sys/android_touch/sweep2wake and doubletap2wake). also, this kernel is not supported. it has features mrg doesn't use, so he won't support it. and i am not as skilled as him, so i won't bother

kernel: http://www.mediafire.com/download/mbumeoxjl1ljjo2/mirage-s2wdt2w-20131231.zip

GPL compliance:

patches I used come from bricked-kernel. linux is gplv2 and the new files mention being gplv2 so all these patches should be gplv2 licensed. but i aint no lawyer. to rebuild grab mrg's kernel (I was at commit 1ee4d269da1c1ae9632b15ff2e4f16e26d1844e4) and apply the patches in the below zip in numerical order. it will add 2 config options, enable what you wish.

http://www.mediafire.com/download/dpq4j2vu7y44myo/dt2w-s2w.zip
[Nexus 4 Original Android Development] snak3ater:
^^Lol..i was about to ask about s2w and then saw your post...
[Nexus 4 Original Android Development] mrg666:
Finally! What you have done is very helpful to others who have been asking me spice up the kernel. If you can expand and keep doing this, your work will make it easier to reject those requests for me. Feel free to fork the repo, add more features, rename it, and start another dev thread if you prefer. Though, it is also okay with me if you just want to post your builds occasionally here.

BTW, I have been working on the retention mode of the CPU. When I enable retention mode on CPU0 (first core) at idle state, it is causing flickering on the screen. I am now testing if retention improves the battery life only at suspend state for CPU0. If you have any insights, that would be helpful. Retention seems to be working fine on the non-boot cores at both idle and suspend states but it doesn't have much benefit on battery life with the other cores since they are turned off by autosmp at idle and suspend states. The greatest potential benefit of retention is with CPU0 since it is never turned off.
[Nexus 4 Original Android Development] b00bs:
Why I didn't know this sooner! Thank you for this kernel. It feels like you make a new 'stock' kernel for Nexus 4.
[Nexus 4 Original Android Development] mrg666:
Thanks. Let me know, if you have any feedback after trying.
[Nexus 4 Original Android Development] krialix:
I'm trying to compile your sources but i'm facing with this problem :confused:

System: Ubuntu 13.10 64

Toolchain: gcc-linaro-arm-linux-gnueabihf-4.8-2013.08_linux
[Nexus 4 Original Android Development] mrg666:
It seems that you are not using the toolchain. This is probably the default gcc in your ubuntu system.

Make sure that you are using a command line like the following and CROSS_COMPILE is correct with the directory in which you have untarred the toolchain.

make ARCH=arm CROSS_COMPILE=~/android/android-toolchain-eabi_48/bin/arm-linux-gnueabihf- zImage -j6
[Nexus 4 Original Android Development] b00bs:
No. Everything is smooth and fast as expected :) But I wanna ask something, is thermal throttle removed too? Because when I used 3G and my phone getting hot, it still @1.5GHz.

If that true, what the reason behind it? Thanks.
[Nexus 4 Original Android Development] mrg666:
Thermal throttling is not removed. I am using the kernel based msm code. I have tested and confirmed that it is working. Try to run Qadrant several times one after another you will see throttling.
[Nexus 4 Original Android Development] clockworkstop:
Hello mirage, do you happen to know if your kernel is compatible with an open master build?

Sent speedily from my scurrying Nexus 4
[Nexus 4 Original Android Development] mrg666:
If you mean AOSP build from master branch, it should be compatible. MiRaGe is up to date with the current level of the AOSP kernel.
[Nexus 4 Original Android Development] clockworkstop:
I just tested it, yes, everything is fine. Have you considered adding any sort of gamma control to the kernel?

On another note, I'd like to congratulate you on this kernel, I personally find it very great indeed! Thank you very much.

Sent speedily from my scurrying Nexus 4
[Nexus 4 Original Android Development] mrg666:
Screen adjuster app is working. Is that you ask something different?
[Nexus 4 Original Android Development] clockworkstop:
No, I meant gamma control. You can change saturation, levels of highs, mids, lows of the RGB colors, brightness and a lot more that I'm forgetting. It does not affect battery life or performance at all. I would recommend franco gamma if you are interested.

XDA thread on different gamma control solutions

franco display control app (paid on google play, but he has a thread with the apk for free)

Sent speedily from my scurrying Nexus 4
[Nexus 4 Original Android Development] mrg666:
New MiRaGe builds are up with the following changes

- Retention mode enabled on cores at idle and suspend states. core0 retention at idle is disabled due to flickering on screen. I will keep working on to solve that problem. You can try "echo 1 > /sys/module/pm_8x60/modes/retention/cpu0/idle_enabled" to switch it on.

- ION updates

- PM updates

- cpuclock updates

- reduced logcat size from 256 to 128

Please let me know if you have any feedback/problems; my tests are stable. There is some improvement in the battery life particularly at suspend.

Cheers!
[Nexus 4 Original Android Development] RealiZms:
Love this kernel so far! Just curious if flashing the bionic and Dalvik libraries from Qualcomm would be beneficial?

My only suggestion would be to add PA halfbreed colors... They're nice!
[Nexus 4 Original Android Development] mrg666:
My recommendation is switching to ART. Dalvik libraries are not necessary after that. I would just skip the bionic libraries too.
[Nexus 4 Original Android Development] Flak:
Which rom are you using?
[Nexus 4 Original Android Development] ihancioglu:
Hi Mirage,

Latest links are dead.

Thanks.

EDIT : What do you think about following comment?

http://xdaforums.com/showpost.php?p=49077808&postcount=5949

What is your cpu rev. version? Do you get any benefit at retention?
[Nexus 4 Original Android Development] mrg666:
Everyone, I caught a bug in video recording and fixed it. The fixed builds are in the OP again. Sorry about the hassle but anybody who has flashed today's earlier build need to flash again. Thanks :o

I am using the stock ROM and ART is working flawless for me.

My N4's cpu (and I think all others) is rev 2. I am not sure about the reference to that comment but I am testing to see if there is a difference. It seems to me that enabling retention on CPU0 at suspend state improves the battery life. Enabling retention on CPU0 at idle has a screen flickering problem and I am working on it. Retention on the other CPU's are not making much difference since they are switched off by autosmp when they are idle or suspend state. So, my main concern is making it functional on CPU0. I would appreciate if you can test and let me know your feedback.
[Nexus 4 Original Android Development] ihancioglu:
I will do it for you my friend. we will see battery improvement tonight at suspend state while sleeping. As far as my tests Mirage and moob also tested my me, takes %5-6 on whole night.(Every function closed except mobile signal.That's also limited to 2G) Off the record , at Semaphore kernel same setup takes %0 . Hopefully you will improve this issue.

Did you changed anything on GPU part in the past?(Simple gorvernor, etc.)

Also I found below information at AK kernel. Maybe you want to try :)

Q: How i can resolve problem with overlay and flickering with Kitkat and Jw roms?

thanks to [MENTION=5403224]Targaeryan[/MENTION]:

Code:

go to Developer options and enable "Force GPU rendering" + "Disable HW overlays".
[Nexus 4 Original Android Development] mrg666:
I don't know how to achieve 0%. Even if you remove the battery and left outside the phone it loses charge by itself. But trying to improve anyway :)
[Nexus 4 Original Android Development] ihancioglu:
:) I don't know what he does but that's true. It uses battery of course.But I check the battery level before sleep and after wake up nothing changes :) I think not zero but below one :) I am sure you will improve this kernel so much. You are doing / adding special optimizations to Mirage which not included any other kernels.

EDIT : I am thinking If you solve all of these power modes at idle and suspend states. Maybe you can try without hotplugging the cores. Because as I read on the forum hot plugging procedure already takes a few battery itself :)
[Nexus 4 Original Android Development] mrg666:
You are right that hotplug has a overhead. But that overhead depends very much on how you do it. I have rewritten the auto hotplug (autosmp in MiRaGe) driver to reduce its overhead and latency, backported the workqueue from Linux 3.7 that brought hotplug optimizations, backported the LoUIS algorithm to improve the hotplug cache flush efficiency, applied many hotplug related patches from CAF specific for mach-msm platform. After all these, the battery overhead of keeping all cores online is more than the overhead of hotplug driver. Besides N4 has a quad-core CPU which makes keeping all core online even more expensive. You can try all these by disabling the hotplug driver. Please post here if you try, I am confident that you will turn autosmp on again (echo 1 > /sys/module/autosmp/parameters/enabled).

BTW, the next build will bring a radical change for autosmp which will make it even lighter. I am testing the changes now. I will commit to repo and post here once I am done.
[Nexus 4 Original Android Development] deltatux:
Not sure if this has been answered, but would you consider adding screen colour calibration support into the kernel?

Cheers,

deltatux
[Nexus 4 Original Android Development] RealiZms:
This kernel is a bag of tits!

Been looking for a simple, optimized stock kernel for a while now. Others throw every useless feature you can think of in a kernel, meanwhile they're not stable.

I actually like how your mp-d alternative CAN'T be messed with by the user. It helps establish consistent stability.

Thanks again!
[Nexus 4 Original Android Development] ihancioglu:
Hi Mirage, after all night battery drain is the same as previous from %29 to %23. Hopefully you will find how to goes better sleep.
[Nexus 4 Original Android Development] clockworkstop:
I have about the same amount of battery drain, 7 percent after a 9 hour night. Yesterday I lost 8 percent.

Sent speedily from my scurrying Nexus 4

---------- Post added at 09:44 AM ---------- Previous post was at 09:43 AM ----------

I gave him info on the topic already, he hasn't answered yet. :)

Sent speedily from my scurrying Nexus 4
[Nexus 4 Original Android Development] mrg666:
I looked into gamma settings

. Although it is not useful for me,

I will add it in the next build

since it is a very small and safe patch to add. I couldn't respond earlier since I was busy with the autosmp changes.
[Nexus 4 Original Android Development] tvall:
If you point me to the patch, I could add it to my fork and post it so you can keep your source clean.
[Nexus 4 Original Android Development] anbinhv:
Hi mrg666. Thank you for your work, I like your kernel alot.

What do you think about double tap to wake?
[Nexus 4 Original Android Development] mrg666:
Thanks, tvall. I had already merged the patch please feel free to do the same. I will either remove it or just leave it since it is a small patch and this was a feature originally included previously in the stock ROM. If you are going to maintain the feature rich builds, also feel free to respond other requests before me.

Thanks, I will leave this to tvall.
[Nexus 4 Original Android Development] mrg666:
I have posted the new build of MiRaGe in the OP with the following changes

- screen gamma control added

- autosmp overhauled

I will just copy/paste from the commit message from the repo.

autosmp: use cpu frequency instead of load average

- less overhead for the system without the additional load calculation

by autosmp,

- autosmp needs to work with cpu governor in giving adequate computing

power to system and CPU governor should have the leading role in this

task since it must respond earlier,

- since frequency is a function of CPU load determined by the CPU

governor, autosmp becomes more consistent with the CPU governor when

CPU frequency is used instead of independently calculating the load

average,

- works in better sync with the CPU governor by giving the priority

to increasing the frequency before rushing into hotplugging a core or

dragging the system

- since autosmp follows the CPU governor it automatically adapts when

governor is changed.

Please post if you have any feedback.

Cheers!
[Nexus 4 Original Android Development] anbinhv:
I used last 3 version of your kernel combined with Mahdi's rom. Very smooth, good battery and no issue, I don't know what to feedback, lol.