yashsingh1/xdaforums huggingface dataset:
[HTC EVO 3D] mrg666:
LOL

I wish I had seen this earlier before putting that time into optimizing mpdecision. Oh well, it was fun at least.

Edit: I found the reason why auto_hotplug vanished in the oblivion and it is only available from a few resources. See here.

http://thalamus-hacking.blogspot.com/

Apparently, this was another XDA drama that took its toll. Now, I am not feeling like using this abandoned code. I am disabling mpdecision anyway. I think I will work on the existing mpdecision a little more to minimize its footprint/overhead and keep using it.
[HTC EVO 3D] mrg666:
Here is a test release with changes in msm_thermal and msm_mpdecision. I have done substantial changes in both to reduce the overhead on the system and optimize the code. My initial testing is positive and that is why it is now posted as a test build. If there are no problems reported, these changes will be included in the next build with Linux 3.0.85 release. msm_mpdecision is now disabled instead of using min_cpus=2 parameter. When disabled, mpdecision still turns the second core off when the screen is turned off and does the opposite when the screen turns on. Feel free to enable msm_mpdecision.

You can use the following command to enable msm_mpdecision

echo "1" > /sys/kernel/msm_mpdecision/conf/enabled

I have switched to a single temperature phase in msm_thermal driver as the original CAF code since this saves some of the msm_thermal overhead. There was a bug that when msm_thermal was disabled, turning back on was not possible without rebooting. That bug was fixed. (Thanks to showp1984, although I have implemented a different fix)

Download Link:

http://www.mediafire.com/download/vxh44dfgx54ffux1g0/MiRaGe_shooter_test_kernel_841.zip

Please post your feedback if you find any problem.
[HTC EVO 3D] junxracr:
Re: [KERNEL] MiRaGe - for HTC stock ICS ROM - 3.0.68

Works on my EVO 3d with meanrom 2.6. I never had a problem probably because I originally used flash image.
[HTC EVO 3D] mrg666:
I have fixed the delayed reconnect problem with the original WiFi driver by backporting the bcm4329 driver from codeaurora msm-3.0 kernel. The driver from codeaurora did not directly work since AP_ONLY compiler directive required for WiFi tethering gave compile errors. I fixed that as as well. So, hopefully, we can let WiFi sleep now.

I have also confirmed that the 03142013 build of MiRaGe kernel works fine with the latest 2.95.652.5 OTA of VM that upgrades HBOOT to 1.58. Please check the OP for download and repo links and credits.
[HTC EVO 3D] ZWYATT:
Re: [KERNEL] MiRaGe - for HTC stock ICS ROM - 3.0.68

Running great here on the new 2.95 vm rom.
[HTC EVO 3D] mrg666:
Please post if you see anything different with WiFi. Thanks!

_________________

Edit:

BTW, I have merged 3.0.69 commits that has just been released at kernel.org and rebuilt the kernel. With this build, the kernel is not a test kernel anymore and the zip file named accordingly.
[HTC EVO 3D] mrg666:
I added a package in the OP for reverting back to the stock kernel and modules in case they are needed. The boot image and modules are from the latest OTA of VM from March 2013.
[HTC EVO 3D] mrg666:
Here is a test kernel. I have enabled CONFIG_SCHED_AUTOGROUP option to increase the interactive performance of the kernel. You can read more about this feature here. And download the test kernel here. Please post your observations if you are brave enough to test it. :) Joke aside, I am using it on my phone now and it seems to be running noticeably more responsive. Just a note: the kernel was compiled with Linaro gcc 4.6.3 since the latest Linaro gcc caused boot loops when autogroup scheduler enabled. I will try the previous Linaro 4.7 but 4.6 is also fine. Actually, it generates more reliable binary as seen in this example.
[HTC EVO 3D] hossman:
Re: [KERNEL] MiRaGe - for HTC stock ICS ROM - 3.0.69

So don't know if its placebo, but everything seems smoother.

I haven't had any issues with your previous builds, but this new test seems silky.

I've only been running it for an hour or so, we'll see how the day goes
[HTC EVO 3D] mrg666:
Thanks for the feedback. I think config_sched_autogroup is a keeper. I will merge it into my repo and include in the next build, probably when 3.0.70 released.

I was working on adding BFS into the kernel but I will not do this after seeing the result with autogroup scheduler. I know from my previous kernels that BFS gives the same effect.
[HTC EVO 3D] hossman:
Re: [KERNEL] MiRaGe - for HTC stock ICS ROM - 3.0.69

