yashsingh1/xdaforums huggingface dataset:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
Whoa! That's some kind of very very useful analysis!

If I may, i have a hypothesis. You see, Android N migrated to that JIT/ART hybrid compiler, which does not provide the same level of performance as ART on Android M - save for a fully AOT flagged one. So when OnePlus saw that Android N actually lowered the scores (even if it is marginally regressed), which will put them in somewhat critical situation when users see that benchmark scores regressed with an 'update', they had to make the cheating mechanism more aggressive in benchmarks to level out the suggested performance regression by the benchmark scores. But since this violates dozens of rules, they couldn't release the offending code of that more aggressive cheating.

As for how they cheat, it is another story. With the aid of a root explorer, you see some scripts in /system/vendor/etc with some task PIDs or strings followed by specific changes to some certain CPU Governor settings. These scripts are coordinated by the perfd binary in data/system IIRC. This way, it switches to more relaxing mode in benchmarks when the apps are launched. As for thermal policies, [MENTION=3637908]kairi_zeroblade[/MENTION] can elablrate more :)
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Thanks again to [MENTION=5060769]Mostafa Wael[/MENTION] for that interesting summary. I'm not a ROM guy, so this was all news to me!

Anyway, I just thought I'd pop in to drop a minor update: https://goo.gl/MgxgDB

It may interest some people as it's been built with the newly released linaro 6.3.1 (read the release notes here) and I've added a couple of commits from cyanogen that I spotted in SlimROMs' repo that you can read in my git log when I push it in a minute...

Just a note to say thanks to everyone again for the support. It's been an easy thread to maintain and there have been so many valuable insights from other members. N5 has been the most downloaded version so far, and the thread has been very quiet, which I always take as good news!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
I was never a ROM guy. I am a guy who likes to take his time to read and break down things :)

Please helping you :good:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] _InoK_:
bedalus, excellent kernel mate! :svetius: Thank you very much for your great work from all russian users! You're the best! :cool:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Thanks very much! I saw a lot of downloads from Russia!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] habylab:
I'm back testing this kernel after a couple of weeks testing other kernels. Smooth as silk.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
if we had Moxie kernel on LOS, it would have been easier for me to collaborate more...:rolleyes:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Ah, I wish I could find the time. I'm happy with the OEM android experience, but who knows... in the future I may switch over.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
The thing is OOS does not make my phone as healthy

plus OOS sorta got strayed away from the AOSP feel...
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] habylab:
Just had a crash whilst doing very little, log here: https://drive.google.com/file/d/0ByXk2q1AWVVpYzk5UVcwVjl5djA/view?usp=drivesdk.

Not sure how useful this is, haven't had to provide a log in a long, long while.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Did the phone hard reboot, i.e. reboot to the bootloader menu?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] habylab:
No, the phone completely froze and I had to reboot it myself. I had this again this morning, and a soft reboot as well... Not sure why. Can you see a cause in the logs?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I can't, but admittedly I'm not very good at interpreting the OS logs. At any rate, I've set the kernel build to be as high performing as possible, so nearly of the kernel debug logging is disabled, so even if this is a kernel error, it'd be nearly impossible to identify why. Try another kernel and see if the problem goes away?

I don't think this is a kernel problem, but I can't rule it out either. Let me know how you get on!
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] habylab:
I tried another kernel and the same thing happened. bizarre. In the process, IO fsync was disabled so I lost my Nova settings.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Shuvo_bd:
I had a crash this evening too. Phone didnt reboot. Just Phone is not responding msg popped up and phone stopped working for few seconds. I flashed this Kernel yesterday and completed full cycle. Battery is draining like hell. Android system is draining all the juice. I only got 1..5 hours SOT :(
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I'm going back to marshmallow :D
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
Very very strange how this phone behaves on Nougat ROMs...

Looks like OnePlus lost a lot of its PA devs it seems...

OOS Nougat is terribly not refined

LOS Nougat is total chaos, more like devs on steroids

I am really struggling what should i use... :rolleyes:

And really it is not that easy to just abandon ships and roll back to MM. Got so used to N's features and aesthetics (even if i don't agree with some of the latter)
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Haha I was only joking. I was already back on Marshmallow when I posted that :p
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] liam_davenport:
7.0 is a mess it's the same across all devices. 7.1.1 fixes most of the issues don't know why OP still hasn't pushed it yet...

