yashsingh1/xdaforums huggingface dataset:
[HTC Sensation] faux123:
This is how far I got from a few days ago:

According to the source, when CPU1 is unplugged, its policy including the governor information is saved in a per_cpu structure, so when next time it is hot plugged, it supposed to grab the saved governor from the saved structure, but the reality is different from what the code is saying for other governors except ondemand governor (which what lead to my original discussion with brokenwall with me stating OnDemand is patched differently compared to standard OnDemand source from kernel.org).

Here's the startup sequence for cpus:

Cpu0 (master) gets booted and starts early kernel setup and basic machine inits

Cpu1 (slave) gets booted by smp_init() then goes idle (by this time, the policy including governor should have been set for cpu1 by this time)

after Power Management code gets initialized,

Cpu1 is unplugged by PM because it is idling (and it's policy is saved in its own saved data structure)

Normal operations:

when cpu0 load > onDemand load threshold, cpu1 is hot plugged, and policy is restored from its own saved data structure from previous unplugging operations

Once average load < certain threshold, cpu1 is left to idle, then power management code kicks in and un-plugs cpu1 again and take it off-line

rinse and repeat based on load average load value of onDemand

I have tried the following combinations with onDemand and SmartAss

cpu0 onDemand, cpu1 SmartAss, hot plugging seemed to work with cpu min/max and governor restore correctly for cpu1.

but if I start with SmartAss for cpu0 (master), then cpu1 (slave cpu) will sometimes not behave correctly with the min/max restored but not governed by any governor therefore leads to exceptions when smp_rescheduler tried to send some task to cpu1 (because ungoverned CPU is not running even though it is on-line).

I am just too busy to work full time on this... hopefully tonight I can get some more free times to look at it...
[HTC Sensation] BrokenWall:
The devs are making progress on this, we got a couple people looking at source and even building test kernels, they have had a few successes and a few flops.

the method we are trying to get to work is this:

1) phone boots up

2) setcpu is able to set the min/max clock and governor

3) cpu1 stays idle and disabled but is able to use set clocks and gov

4) when load happens and cpu1 comes online it uses the information stored in setcpu or other app

5) load decreases and cpu1 turns off again to save power
[HTC Sensation] LeeDroid:
Good to see this being discussed.. I have been messing with a very simple but effective method of forcing CPU1 to always active.

Activate it and then set R/O perms.. does the job!

To avoid any excessive negative effects on power drain I have also forced cpu1 to use the interactive governor.
[HTC Sensation] jlevy73:
What governor are you using for cpu0, on-demand?

When the device is idle, does cpu1 power down or stay active?
[HTC Sensation] LeeDroid:
I am using interactive for both, both stay live and I see no noticable increase in power drain
[HTC Sensation] jerrylzy:
Is there a way to use conservactive when screen off？mike's method seems not working

Sent from my greatest Sensation 4G running LeeDrOiD
[HTC Sensation] immunityx:
Are these kernals out for download yet
[HTC Sensation] LeeDroid:
in all honesty I would probably be better off compiling a fixed smartass governor and using that for both cores, would eliminate the need for anything else
[HTC Sensation] jerrylzy:
That's great!

Sent from my greatest Sensation 4G running LeeDrOiD
[HTC Sensation] baadnewz:
smartass2 is under development. shouldn't be long till is ready for public.

let's hope HTC woks his ass off and provide fix for 3D, that and smartass2 = awesomeness
[HTC Sensation] LeeDroid:
Yeh, heard about smartass :D

They are aware of it now so let's hope so!

Sent from my s-off HTC sensation running LeeDrOiD Sensational
[HTC Sensation] mike1986.:
But with this method cpu1 is online all the time, even when screen off.
[HTC Sensation] B-Man2005:
does android itself uses cpu1 then when its active ?

i mean . will we have a speed increase on homescreen smoothness or something ?

i mean there would be no reason to activate cpu1 when android itself isnt using it right ??
[HTC Sensation] jerrylzy:
The other core will active when it's needed..But i'm confused even my dhd is faster when playing fruit ninja
[HTC Sensation] vincepg13:
Yes my desire hd is faster with most games I play, really pisses me off. I can't remember if I had a problem with this on 2.3.3 as I was on leaked 2.3.4 pretty much since I got the phone. Maybe one of the many 2.3.4 base issues?
[HTC Sensation] stanny2k:
I paid for a dual core phone, I want both cores active, I don't give a **** whether Android uses both cores or not..