So far so good on the test build
[HTC EVO 3D] pbailey212:
Re: [KERNEL] MiRaGe - for HTC stock ICS ROM - 3.0.69

Test kernel is great on my end too. I'm using it with negalite, I officially have a new favorite combo.
[HTC EVO 3D] mrg666:
Thanks, pbailey. Your endorsement matters.
[HTC EVO 3D] pbailey212:
Re: [KERNEL] MiRaGe - for HTC stock ICS ROM - 3.0.69

You set the bar high with turning the ov in to decent running reliable phone. (which is more of an accomplishment than it sounds like) After put mirage on my phone, I went 6 months with no reason to change roms. (and I was a crack flasher at the time). You cured me of my addiction. Then I relapsed and bought the EVO. Once again I am flashing away, trying to find that mecca that mirage on the optimus v was. Thanks for bringing development to the EVO. You are like my rehab sponser curing my addiction that is referred to as "crack flashing"
[HTC EVO 3D] mrg666:
I appreciate your comments. EVO and OV are very different platforms. I had no hesitation in replacing the OV ROM but EVO is already pretty good with the stock ROM. It is a harder challenge to improve upon EVO 3D/V. That is why I started with the kernel upgrade which gave an overall performance boost and fixed the WiFi bug. My EVO had spontaneously rebooted several times with the stock kernel. But there has been no crashes since the kernel upgrade. Let's see ... there are two other kernel and an app projects in my mind after this one. ROM development for EVO is not that appealing for now.
[HTC EVO 3D] pbailey212:
Re: [KERNEL] MiRaGe - for HTC stock ICS ROM - 3.0.69

I agree, I kind of like sense even.
[HTC EVO 3D] mrg666:
I have uploaded the 03202012 build of MiRaGe kernel with the following changes.

- Autogroup option enabled in CFS scheduler to improve interactive responsiveness

- Enabled performance optimization instead of size with gcc

- Switched to Linaro gcc 4.6.3 for stability (autogroup had stability problems with gcc 4.7)

- Backported latest updates for lowmemorykiller from Codeaurora msm-3.4 kernel

- Synced with Linux 3.0.70

Donwload link, credits are in OP.

Enjoy!
[HTC EVO 3D] mrg666:
There is an updated kernel in the OP. I have backported some important updates from codeaurora msm-3.7 kernel for msm/cpufreq and android/binder. You can see the detailed changes in my github repo following the link in the OP.
[HTC EVO 3D] Alanman13:
Re: [KERNEL] MiRaGe - for HTC stock ICS ROM - 3.0.70

Flash gui tells me it cannot remove the signed boot.img. I'm not sure what's up. Rooted and have cwm touch recovery.
[HTC EVO 3D] mrg666:
I would check if Superuser is giving permission to Flash Image GUI.
[HTC EVO 3D] Meowdib:
Wow, everything is super fast. Liking this kernel.

Any way to implement sweep2wake feature?

Edit: seriously, wtf. How come scrolling through Instagram, Bacon Reader, Youtube and others is so smooth now, Used to lag. So impressed with the magic patch.
[HTC EVO 3D] bigwillyg:
Re: [KERNEL] MiRaGe - for HTC stock ICS ROM - 3.0.70

@mrg666, so the final word on the patch is that you had to go back to linaro 4.6.3 in order for it to boot? We're you able to make any progress on that or no? You caught my interest with that patch.
[HTC EVO 3D] t3khe4d:
did default freq get bumped to 1.7 ?

snappy :good:
[HTC EVO 3D] johnnyslt:
mrg666, I've found something that you might be interested in : https://git.linaro.org/gitweb?p=peo...ff;h=c756b82a0604b7e9a9943955e169758c1919ac83 its related to CPU management
[HTC EVO 3D] mrg666:
Thanks! This is interesting and it would be good to add but I suspect we will need to update CPU PM system as well. I am also not sure if the interactive governor will work with this cpupower driver. It might be needed to switch back to ondemand and update it as well. It is not that hard to try just plugging it in and see what happens. I will do in the next testing cycle. I am now testing 3.0.85 build before updating the stable build by the end of this week. BTW, did you check the mpdecision modifications in my repo? I would be happy to hear if you have any feedback.

No I didn't bump the default freq to 1.7. Thanks for the initial report. Did you try turning mpdecision on?
[HTC EVO 3D] t3khe4d:
no, just shut off any tweaks i had [MENTION=434273]boot[/MENTION] flashed rebooted few times and it comes up @1.7 so thought I'd ask.
[HTC EVO 3D] pbailey212:
It was set at 1.7 when I flashed the latest build as well, no big deal, just had to turn it back down a notch
[HTC EVO 3D] mrg666:
I have rebuilt the test kernel making sure the default frequency is 1.5 and updated the download link. Thanks for the heads up. This is the second time I am making this mistake :p
[HTC EVO 3D] t3khe4d:
I dunno, maybe it's me, but I've DL'd this three times and it still comes up @ 1.7, prior build is fine but whatever is at the end of this link is 1.7 for me, also when adjusting it reverts back.

