Add low-memory notifications to B2G

RESOLVED DUPLICATE of bug 771195

Status

RESOLVED DUPLICATE of bug 771195
6 years ago
5 years ago

People

(Reporter: justin.lebar+bug, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
I don't know how hard it would be for us to get low-memory notifications from the kernel.

But if we could get such notifications, they might be helpful.  In particular, we can run a GC on low memory.  If this was effective, then we wouldn't have to worry so much  about the fact that the JS engine is leaving around many collectable objects in the browser compartment (bug 802662, essentially).
Hi,

There are several options listed at [1].

[1] http://elinux.org/Memory_Management#Enhanced_Out-Of-Memory_handling
The trick isn't getting *a* low-mem notification, the hard part is getting a *useful* low-mem notification.

We spent a fair amount of time working on this problem and I think our solution is good.  The lowmemkiller driver pokes a pollable file at a configurable threshold before starting to gun down processes from memory pressure.  All our downstream partners have kernels that should include that kernel patch.

However, I see that the gecko support to poll that file *still* hasn't landed.  mwu, do you know the latest on that?  The code has existed for literally months.
Flags: needinfo?(mwu)
Whiteboard: dupeme
(Reporter)

Comment 3

6 years ago
> the hard part is getting a *useful* low-mem notification.

Totally agreed.  I've tried doing this on other platforms and getting the notification at the right time (not too early, so we don't waste time GC'ing unnecessarily, not too late so we don't OOM) has been elusive.  But we have so much control on B2G that it seems we might have some success.
(Reporter)

Comment 4

6 years ago
mwu, I'm happy to write this code for polling the file if it doesn't exist already.
It exists, has for months.  We just need to freaking land it.

Comment 6

6 years ago
(In reply to Chris Jones [:cjones] [:warhammer] from comment #5)
> It exists, has for months.  We just need to freaking land it.

If you're talking about bug 771195 , I already reviewed it but a new patch was never posted addressing review comments.
Flags: needinfo?(mwu)
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 771195

Updated

5 years ago
Whiteboard: dupeme
You need to log in before you can comment on or make changes to this bug.