Performance is much better on 6.0.1 on OP3
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] habylab:
Not just me, phew! Although, that battery life is pretty bad.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I'll stick with M until they release that. I need a consistent platform or I can't judge what impact my changes are having
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] habylab:
It's a shame, as I'm sure your kernel is great. Seems very smooth.

I'm using Franco's now, and it seems like such a good balance. Smooth, but great battery life. It's odd how a few of us have had issues with your kernel. I think it must be Nougat.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] kash296:
It's definitely Nougat. I rolled back to MM with a really heavy heart. Hope One Plus does something about it, i don't think other devices have this issue.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] liam_davenport:
The best way to get everything from your work is Pixel no one does Android or source better then Google
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] saayuj98:
Exactly my point! I'm back to MM again. N for OnePlus feels terribly unfinished/rushed work.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] liam_davenport:
yup 100% rushed I'd of rather waited a bit longer and they put 7.1.1 out but looks like they're slacking again -_- Look of state of OPT also still no 7.0... I feel like they will abandon OP3 when next device comes but it sucks a great kernel is overshadowed by ****ty software :crying:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
Well I must credit OnePlus for bringing the Nexus grade of activity again, despite the death of the Nexus brand. It is like OnePlus resurrected the Nexus brand via its OnePlus 3

Like Galvatron and Megatron ;)
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] liam_davenport:
I came from Nexus 6/6P to this device OnePlus will never be on the same level as a nexus ever. Only thing they are good for is warranty while unlocked

Nexus isn't dead just a rebrand to pixel nothing as changed like source etc
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
I meant this year. Pixel's forum are literally deserted, according to many devs i hear from. Yes i know we aren't there yet, but we are very comparable with the Nexus forums here (i think)
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] liam_davenport:
Only reason Pixel forums are dead is because of the price Pixel XL is almost double the price of 6P not alot of people can afford to upgrade every year, Judging by work we have 1000 identical CM roms and 60 different twrp img's other then that not alot is going on over here

Sorry for the OT :eek:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Ashtrix:
If you don't mind could you shed some more light ? Thanks !

Also I've had Galaxy Nexus & at that time the development at XDA was at the Apex position so much of changes across Android and really amazing time it was Faux, Morfic, Ezekeel, Imoseyon, Franco, AK and other new budding devs- The PA team & Osmosis also started their journey there, Now Ziyan brought the N to the Gnex also OMAP left the SoC causing a massive issue with it's GPU but due to the Open source developers from OMAP / Panda Board, Gnex devs had successfully built an entire new Driver for it's GPU subsytem engine for the PowerVR chip. That's the power of Open Source. I missed a lot of Nexuses from then But finally I thought I've seen the daylight with OP3 It is still but It's loosing it's charisma and brightness overtime quickly due to the profit hungry corporates/ OP3t....

Sad to see Nexus being transformed into something that's doesn't share the Liberty like previous Era of Android (A/B system, Proprietary SystemUI with Huge price tag).

Hoping for the best nonetheless, thanks to all OP3 devs for bringing the love back :cowboy:

Just wanted to share my feelings too, Sorry Bedalus If it had deviated too OT.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
That is a speculation, nothing more than that, unless there is someone to confirm that speculation of mine. :)

You're welcome any time :highfive:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I might throw my two cents in some other time, but for now, anyone who's back on (or never left) marshmallow might appreciate this:

Edit: had a reboot so link removed, sorry!

It's the same marshmallow kernel with some further debug stuff disabled, F2FS enabled, and rebuilt with the latest linaro toolchain. I'll have to push the commits some other time since I'm shattered, but essentially, here are the changes:

CONFIG_HAVE_64BIT_ALIGNED_ACCESS=y
CONFIG_INET_DIAG_DESTROY=y
# CONFIG_MSM_BA_V4L2 is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
# CONFIG_MMC_TEST is not set
# CONFIG_MSM_CACHE_M4M_ERP64_PANIC_ON_UE is not set
# CONFIG_MSM_TZ_LOG is not set
# CONFIG_OEM_TRACE_SUPORT is not set
# CONFIG_EXT2_FS is not set
# CONFIG_EXT3_FS is not set
CONFIG_EXT4_FS=y
CONFIG_EXT4_USE_FOR_EXT23=y
# CONFIG_PRINT_QUOTA_WARNING is not set
CONFIG_F2FS_FS_SECURITY=y
# CONFIG_DEBUG_INFO is not set
# CONFIG_BUG is not set
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
didn't notice the second bold'ed line of yours.

LOS is chaos now since they do so much changes recklessly in short period of time, which can be tolerated to some extent since this is the nature of nightly builds since the start of CM. But when you see them suddenly rebasing almost all their repos on CAF, mess up with their repos and instantly revert all their commits (that sudden roll back to 3.18.31 instead of the 3.18.47 IIRC, which involved reverting all security commits), then this is a disaster. I am not expecting seamless progress every nightly build, but such enormous changes should be somehow managed better and not that chaotically not arranged. This actually does more harm than good to devs, even themselves.

feels like LOS is ruled by a bunch of fully free teenage developers with a dozen of Red Bull cans on their desks working full-time. And that is not a good as it sounds...
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I'm still working on a refreshed M kernel. The first attempt a few posts up crashed on me, so I had to try to figure out what config option caused the problem.

I believe CONFIG_DEBUG_INFO=y is a necessary setting, but I'm not sure why this would cause a random reboot. Any ideas anyone?

EDIT: also note to self: 'UPSTREAM: arm64: drop unnecessary cache+tlb maintenance' appears to cause a performance regression, but may not be the only commit responsible.

EDIT2: Here's the full list. Not sure if these are all in N, but any that are need to be weeded out:

UPSTREAM: arm64: mm: Adopt new alternative assembler macros

UPSTREAM: arm64: drop unnecessary cache+tlb maintenance

BACKPORT: arm64: use PC-relative reference for secondary_holding_pen_release

arm64: kasan: fix issues reported by sparse

arm: mach-msm: Enable ARCH_WANT_KMAP_ATOMIC_FLUSH for all msm

soc: qcom: msm_power: add msm_power driver
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
New v10 Marshmallow kernel: v10 removed

If you want v11, please go here: https://xdaforums.com/showpost.php?p=71306804&postcount=519

- Used some of the config options I developed for my uninspiring N release and managed to shrink it down to it's smallest ever size!

- Figured out what was causing the instability.

- Figured out what commits I need to revert in the N branch (will sort this out when Oneplus drop the next N ROM.

- Patched up to linux 3.18.48

- Brought in a large number of commits from ARM (check my github for the complete list)

- Disabled some more debug logging

Should be useful for anyone still on, or back on Marshmallow
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] FriendWithin:
Gonna try this on Sultan ROM. Thank you so much for keeping Marshmallow alive. Props to you.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] liam_davenport:
For OOS only bro don't use on CM
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] S4turno:
You shouldn't use custom kernels with Sultan's ROM. He modified his ROM a lot...
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
It's for stock ROMs only I'm afraid, if you already flashed this just dirty flash Sultan's ROM to restore the original boot image.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] FriendWithin:
Yeah I learned that the hard way. Thanks anyway though! I'll switch to OOS marshmallow soon
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] SREEPRAJAY:
[MENTION=6295391]bedalus[/MENTION] I am planning to follow you too...MM

