Closed
Bug 1050267
Opened 12 years ago
Closed 12 years ago
[Flame] Add "fastboot oem maxcpus" to limit the number of cores.
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(b2g-v2.1 fixed)
RESOLVED
FIXED
2.1 S3 (29aug)
| Tracking | Status | |
|---|---|---|
| b2g-v2.1 | --- | fixed |
People
(Reporter: nbp, Assigned: nbp)
References
Details
Attachments
(1 external file)
Some of our bugs seems to be dependent on the number of cores that are used on the phone. Currently we are able to change the memory available but not the number of cores. This means that we still have to rely on phones which are not the reference devices to test for single core-related issues.
I suggest to add a new fastboot command, such as:
# downgrade to a single core-like cpu
$ fastboot oem maxcpus 1
# restore the current default on the flame
$ fastboot oem maxcpus 2
The idea being to use this to set the maxcpus command line argument, to disable CPUs from the start-up.
| Assignee | ||
Comment 1•12 years ago
|
||
I managed to patch the aboot, such as it handles a new maxcpus variable. This works fine for the start-up but apparently when b2g is started it re-enable the second core, which is a shame because then Gecko is initialized thinking that it has multiple cores and not a single one.
I'll continue to investigate how Gecko is starting the second core.
| Assignee | ||
Comment 2•12 years ago
|
||
This pull request contains 2 patches, one for cleaning up the typo of "oem mem", and another one for adding "oem maxcpus" which is a clone of the code of "oem mem".
The main difference between the 2 is that "oem maxcpus" does add 2 command line argument to the kernel. The first one is maxcpus=[1-256] which correspond to the maximum of "online" cpus when the phone is booting up. The second is "nr_cpus=[1-256]", which corresponds to the number of visible cpus.
Attachment #8470841 -
Flags: review?(lissyx+mozillians)
Updated•12 years ago
|
Comment 3•12 years ago
|
||
Comment on attachment 8470841 [details] [review]
Add "fastboot oem maxcpus" command to limit the number of cpus.
Michael is more suited than me to review this. Besides, we can land it but the bootloader is not (yet, hopefully) built by default.
Attachment #8470841 -
Flags: review?(lissyx+mozillians) → review?(mwu)
Comment 4•12 years ago
|
||
I don't think I'm particularly qualified to review this either, but I can try.
I assume you haven't figured out how Gecko/Gonk is restarting the other cores? If we can figure that out, that might give us an easier way to control the number of cores.
| Assignee | ||
Comment 5•12 years ago
|
||
(In reply to Michael Wu [:mwu] from comment #4)
> I don't think I'm particularly qualified to review this either, but I can
> try.
>
> I assume you haven't figured out how Gecko/Gonk is restarting the other
> cores? If we can figure that out, that might give us an easier way to
> control the number of cores.
To be honest I don't know either what we detect when a core is offline. Restricting the number of core such as they cannot be enabled seems to be a better approach from my point of view.
Comment 6•12 years ago
|
||
Comment on attachment 8470841 [details] [review]
Add "fastboot oem maxcpus" command to limit the number of cpus.
Looks good, or at least mimics the pattern of the other code in here well enough.
Attachment #8470841 -
Flags: review?(mwu) → review+
| Assignee | ||
Comment 7•12 years ago
|
||
I've updated the patches and added r=mwu in both patches.
Keywords: checkin-needed
Comment 8•12 years ago
|
||
yay <3
Comment 9•12 years ago
|
||
foxfone-one: https://github.com/mozilla-b2g/kernel_lk/commit/9eb619d2efdf4bd121587d8296f5c10481f750b8
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
status-b2g-v2.1:
--- → fixed
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S3 (29aug)
Comment 10•12 years ago
|
||
Looks like we would need to land it also on the kk bootloader branch. I cherry-picked both commit with success. Should we open a new bug?
Flags: needinfo?(nicolas.b.pierron)
Flags: needinfo?(mwu)
| Assignee | ||
Comment 11•12 years ago
|
||
(In reply to Alexandre LISSY :gerard-majax from comment #10)
> Looks like we would need to land it also on the kk bootloader branch. I
> cherry-picked both commit with success. Should we open a new bug?
Is the aboot version really different, would it be possible to just merge the two branches?
Flags: needinfo?(nicolas.b.pierron)
Comment 12•12 years ago
|
||
Up to you. You can just include uplifts as part of enabling the bootloader build for KK if you want.
Flags: needinfo?(mwu)
Updated•12 years ago
|
Flags: needinfo?(cheilmann)
Comment 14•11 years ago
|
||
Hey I realize we don't have this on kk !
Comment 15•11 years ago
|
||
Could we get this on the foxfone-v1.4 branch? That does work well:
- ./build.sh out/target/product/flame/bootloader
- adb reboot bootloader
- fastboot flash aboot out/target/product/flame/bootloader
- fastboot reboot-bootloader
- fastboot oem maxcpus 1
- fastboot reboot
Flags: needinfo?(ryanvm)
Flags: needinfo?(cbook)
Comment 16•11 years ago
|
||
Not sure why you're pinging us about it when it doesn't have approvals for uplift anywhere, which you certainly know is the first step.
Flags: needinfo?(ryanvm)
Flags: needinfo?(cbook)
Comment 17•11 years ago
|
||
Comment on attachment 8470841 [details] [review]
Add "fastboot oem maxcpus" command to limit the number of cpus.
NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.
[Approval Request Comment]
Bug caused by (feature/regressing bug #): none
User impact if declined: developper cannot tune their flame to limit number of CPUs
Testing completed: local on several devices
Risk to taking this patch (and alternatives if risky): low, it only impacts bootloader
String or UUID changes made by this patch: none
Attachment #8470841 -
Flags: approval-mozilla-b2g30?
Comment 18•11 years ago
|
||
Comment on attachment 8470841 [details] [review]
Add "fastboot oem maxcpus" command to limit the number of cpus.
Sorry for the spam, we want this for all Flame running KK, so starting with 2.0.
NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.
[Approval Request Comment]
Bug caused by (feature/regressing bug #): N/A
User impact if declined: developper cannot tune their Flame to limit the number of CPUs used
Testing completed: local testing: cherry-pick, building and flashing as documented above
Risk to taking this patch (and alternatives if risky): low, only impacts bootloader code
String or UUID changes made by this patch: none
Attachment #8470841 -
Flags: approval-mozilla-b2g30? → approval-mozilla-b2g32?
Comment 19•11 years ago
|
||
Comment on attachment 8470841 [details] [review]
Add "fastboot oem maxcpus" command to limit the number of cpus.
Too late to land non-blocking changes on 2.0 at this point, so clearing the approval here.
Attachment #8470841 -
Flags: approval-mozilla-b2g32? → approval-mozilla-b2g32-
You need to log in
before you can comment on or make changes to this bug.
Description
•