This whole situation is really pissing me off. I actually feel robbed by HTC.
[HTC Sensation] BrokenWall:
if you read the entire thread, the good thing about the method we are working on, is keeping it single core when the load is not bad and only turning on the second core when really underload, which is what happens by default. But the problem is that the second core doesn't properly clock or get controlled by the governor so it can cause freq randomness.
[HTC Sensation] HannoSLM:
the problem discussed here is with OC and custom kernels alone. With stock kernel there are no issues, except the 3D problems with some games with the latest ota :(
[HTC Sensation] umd:
I've got a question. Do you guys think we get better performance with one online core 1.2 ghz or with two online core 2x600 mhz?
[HTC Sensation] vincepg13:
One core for sure, especially as its asmp
[HTC Sensation] :
Wouldnt it be much better if the second core kicks in when the first core hits 50% or 75% rather than 100%??
[HTC Sensation] BrokenWall:
the problem is that we have to work with a OS that was built for single core, this would be fine on Honeycomb most likely. And ICS should be just as good or better with multi-core support.
[HTC Sensation] forelli:
I think we should all think about the Samsung Nexus Prime and not be buying HTC devices anymore. The Samsung Galaxy S2 has its 2 cores running at the same time, that's why it overscores the Sensation. No more HTC drama for me. I'll systematically buy Samsung phones whenever they have the 4 soft keys, don't like tghe iphonesque design of the first 2 Galaxy S.

f.
[HTC Sensation] vincepg13:
But what you need to realise is the way HTC have designed their dual cores still works very well and is conservative, just needs some tweaking and the ability to form custom kernels from it.

Samsung may outscore HTC on benchmarks but who cares, sense is the reason I couldn't leave HTC and it runs well. Fair enough HTC messed up the 2.3.4 ota but in my honest opinion asmp processing isn't a reason for me anyway to leave HTC.
[HTC Sensation] LeeDroid:
Correctomondo Mr Mike, but with no excessive/noticable power drain imo ;)

Sent from my s-off HTC sensation running LeeDrOiD Sensational
[HTC Sensation] :
I think its definitely achievable
[HTC Sensation] mike1986.:
I was testing chomd method few days ago and it gave me huge battery drain and much more heating, that's why I decided for more complete script, at least for now.
[HTC Sensation] umd:
No matter how Samsung makes superior hardwares, I won't buy another Samsung phone again. HTC is doing much better job overall. Anyway, this is off topic.

I think HTC did the right thing for this situation. SGS 2 kicks both cores same time so that's why Sensation has longer battery life according to reviews that we all read earlier. Benchmarks give us low results because the phone thinks working with that low speeds give us good enough experience. For ex. in a 3D game when the phone realize you get low FPS, it boostes speed and kicks both cores same time. If the phone does that like this we have no problem. So I think the real problem here is that does this phone do this as it should be or not? When the devs make this right we might get better battery life and performance.
[HTC Sensation] forelli:
Wasn't talking about benchmarks, it won't give anything but numbers. I bought a SGS2 end of May and got my Sensation end of June, so I compare the speed, video recording quality, picture quality, build quality, sound quality, smoothness, gaming experience, browsing experience, etc. I had it 1 month before I sold it, so when I got the Sensation, I was hoping for S-Off to allow unleash the beast, just like with my DHD. And look where we are now... And I'm a CM7 die hard fan, the less Sense, the more sense it makes to me.

Sorry for off-topic.

f.
[HTC Sensation] B-Man2005:
I would prefer a solution that makes user experience in general smoother... I bought an dual core phone as other ones has mentioned before. And as I bought the sensation I thought the laggy days of android are over - bull****!

It's ****ing the same as it was for single core phones before...

Now let's kick ass and chew bubble gum and make the sensation what its meant to be... A smooth dual core phone.

Damn it

Edit: I also would prefer a solution where the two cores always are used even if I had three hours less batterie live. I just want this thing finally smooth like the UI on gs2
[HTC Sensation] LeeDroid:
Governor dependant me thinks, if you use ondemand on cpu1 (always on) it would help to icrease the power saving bias thus making on demand a little more conservative