Have you any specific ROM or just plain stock 3.2.8??
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I'm using [MENTION=5767887]NevaX1[/MENTION]'s Freedom OS v1.7 (still on his server). Absolutely brilliant installation experience and no problems at all.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] liam_davenport:
I was talking about no 7.1.1 yet and here we are :good:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Scarface1991:
Isn't that Hydrogen OS?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] liam_davenport:
Yeah, OOS will follow very shortly hopefully with source so we have something to play with
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
Good stuff, but looks like the kernel has not seen much love, still on .31
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] liam_davenport:
Isn't the kernel in Android behind. Shouldn't we be on 4.x by now?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
IMO yes. Also I remember reading somewhere that the next HTC Flagship (which will be powered by the new S835) will ship with a 4.4.x kernel
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] habylab:
Nice, that'll be decent.

Hopefully OP do that but I'm sure someone like HTC has more time and resources to invest in that.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
Guys who can hire PA devs, should be able to do the same
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] fanbogo:
Lolz, yesterday i went back to mm. I just hate 7.0 one big bug without option to fix it. Now I got xposed and life is much easier :)

Freedom 1.7 is epic
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] habylab:
They've left those, mostly.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
Yes, and that's why OOS 4.0+ UI sux
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] habylab:
I'm more concerned about the battery and speed! If they just release the camera binary, we would be away.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] abhibnl:
Off-Topic post:

Really? OP has fired the original PA developers they hired?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Stroky:
Hm for me everything is running fine on nougat.

Battery is good and the phone feels fast as well.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
why don't you say they left on their own?
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] abhibnl:
I wouldn't assume that. It's highly unlikely. A bunch of young devs losing full time job time because they don't want to do it? But lets see, what future holds in terms of updates and bug-fixes.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] liam_davenport:
Going from a custom rom built in spare time to developing an OS for a company is a big jump especially when you have deadlines etc also 1+ don't have a huge software team I can see it been very stressful work but software engineers bounce from company to company. Say if they happen to lose a job someone else will pick them up asap
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] abhibnl:
That's some interesting point. But right now i am more excited about Gameloft releasing Modern Combat Versus that 7.1.1 on OP3, lol.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] saayuj98:
FYI [MENTION=4898097]arter97[/MENTION] did port 4.4.x kernel on our OP3. Make sure you follow him on Twitter. It's not stable yet for daily usages, it was a old news tho. I don't have any idea now.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] liam_davenport:
Yes I follow him on twitter ;) But we was talking about offical support :good:
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] saayuj98:
Official support? I don't think that's coming any soon. Most OEM's leave the kernel version as it is. If the phone is released with 3.4.x it will stay on 3.4.x Upstreaming to new kernel is mostly unnecessary. Newer kernels often brings recent hardware support only. Not 'new' features or a boost in performance. If performance or bugfixes are concerned, we can always backport from mainline which can be pita sometimes lol.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] Mostafa Wael:
I believe now it is necessary. Outdated drivers won't help with the security at all amigo. So there must be something to do about it. Also arter97 seems to have that project dropped now I think.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] saayuj98:
Drivers for OnePlus devices are provided by OnePlus only. We can backport and merge minor/important security fixes and fix up some bugs from CAF sources and that's it pal. Like I said earlier, upgrading to mainline kernel doesn't improve performance as much. There's no one stopping you to do so either, you can. But it's a total waste of time or I can least say a 50/50 chance of improvement.

There's one popular saying in the Linux community, "If it ain't broke, don't fix it". Leave the kernel version as it on 3.18.x , we can always patch it with new fixes daily from mainline and CAF. But not to upgrade the whole kernel base to 4.x or something.

I'm not a Linux kernel guru or something, just an FOSS enthusiast. I run GNU/Linux operating systems such as Arch Linux or Gentoo(I distrohop sometimes lol) and that's it. No Windoze crap.