strange?
[HTC EVO 3D] mrg666:
I have just fixed the problem that I had introduced in msm_thermal with the previous commit. Damn! it was such an obvious mistake.

I have deleted the test build now and I will upload the next stable MiRaGe build very soon. I think we fixed the only problem found during testing now. I appreciate your help with testing. :good:
[HTC EVO 3D] mrg666:
The new stable MiRaGe build is available in the OP now.

Changes:

- Linux 3.0.85 patch

- msm_thermal: fix enable/disable bug. (thanks to showp1984)

- msm_thermal: revert to single phase temperature check for simplicity and less overhead

- msm_mpdecision: many changes, fixes, optimizations. msm_mpdecision is disabled by default but still works only for switching the second core on and off with the screen.

Please see my repo for the details.

Enjoy!

Edit: you can enable msm_mpecision if you want, see OP.
[HTC EVO 3D] poondog:
Hi, no idea what I'm doing here but I'll add input anyway :)

On Franco kernel on Nexus 4, the thalamus driver was used for a while and Fransisco was making changes to the driver. There were many changes and it was basically butchered, up to a point where thalamus was fed up and decided to take it to twitter etc to tell people how he didn't like the modifications to his code

So, fransisxo wrote his own hot plug driver called mako_hotplug, which you can find in his mako (nexus 4) repo under drivers/cpufreq or something. It works great on nexus 7 as well (tegra 3) and is being improved constantly so if you guys are looking for a nice simple and not 'abandoned' driver you might want to look here

Obviously its no use on my single core incredible s but I'm looking at adding it to my future one kernel

Okay back to incredible s and one sections bye :)
[HTC EVO 3D] mrg666:
Hey, thanks for stopping by to give the information. Since the current modified mpdecision is working fine for my purpose only for scroff single core function, I might not change it but it is always good to see the alternatives. I will check mako-hotplug code.

Anyway, good to see you around here.
[HTC EVO 3D] poondog:
Okay, it seems that the latest mako_hotplug keeps two cores online when the screen is on, and on lines more if needed. I guess then it behaves the same as having nothing when you guyys have screemm on, being dual core. Wouldn't responsiveness and battery be best with two cores on when screen is on? Cause it takes a fair amount of energy to hotplug cores, would it be safe to say that the energy saved having a core offline is used anyway when the cores are hotplugged?
[HTC EVO 3D] mrg666:
That is exactly what we have discussed earlier in this thread and our tests showed that keeping the two cores online while screen is on is the best option regarding responsiveness and battery life. With the default settings of mpdecision in this kernel, the second core only turns off when the screen is off. Enabling mpdecision when screen on is still possible via sysfs.

EVO 3D has a dual-core CPU. I haven't used a quad-core CPU yet. I can only estimate based on my experience that it would be best to keep minimum 2 cores on when screen is on and only one core on when screen is off regarding battery life and performance. Because I think that 3rd and 4th cores will not be needed frequently when screen is on. So hotplugging the 3rd and 4th cores would save energy without much impact on responsiveness.
[HTC EVO 3D] mrg666:
I have done an extensive revision of msm_mpdecision. I have re-coded all of the key functions and removed quite a few others to reduce the overhead and increase efficiency. There were several redundant/dysfunctional features that are fixed or removed.

If you want to see the details of the changes please go to my repo and check the commits. Or you can check the code after revisions and before revisions following the links here.

The next step in my improvement plan is load calculation but I wanted to complete testing of the extensive changes before modifying the code further. I might change the name of the code after this final step to avoid confusing with msm_mpdecision.

Here is a test kernel with the revised code if you want to help with testing. Mpdecision is enabled by default with this kernel. If the feedback is positive we can keep it enabled from now on.

Due to heavy modifications I have done, kernel tuner will probably fail detecting this as mpdecision. If you want to disable mpdecision you can either flash the previous kernel version or use the following command.

echo "0" > /sys/module/msm_mpdecision/parameters/enabled
[HTC EVO 3D] cupliz:
Ive used this test kernel for 8hr...

No panic, no lag, no restart for playing minion rush 2hrs nonstop, idk about mpdecision...

Gratz

Edit:

Restart at 12:50 gmt+7