Sent from my s-off HTC sensation running LeeDrOiD Sensational
[HTC Sensation] BrokenWall:
Problem right now is that governors that control CPU performance are not setup to properly handled load on multiple cores, and while some can be made to work, aSMP is a different animal all together. Right now the best option is to just us On-Demand since it has been properly updated for both aSMP and multicore support as Faux has stated.

Using Faux's newest kernel and setting ondemand on boot and your min and max clock is the best option anyone would have right now. Though its only on 2.3.3 and thats why I am running Senseless 1.3
[HTC Sensation] B-Man2005:
I would really like to see two versions of kernels when all this is cleared up .

One for performance of UI ... Smoothness. Using both cores fore rendering UI like gs2. For people who can't stand the laggyness anymore. And another kernel who want the most battery live where the 2nd core just kicks in when its needed
[HTC Sensation] a user:
ui is not rendered by the cpu anyway. it does not matter for ui smoothness if one or both cpus are active! actually one with even lwoer speeds than default max is more than enough.

the issues has a different cause.
[HTC Sensation] B-Man2005:
Oh sure... My bad ... For me it doesn't run smoother even when I just put up the min freq a little bit higher... Nooo... It's not processed by the CPU ...

Ok I don't understand anything .. I will throw my phone out the window now and try to call my buddies with smoke signs. But I don't know where the heat come from ? From the fire or from sun? Mhh so I even can't do that .. that's sad :(
[HTC Sensation] RADLOUNI:
What renders the UI then, the GPU ? If this is the case then the UI should be super smooth as the Adreno 220 is very capable

Not the expert here, but just one more question, people here are talking about enabling both CPUs at a time to increase performance, but the question is whether android 2.3 is multithreaded and can benefit from both CPUs running ??
[HTC Sensation] knights.JayTana:
The very reason why i created this thread http://xdaforums.com/showthread.php?t=1238056

but it seems the people who KNOWS just ignored the thread...
[HTC Sensation] jermx:
If i'm not wrong, both CPU and GPU are on the same chip (SoC) . If CPU gets overclocked, GPU gets overclocked as well. Correct me if im wrong
[HTC Sensation] Bluewall:
I'm really not an expert but can we OC a GPU ?

because i never seen a frequence for a GPU lol

But, trust me, i really don't know :D (but i'm interessted in those topics :D)
[HTC Sensation] BrokenWall:
OK the last couple posts in this thread have been off topic and talking about rendering the UI. This is not what we are working on, please get back on topic or I will just ask to have the thread locked and talk to the devs who are working on this project.

Android 2.3 is not multithreaded properly, this has been stated many times through out this thread. Honeycomb and the upcoming ICS will resolve alot of problems we are having. Also must applications are not setup to handle multiple threads.

Please read through the thread, as least the first few pages to see the issue.

---

The UI is handled by the GPU, it can be handled by the CPU if certain debug strings are turned on, but most rom devs have made sure this is not the case.

---

Some are forcing on the second CPU while it just sits idle and creates heat and uses power, this doesn't make things faster or make it get used. We are using a completely different animal right now called Snapdragon 2 (its an aSMP SoC) you will find this chip in the HP Touchpad, Evo 3D, and Sensation. It is the first aSMP to be used in mobile device. It has bugs, it doesn't scale properly, it also likes to jump around on frequency, only governor worth a damn is Ondemand. This is what the devs are working on and I am testing every night.

We have some very capable devs working TOGETHER to solve this, so please don't take this thread off topic and come in complaining about the GUI and Quadrant performance.
[HTC Sensation] superg81:
can you have a mod go through and delete the useless posts? i would rather see only the posts by the devs and testers and the progress being made or not made. whichever the case may be.;)
[HTC Sensation] Cayniarb:
Android 2.3 is *not* multi-threaded. Part of the update to 2.3.3 brought in support for multi-threaded apps from Honeycomb, but did nothing to multi-thread the operating system. This means that even if you had 32 cores screaming at 3Ghz, basic system functions will *not* be distributed beyond the first core. The others are just burning power.

As for the GPU questions - yes, the GPU is independently controlled from the CPU. It is possible to make tweaks there, but that's not at all what we are looking into here. I'm sure there will be development on that front, but it's not related to this topic.

Governors:

I know I expressed some doubt about various governors not supporting our CPU. I've talked this over more with faux123 and looked at more code, and I'm definitely willing to say I was wrong with those doubts. Governors other than OnDemand are not properly configured to calculate their loads across multiple cores. So if, for example, you were to limit the available governors to one (say, smartass), cpu1 would only ever use one of three frequencies: 5xxMhz when screen off, 9xxMhz when screen on and idle, and 1188 when screen on under load. This is clearly *not* how the governor is supposed to work.

Until more progress is made on this, there is absolutely no benefit from using a governor other than OnDemand. In fact, I would go so far to say that using any other governor would potentially be really detrimental to your battery life and general performance. Furthermore, while innovative, I don't see the scripts that are going around being particularly well thought-out either. Again, anything that forces cpu1 online when you are *not* under load is a bad idea. And for perspective, on the stock voltages, that an extra 1000mv that you are blowing through just to have that core online and unused. That's a lot of power drain and excess heat - for really no gain whatsoever.

I have no doubt that the ROMs using those methods run fast. I sincerely doubt that they run slow without that though. These devices are absolute powerhouses - really how much more responsiveness could you possibly be noticing from this anyway?
[HTC Sensation] HannoSLM:
i can confirm that using the force cpu1 script in coredroid really made the device slower. However by changing the governor to ondemand its fine, no speed improvements and no battery drains .. simply with or without it is the same :(
[HTC Sensation] raybez:
I'm not sure if anyone's looked into it yet (perhaps mike or faux) there are a couple open source kernels for supporting aSMP in Linux kernels. Since we can't see the kernel source for Honeycomb or ICS yet (where Google proclaims they fix the aSMP problem) I started reading about ASMP Linux and Linux on Cell. By the way, Linux on Cell was developed because the cell processor that runs on the PS3 is aSMP. There are few other commercial aSMP products out there, so there aren't many other sources to compare.

The CPU hotplugging source in the Sensation kernel (2.6.35) and the source for Linux on Cell (2.6.26) are very different. Despite the Sensation kernel being newer, it looks like the LoC kernel is much better. ASMP Linux is based on 2.6.19 so I'm guessing if anyone wanted a good baseline LoC is a better starting point.

If I get a chance (and when I fix my linux box) I'm going to try to trace the code and compare the two kernels, maybe I can give some more details. If anyone is so inclined, LoC has a git repo up at http://git.kernel.org/?p=linux/kernel/git/arnd/cell-2.6.git.

Cheers,

- C
[HTC Sensation] BrokenWall:
Honeycomb didn't fix aSMP it just had proper multicore support from the base up, unlike gingerbread. ICS is out in october, we will get source, CM7 will be updated to it, we will then see some benefits of this.

I know Cayniarb and Faux were looking at Linux kernel code for aSMP support, but we are still working with a Singlecore OS that supports multithreaded apps
[HTC Sensation] raybez:
Right, with hope being that OC tools will work better with a kernel that properly supports aSMP. If the kernel's junk, naturally the software running on it is too.
[HTC Sensation] BrokenWall:
I know we are still working on this, there are a few people who are able to test, but as we test more and more, we find more and more out. I am already reading all this crap on blogs and other threads and seeing scripts being used.

Lets get some of this out of the way:

The chip is aSMP, that does not mean that it is ****, it just means its not properly supported in Android at the moment.

Don't compare

this to Samsung's or Nvidia's offerings. They work completely different at the kernel level.

To everyone using Dual Core scripts in their roms or including it. Turning on CPU1 full time while the screen is on is not going to do anything for performance. Your not forcing CPU1 to process anything, it will come online when it needs to do some work as requested by the OS or an application.

This applies to all multicore phones. Quadrant is ****, and most benchmarks don't properly handle multicore phones. Smartbench works great on the Tegra and so but on the Sensation it shows slower than the Nexus S, how can you trust things like this when the data is inconsistent.

For those asking about making the dual core handle load better. It's not possible, Gingerbread was not built correctly for these types of devices, I would go almost as far as promising you that your phones will be a completely different animal when we get Ice Cream Sandwhich, im sure CyanogenMod would update to it and we will get it on our phones with proper multicore support

AT THE OS LEVEL

, there may even be a HTC OTA with Sense for ICS after sometime, just wait it out.

Right now the best option is to use a kernel like Faux123's or stick with the HTC Stock kernel since it just works for now. We have devs looking into this issue almost every night. I know morfic, faux123, and cayniarb keep finding cool little facts and information as we test.

For those using governors, your wasting your time, especially if your on a dual core script. From our testing, using governors other then On-Demand basically cause the phone to not scale properly and sometimes just run at full freq the entire time. On-Demand has been patched and updated at the kernel level for proper aSMP support.

This is just me getting some information out there loud and clear.
[HTC Sensation] RADLOUNI:
Hi

Thanks for the explanation, this was the information I am looking for. One question though that I need to ask given the fact that i own a sensation and previously owned a galaxy s 2.

-We agree that gingerbread is not multithreaded and does not benefit from Dual CPU

-quadrant benchmark cannot handle dual core systems

So why is it that quadrant benchmarks are much higher on the galaxy s 2 than sensation although both systems have gingerbread. I know that gs2 CPU is synchronous while sensation is not, nevertheless, quadrant sees only one CPU. Is it possible that scores are higher just because exynos is better Than snapdragon, I don't think so

Would appreciate your feedback on this. Thanks.
[HTC Sensation] mrg02d:
Ive also been wondering how the SGS2 can do so well with GB. Could it be that its hardware acceleration is what is helping its benchmark scores so much?

Matt
[HTC Sensation] GabrielSousa:
SGS2 could have a much better kernel/software than sensation ;)
[HTC Sensation] RADLOUNI:
That is unlikely looking at HTC's history and Samsung's history in software development. HTC has always been better than Samsung in optimizing their software to squeeze the most out of the hardware.

