This thread was created to try to consolidate all the issues from Faux123's thread, since he started looking into the information I will quote some of his posts here.
I am trying to get to the bottom of this issue and see if we can get this resolved so we can get proper kernel support. Since currently Kernels that are available only appear to affect one CPU and its governor.
Below is a list of commands you can run from ADB and report the issue
(make sure to include the ROM, Kernel, and command output)
----------------------------------------------------------------------
So here are some to the posts between me and Faux123 about the issue with further detail.
==================
Quote from Fuax123 after he looked into the issue.
So this is a thread to bring attention to all developers so we can try to get to the bottom of this. The reason is that I see people on the forums talking about benchmarks and this and that.
Goals is to see if we can get the second core to stay on. if not, see if we can at least get the second core to abide by the OC and Governor settings.
I am trying to get to the bottom of this issue and see if we can get this resolved so we can get proper kernel support. Since currently Kernels that are available only appear to affect one CPU and its governor.
Below is a list of commands you can run from ADB and report the issue
(make sure to include the ROM, Kernel, and command output)
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq
cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
cat /sys/devices/system/cpu/cpu0/online
cat /sys/devices/system/cpu/cpu1/online
So here are some to the posts between me and Faux123 about the issue with further detail.
So I installed your latest kernel on Senseless 1.3
Settings: MIN and MAX set to 1512Mhz with Performance gov
When running CF-Bench and letting it run I ran the following commands in an ADB Shell.
Also you have to run a test that will stress both cores, because CPU1 doesn't show available unless under load, so benches like Quadrant don't even stress the second CPUCode:#cat /sys/devices/system/cpu/[COLOR="Red"][B]cpu0[/B][/COLOR]/cpufreq/scaling_cur_freq 1512000 #cat /sys/devices/system/cpu/[COLOR="Red"][B]cpu1[/B][/COLOR]/cpufreq/scaling_cur_freq 972000 #cat /sys/devices/system/cpu/[COLOR="Red"][B]cpu1[/B][/COLOR]/cpufreq/scaling_cur_freq 384000 #cat /sys/devices/system/cpu/[COLOR="Red"][B]cpu0[/B][/COLOR]/cpufreq/scaling_governor performance #cat /sys/devices/system/cpu/[COLOR="Red"][B]cpu1[/B][/COLOR]/cpufreq/scaling_governor ondemand
The issue is that MSM8260 is not the same style Symmetric CPU that Tegra and SGSII use, instead the MSM8260 is a asymmetric multiprocessing unit. if you watch the CPU1 cur freq during benchmarking you will see that it will never hit the maximum speed of 1512Mhz
During linpack the score for multi-threaded goes up but it does not go in line with what should be possible at the proper speeds.
...
I have been testing this multiple times, I am not a developer nor do I claim to be. But I can tell you I know hardware, and I research the issues, and this issue is related to any kernel at the moment by ANY dev.
==================
Quote from Fuax123 after he looked into the issue.
And the final note:Ok, you are correct. I finally got my lazy ass off the chair and downloaded available snapdragon documentations online (I Hate qualcomm for making it so difficult to find any technical information regarding their chipsets). This is a quote from the document: "The 8x60 incorporates an asynchronous dual CPU core SMP (aSMP) micro-architecture"
I hate Qualcomm for trying to say their chipset is better than > SMP chipset yet they still use the acronym aSMP to confuse peopleWhat da heck is "asynchronous dual CPU core SMP", this is the absolute WORST BS marketing term....
Anyways, I am still blaming the OC apps (SetCPU, CPUMaster, OC Daemon etc) for not correctly set the CPU scaling properties for the 2nd CPU. Maybe all the authors for these apps were as confused as me by STUPID Qualcomm marketing terms and thought they were dealing with SMP but in fact, they were dealing with 2 separate independent CPUs on a single die. One can simply do:
to set the cpu1's scaling governor to the same governor as CPU0 so both cpus can operate using "similar" governors for better "synchronous" operations.Code:echo smartass > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
Maybe you should contact the authors for the OC apps and have them fix their appsI am not sure what needs to be fixed on the kernel side...
![]()
So I tried this, you are unable to modify or create this file while CPU1 is asleep. Our problem is that the way the SoC is that no matter if you do it manually or with any overclock software, it will not affect CPU1 speeds.
We need to find a way for CPU1 to stay awake, or else we will just have a single fast core and a second core at default speeds..
I tried creating the files needed to set the CPU1 speed directly and it deleted them after the CPU went asleep.
While the benchmark was running I was able to change the profile for the governor but was unable to manually overclock the CPU and even running any of the apps while the CPU1 was online still failed to set a speed.Code:while at idle on homescreen: cat /sys/devices/system/cpu/cpu0/online = 1 cat /sys/devices/system/cpu/cpu1/online = 0 underload on CF-Bench: cat /sys/devices/system/cpu/cpu0/online = 1 cat /sys/devices/system/cpu/cpu1/online = 1 after bench is over back on homescreen: cat /sys/devices/system/cpu/cpu0/online = 1 cat /sys/devices/system/cpu/cpu1/online = 0
I think it may be in fault to the software as well as HTC kernel drivers as well.
I just read through kernel SMP and CPU Hot plugging. It seemed there might be a bug in CPU hot plugging for SMP operations (esp for such strange beast as the new aSMP snapdragons). Hot plugging support was originally designed as a fail safe for removing failed CPUs in a CPU farm, but recently, it has been used in SMP systems where they used the hot plugging capability to actively add/remove CPUs as means of power saving by talking an idling CPU "off line". According to Linux kernel documentation, the use of this feature for SMP power management was never intended and it is an on going experimental feature.
I briefly looked at the kernel cpufreq driver and saw nothing obvious. One way of resolving the cpu1's randomness with governors and scaling frequencies is to DISABLE the hot plug feature and just have cpu1 running at all times (idling is considered running) rather than declare cpu1 to be offline completely. The bug seemed to be when restoring the cpu1 back online, the governor and scaling frequencies are NOT restored properly (but from the kernel code, it looks fine the way the code was written. The kernel driver tried to restore the governor and frequencies from a saved data structure).
It turned out it is not as easy to disable hotplug cpu from SMP. The kernel source has made some assumptions that if SMP is enabled, hotplug must be enabled. This has let to a few compilation errors. I am making edits to the kernel source to separate the 2 without breaking anything. Once I am able to cleanly separate them, I will make a test kernel with cpu hotplug disabled while SMP is running.![]()
I just read thru the entire MSM clocking / Power management code... Whew!
The aSMP dual core CPU is not as straight forward as the old single core CPU in terms of Overclocking. It is a lot more complicated than simple frequency edits and setting the max frequencies. The new AVS (adaptive-voltage scaling, Power management all try to mess with the clocking scheme). All current overclocking schemes for this CPU have bugs and issues including mine (kanged from cayniarb).
I will revert all existing OC technique from my source code and start from scratch!
BTW, all CPU overclocking utilities have issues with this aSMP CPU. They will screw up the CPU1's governor and min/max frequencies, essentially crippling your dual core CPU to having only CPU0 switching properly and the other core (CPU1) will be stuck @ 972 MHz max with random governor running.
My recommendation for now. DO NOT use any overclocking app (SetCPU, CPUMaster) until either either the kernel is patched correctly or the apps are updated to work with aSMP CPU's quirkiness. Also the only governor that is patched correctly to work with the new aSMP CPU is the OnDemand Governor, all other governors have not been patched properly including my newly patched SmartAss governor. Further patches are required for the other governors to function properly with this new STRANGE beast
So this is a thread to bring attention to all developers so we can try to get to the bottom of this. The reason is that I see people on the forums talking about benchmarks and this and that.
Goals is to see if we can get the second core to stay on. if not, see if we can at least get the second core to abide by the OC and Governor settings.
As of right now the best kernel to use is the HTC Stock kernel, since it uses Ondemand by default for both cores. Other governors haven't been patch for proper aSMP support.
you can see the performance possible in the following post: http://forum.xda-developers.com/showpost.php?p=16976335&postcount=28
you can see the performance possible in the following post: http://forum.xda-developers.com/showpost.php?p=16976335&postcount=28
Last edited: