Closed Bug 802665 Opened 12 years ago Closed 12 years ago

Add low-memory notifications to B2G

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 771195

People

(Reporter: justin.lebar+bug, Unassigned)

References

Details

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).
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
> 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.
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.
(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
Closed: 12 years ago
Resolution: --- → DUPLICATE
Whiteboard: dupeme
You need to log in before you can comment on or make changes to this bug.