Closed
Bug 839312
Opened 13 years ago
Closed 13 years ago
GonkHal incorrectly setting lowmemorykiller parameters
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(blocking-b2g:-, b2g18+ fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 fixed)
RESOLVED
FIXED
blocking-b2g | - |
People
(Reporter: mschwart, Assigned: alan.yenlin.huang)
References
Details
Attachments
(1 file)
2.25 KB,
patch
|
justin.lebar+bug
:
review+
lsblakk
:
approval-mozilla-b2g18+
|
Details | Diff | Splinter Review |
$ adb shell cat /sys/module/lowmemorykiller/parameters/adj
0,1,6,3
$ adb shell cat /sys/module/lowmemorykiller/parameters/minfree
256,1024,2048,1280
This results in poor performance and undesirable behaviour in low memory conditions. This happens because:
# priorityClasses list (http://mxr.mozilla.org/mozilla-b2g18/source/hal/gonk/GonkHal.cpp#976) is indexing into settings from b2g.js (http://mxr.mozilla.org/mozilla-b2g18/source/b2g/app/b2g.js) and therefore populating oomScoreAdj and killUnderMB in the wrong order. This error results in oomScoreAdj of "0,1,6,3,2" (after mapping to the adj domain) and killUnderMB is similarly messed. Note, the order in b2g.js looks correct. Simple fix would be to reorder the priorityClasses list to match b2g.js; a complex fix might be to add sorting
# The last entry of the adj and minfree lists are truncated assumingly here (http://mxr.mozilla.org/mozilla-b2g18/source/hal/gonk/GonkHal.cpp#1005) so that ultimately a cat of adj results in "0,1,6,3"
# The values in b2g.js, although ordered correctly are too low and result in poor performance under low memory conditions; I intend to investigate this further
Assignee | ||
Comment 1•13 years ago
|
||
I also see a typo in b2g.js would cause bug.
http://mxr.mozilla.org/mozilla-b2g18/source/b2g/app/b2g.js#564
>> backgroundPerceivebleKillUnderMB should be backgroundPerceivableKillUnderMB
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → ahuang
Assignee | ||
Updated•13 years ago
|
blocking-b2g: shira? → tef?
Assignee | ||
Comment 2•13 years ago
|
||
This patch intends to give priorityClasses correct order and fix typo in b2g.js
Attachment #711712 -
Flags: review?(justin.lebar+bug)
Comment 3•13 years ago
|
||
Comment on attachment 711712 [details] [diff] [review]
Fix without sorting, v1
Nice catch; thank you!
Attachment #711712 -
Flags: review?(justin.lebar+bug) → review+
Comment 4•13 years ago
|
||
> # The values in b2g.js, although ordered correctly are too low and result in poor
> performance under low memory conditions; I intend to investigate this further
It would be helpful if you could file a separate bug on this, so we don't lose track of this issue after we fix the one Alan fixed with is patch here.
Comment 5•13 years ago
|
||
I see why the typo causes problems, but I don't get why the order matters. So long as |adj| and |minfree| match up, we're OK, right?
Comment 6•13 years ago
|
||
> I see why the typo causes problems, but I don't get why the order matters.
I guess it could have prevented the kernel from interpolating between OOM classes properly?
Anyway, landed. https://hg.mozilla.org/integration/mozilla-inbound/rev/dc11dee7fffb
Comment 7•13 years ago
|
||
Comment on attachment 711712 [details] [diff] [review]
Fix without sorting, v1
This is a critical bug.
[Approval Request Comment]
Bug caused by (feature/regressing bug #): Bug 793105
User impact if declined: We can kill the wrong process sometimes, perhaps contributing to bug 836199 and similar bugs.
Testing completed: Trivial patch.
Risk to taking this patch (and alternatives if risky): Trivial patch.
String or UUID changes made by this patch: None.
Attachment #711712 -
Flags: approval-mozilla-b2g18?
Updated•13 years ago
|
Updated•13 years ago
|
blocking-b2g: tef? → -
status-b2g18:
--- → affected
status-b2g18-v1.0.0:
--- → wontfix
tracking-b2g18:
--- → +
Comment 8•13 years ago
|
||
Comment on attachment 711712 [details] [diff] [review]
Fix without sorting, v1
Approving for uplift to v1.0.1 since this is trivial, not blocking because at this point we will only be blocking specific partner requests.
Attachment #711712 -
Flags: approval-mozilla-b2g18? → approval-mozilla-b2g18+
Updated•13 years ago
|
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment 9•13 years ago
|
||
Comment 10•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 11•12 years ago
|
||
Batch edit: Bugs fixed on b2g18 after 1/25 merge to v1.0 branch are fixed on v1.0.1 branch.
status-b2g18-v1.0.1:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•