My laptop can run Kernel 3.16.x beautifully. But the last time I checked USB Type-C ports aren't supported, so my OP3 couldn't connect to the laptop. When I upgraded to 4.4.x , type c was recognized instantly. I see no improvement in performance of my laptop. Maybe negligible to some degree. Sorry to OP if it went Off-Topic.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I thought I'd sorted out the instability problem, then suffered a series of random reboots. Anyone else running my kernel with any F2FS partitions has probably suffered the same. (If so, let me know please?)

v10 above was supposed to fix this instability, but obviously I was on the wrong track, believing that DEBUG_INFO was somehow related. I never had any problems with my kernels before Nougat came out.

(Before I continue, there is no stability issue with Nougat, as I'm sure the majority of users will attest, even though the new art/dalvik brings some compromises. However, performance is my main concern, so I'm sticking with Marshmallow for the time being.)

So, back to the problem... I made too many changes simultaneously and this made this list of possible causes quite difficult to pick through. Initially I had gone back to Marshmallow partly because I was wondering if the problem was with Nougat. Eventually I realised I had committed a code or config change in both my Nougat and Marshmallow kernels that was causing a problem.

Again, but more tentatively this time, I believe I have isolated the change I made that caused a stability problem with my kernel.

v11 is here.

I've once again disabled DEBUG_INFO in the interests of performance. This release disables F2FS_CHECK_FS. When I initially enabled this, I believed the option simply enabled background error correction. Nope! Here's the enabled code:

#ifdef CONFIG_F2FS_CHECK_FS
#define f2fs_bug_on(sbi, condition)	BUG_ON(condition)
#define f2fs_down_write(x, y)	down_write_nest_lock(x, y)
#else
#define f2fs_bug_on(sbi, condition)	\
do {	\
if (unlikely(condition)) {	\
WARN_ON(1);	\
sbi->need_fsck = true;	\
}	\
} while (0)
#define f2fs_down_write(x, y)	down_write(x)
#endif

BUG_ON is designed for development purposes, killing the active process and dumping the necessary memory contents and logs of code executed. Very useful when trying to identify and resolve problems. Not so useful if you're actually trying to use the system.

Is this anything to be concerned about? Not really. The fact that F2FS threw some exceptions and bugged out isn't too surprising considering what a new filesystem this is. In fact it took several days before my device started rebooting, indicating a good degree of stability. As you can see from reading the code above, without this option, the kernel will not bug out, but simply log the file-system error (WARN), and also schedules an fsck (need_fsck).

Every time I get cocky with kernel development, it rears up and bites me! I'll try to be more careful.

Again I want to express my appreciation for everyone who helps to test this project. It makes it so much easier to identify when there is a problem. For this release I will be looking to achieve a large amount of uninterrupted up-time to re-assure myself.

Anyone on V10 who is using ext4 does not need to switch to this version as they will be unaffected, but I certainly would appreciate knowing what your up-time has been. Let me know :)
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
New v12 Marshmallow kernel: https://goo.gl/2Sifs9

- Patched up to linux 3.18.48

- Brought in a large number of commits from ARM (check my github for the complete list)

- Built with latest linaro 6.3.1 toolchain

I've really been fighting the kernel since version 9, trying to work out what could be safely disabled. The truth is, I think the task has beaten me. I've had to go back to an earlier config. This means there is slightly more kernel events being logged than I would prefer, but I would rather ensure stability than punish myself with what seems to be an endless set of configuration permutations. This version of the kernel has worked flawlessly for me, and I'd rather take a step backward and publish something stable than continue on my previous path.
[OnePlus 3 ROMs, Kernels, Recoveries, & Other Devel] bedalus:
I've just installed 7.1.1 and got a basic kernel working. Big thanks again to [MENTION=5767887]NevaX1[/MENTION] for a problem free experience!

I'll be publishing something in the next day or two.