While hard browsing, and using youtube....

Sent from my PG86100
[HTC EVO 3D] mrg666:
Thanks for the feedback. Please also report if there is any difference in battery life.
[HTC EVO 3D] busventinc:
Used the test kernel on negas v1.1.1 and when I rebooted it activated my 3d function I installed through 4ext and also wiped cache + dalvik so rebooted back into recovery flashed your kernel version before test kernel and all was well I am on latest firmware and jbear 1.50 hboot I did not get a logcat cause I flashed back to the kernel before test got scared that my 3d functionality broke going to reflash with image GUI and see if it happens again will report back.

---------- Post added at 07:00 PM ---------- Previous post was at 06:30 PM ----------

Update: flashed with IMG GUI and all is well did not start my 3D funcionality :thumbup:
[HTC EVO 3D] mrg666:
Can you explain "activated my 3D function"? There is no graphics related change in the test kernel.
[HTC EVO 3D] busventinc:
Once the test kernel was flashed in 4ext I wiped cache and dalvik when I rebooted the 3 D functionality was on meaning the whole ROM was on 3D mode while my switch for 3D mode was off what I did was rebooted in recovery flashed your previous kernel and it went back to 2D again why i do not know but when I tried to flash a second time now with IMG GUI it remained in 2D mode..
[HTC EVO 3D] mrg666:
This looks like a ROM specific problem. BTW,

you don't need to wipe cache and dalvik-cache if you are only flashing the kernel

. Don't do it next time if you want to avoid such problems. Problem probably happened due to wiping and some sort of setting was lost, I am just speculating. Please check with your ROM developer if you want.
[HTC EVO 3D] coal686:
Nega uses the 3D boot animation and so he has a setting to turn off 3D after boot in the post boot script (or init.d, I can't remember). Something must have caused that to not run, leaving your 3D on. I think you can turn it off manually by going into the camera app and toggling the 3D switch.
[HTC EVO 3D] busventinc:
Thanks for The info coal I appreciate it...
[HTC EVO 3D] mrg666:
I have updated the MiRaGe kernel with the following changes

- Linux 3.0.86 patch applied

- msm_mpdecision has been revised. I have recoded all of the main functions to reduce overhead and increase efficiency. It is now enabled by default. enable/disable is done with /sys/module/msm_mpdecision/parameters/enabled file by writing 1/0 respectively. I use ES File Explorer to do this.

- backported the latest rq_stats from CAF msm-3.4 kernel which is used to calculate the load averages by msm_mpdecision

- updated kernel/power code from CAF msm-jb_chocolate

- updated bcm4329 wifi driver from CAF msm-jb_chocolate

- updated bcmdhd wifi driver from CAF msm-jb_chocolate

- updated genlock code from CAF msm-jb_chocolate

- backported two important cpufreq updates to avoid possible deadlock due to race between cpu governor and mpdecision

Enjoy!
[HTC EVO 3D] t3khe4d:
will give wirl...

Last kernel 3.0.85-0703 batt stats

Mi gringo ses

Mucho grassyass :thumbup: :beer:
[HTC EVO 3D] mrg666:
De nada! mi amigo
[HTC EVO 3D] t3khe4d:
i notice no control in KTuner or ATuner for mpdecision as you said, will this be a permanent thing?
[HTC EVO 3D] mrg666:
From the perspective of those tuner apps, I only removed one or two useless sysfs parameters and moved one parameter at another, but very obvious, place. Using ES File explorer, going to /sys/kernel and /sys/module is just a couple of taps for me. This is not more difficult than opening the tuner app and following the menu system. And all of the parameters are accessible there without the baggage of extra apps.

This is my suggestion for now. I wouldn't go back to previous code just to be compatible with a couple of apps I don't use. I also don't think the developers of those apps would care to fix their code to make flexible with slightly different parameter sets. But let me see if I can do something without wasting the effort/time spent for the improvements or giving up the gains.
[HTC EVO 3D] mrg666:
I did quite a few changes in the repo, here is the test kernel with the following changes

- Compiled with the latest linaro 2013.07 gcc-4.8.2. It seems that the initial problems are resolved and kernel is stable so far for me.

- Removed unnecessary statistics from mpdecision to improve the efficiency further

- backported workqueue from Linux 3.6.11 to improve the latency of cpu

hotplug events. See my repo for details and the following link

https://wiki.linaro.org/WorkingGroups/PowerManagement/Doc/Hotplug#Workqueue

- added latest patches to interactive governor from Google AOSP 3.4 kernel

- added latest patches to row scheduler from CAF msm-3.4 kernel

The download link is below. Please post your feedback since this is a test kernel.

http://www.mediafire.com/download/qqkp999maeb4uuz/MiRaGe_shooter_test_kernel_864.zip
[HTC EVO 3D] meatfest1974:
...I'm already a big fan of your 07132013 build (with Negalite's ICS ROM), so I can't wait to try this out!
[HTC EVO 3D] mrg666:
Thanks for the comment. The test build is about improving the efficiency of cpu hotplug events while using mpdecision to get better responsiveness and battery life. Mpdecision has been disabled until the improvements in the previous build. The test build has additional optimizations in both mpdecision and also kernel services (workqueue). Please post if you see any problem or improvement with responsiveness and/or battery life.
[HTC EVO 3D] mrg666:
Here is the next test kernel before I post the next stable build on Sunday if the tests go well. I have completed the last step of my mpdecision overhaul project with this test kernel.

As I posted earlier, my final step of optimization was going to be with the load calculation of mpdecision. I only inserted a workqueue update to improve cpu hotplug latency before this step, which came with the previous test kernel.

The userspace mpdecision uses a special code called msm_rq_stats to access the load averages. The original purpose of msm_rq_stats is enabling userspace access to rq_stats and comes with the overhead of additional spin/mutex locks and sysfs facilities. However, kernel-based mpdecision has been still using this code to obtain cpu load averages while using a tiny fraction of the code. I have completely eliminated msm_rq_stats code and added a very simple rq_stats direct-access capability in msm_mpdecision. It seems to me that there is a noticeable improvement in the responsiveness of the kernel with the eliminated overhead. It would be great help if you can test and post your feedback.

http://www.mediafire.com/download/wbt5wzhvk4lwt5d/MiRaGe_shooter_test_kernel_873.zip
[HTC EVO 3D] mrg666:
There is a new stable build of MiRaGe available in the OP with the following changes.

- backported workqueue from Linux 3.6.11 to improve the latency of cpu hotplug events.

- Removed unnecessary statistics from mpdecision to improve the efficiency further

- Implemented a simple direct rq_stats access in msm_mpdecision and eliminated msm_rq_stats completely to reduce the overhead in load average calculations

- added latest patches to interactive governor from Google AOSP 3.4 kernel

- added latest patches to row scheduler from CAF msm-3.4 kernel

- Linux 3.0.87 patch (will be released tomorrow, still rc1 as of today)

I already see a noticeable improvement in both responsiveness and battery life. There was one report by mobstergunz of freezing problem with the test build and it was again due to using gcc 4.8 based experimental Linaro toolchain. I have reverted back to stable gcc 4.7 based Linaro toolchain used with the previous builds.

See my repo for the details

A couple of remarks with this build.

- I feel that this kernel project is pretty much done now and I will switch to maintenance mode. There will be one last build next week (or when Linux 3.0.88 is released) to wrap up the project and mark the final release. There are no problem reports from users anymore which means that I need to find another project to annoy people. :D

- I will move to 3.4 kernel after the next final release and probably return to the JB ROM project I had left half-done some time ago.

- msm_mpdecision in MiRaGe kernel is now almost completely rewritten. Maybe it would have been better changing the name to something else to avoid confusion since there are already reports that kernel tuner apps are not recognizing it anymore. This is normal since it is not the same msm_mpdecision anymore. I haven't changed the name for two reasons: one - out of respect to the original developers, second - making it still possible to do a drop-in replacement for the other developers who might want to use it.

Enjoy!
[HTC EVO 3D] ejc1214:
Thank you for all your work.

Question, Is anyone having issues with bluetooth? Mine is kind of acting up from time to time. Seems like voice dialer has a hard time starting up and sometimes it shows it's starting up and I have to hit back on the phone and click on my device to get it going. Sometimes I tell it to dial someone and it does but drops my connection and switches to phone. Voice dialer not consistent..
[HTC EVO 3D] mrg666:
That sounds more like a problem with the app rather than kernel. Can you please revert back to the stock kernel and verify that problem only happens with MiRaGe? If you can verify this, I will check it out.
[HTC EVO 3D] ejc1214:
It might be. I will have to find one as I got a new OC and lost my copy on the other PC. I suspect that is the case but not sure. You don't happen to have one laying around somewhere do you? It's no big deal if you do not. I will do a search and I should be be able to find it.
[HTC EVO 3D] mrg666:
If you mean the stock kernel from stock ICS ROM, it is available in the OP.
[HTC EVO 3D] ejc1214:
Loaded the stock kernel and so far so good. Will give it a couple of days to see what happens.