Samsung on the other hand is known for its crappy software, killing monstrous hardware with ****ty firmware. There is something here that we are missing.....................
[HTC Sensation] umd:
If I'm not mistaken SGS2 uses sync cores which kicks the cores both. Sensation waits a high load to kick second core. That means SGS2 can use second core even the working app is not built for dual core.
[HTC Sensation] eyegor:
It scores higher coz of the graphic tests which naturally do better because of its smaller resolution.
[HTC Sensation] GabrielSousa:
than how can you explain the g2 is mush faster than sensation ?
[HTC Sensation] gol_n_dal:
Thanks Brokenwall for the update.

I know you and many others are working hard to identify what's going on.

Good luck on finding what the optimum solution is with a hamstrung OS. I just have to trust that ICS will resolve some of the issues.
[HTC Sensation] BrokenWall:
The best way for me to answer this is look at a comparison between desktop CPUs. I can have a Phenom II and a Core i5 which can both be quad core CPUs. The Intel cpu has instruction sets and a different micro-architecture that can handle and perform tasks differently then the AMD. I know today alot of Intel CPUs can outperform any Intel, but look back at the first A64 and the P4. The P4 was still a killer on tasks such as encoding and the A64 was the killer for Gaming.

So back to SoCs, lets take a quick look.

MSM8x60:

Adreno 220 GPU

2x Cortex A8 Based Cores

512KB L2 Cache

45nm

upto 333Mhz LPDDR2

Exynos 4210:

Mali 400 GPU

2x Cortex A9 Based Cores

1MB L2 Cache

45nm

support for LPDDR2/DDR3

Tegra 2:

ULP Geforce GPU

2x Cortex A9 Based Cores

1MB L2 Cache

40nm

support for 600Mhz LPDDR2

So the biggest thing is is that the Exynos is based on a new core micro-arch then the Snapdragon 2, also it has the ability to support DDR3 memory. To go into more detail about ARM Cortex.

Items that A8 and A9 have in common:

Jazelle RCT for JIT Compilation

Neon SIMD Instruction Set (Optional)

Thumb2 Instruction set

VFPv3 Floating Point Unit (Optional)

Cortex A8:

Superscalar Dual-Issue Micro-Arch

2.0 DMIPS/Mhz

Cortex A9:

Out-Of-Order Superscalar Micro-Arch

2.5 DMIPS/Mhz

Jazelle DBX for Java Execution

Dual-Core Processing Built In

As you can see here there is alot at the core, its never just apples to apples. You have to think about what makes things tick. Its from my research that Qualcomm has taken steps to make sure the aSMP cores work properly in Dual Core mode and allow them to speed up and slow down based on load and use. Here we are just looking at a OS not built to properly handle them, thats what it comes down to. Just because the two cores are running on the SGSII doesn't mean that they are being used. (Just because I have a quad core in my computer doesn't mean my DOS Game is going to use all 4 cores)
[HTC Sensation] RADLOUNI:
Please ignore
[HTC Sensation] GabrielSousa:
the strange thing is my desire is more smother than my sensation....

:confused: