Closed Bug 839312 Opened 13 years ago Closed 13 years ago

GonkHal incorrectly setting lowmemorykiller parameters

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:-, b2g18+ fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 fixed)

RESOLVED FIXED
blocking-b2g -
Tracking Status
b2g18 + fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- fixed

People

(Reporter: mschwart, Assigned: alan.yenlin.huang)

References

Details

Attachments

(1 file)

$ 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
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: nobody → ahuang
blocking-b2g: shira? → tef?
This patch intends to give priorityClasses correct order and fix typo in b2g.js
Attachment #711712 - Flags: review?(justin.lebar+bug)
Comment on attachment 711712 [details] [diff] [review] Fix without sorting, v1 Nice catch; thank you!
Attachment #711712 - Flags: review?(justin.lebar+bug) → review+
> # 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.
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?
> 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 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?
blocking-b2g: tef? → -
tracking-b2g18: --- → +
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+
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Batch edit: Bugs fixed on b2g18 after 1/25 merge to v1.0 branch are fixed on v1.0.1 branch.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: