Closed Bug 941792 Opened 11 years ago Closed 11 years ago

Make sure decommitting actually works on B2G

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: mccr8, Assigned: laszio.bugzilla)

References

Details

(Whiteboard: [MemShrink:P1])

Attachments

(1 file)

I'd think we'd have seen more problems if it didn't, but it isn't clear anybody has actually explicitly tested this.
This is kinda important.
Whiteboard: [MemShrink] → [MemShrink:P1]
Ting-Yuan, is this something you could investigate?
Flags: needinfo?(thuang)
May I know if we are talking about making sure that the allocator/collector properly calls madvise()/..., or to check if the kernel works correctly?
Flags: needinfo?(thuang)
The kernel, I believe. Can you confirm njn?
Flags: needinfo?(n.nethercote)
Well, both parts need to work :) But I think the doubt was more about the kernel side, because we're pretty confident decommitting works on desktop, and the SpiderMonkey side of things is shared between desktop Firefox and Firefox OS.
Flags: needinfo?(n.nethercote)
I see. I'll try to write some tests in the userland to make sure that decommitted memory can be allocated (to other processes) again. By the way, I'm considering to create a repository for compatibility and stress tests for platforms; We have been suffering from many platform issues, especially on new platforms of new partners. It would be great to filter out platform problems in early stages. Do we have something similar already?
Attached patch decommit.patchSplinter Review
I tested by spawning N threads/processes and allowing M of them to run concurrently. Each of M repeatedly writes K bytes, where M * K is close to available system memory, and then decommit. If the decommit, namely MADV_DONTNEED, doesn't work, it will be killed immediately. On Inari(ZTE Open) and emulator it passed the test. Are there any additional targets of interest?
Thanks Ting-Yuan. Is there anything else we want to check here?
Flags: needinfo?(n.nethercote)
(In reply to Ting-Yuan Huang from comment #6) > By the way, I'm considering to create a repository for compatibility and > stress tests for platforms; We have been suffering from many platform > issues, especially on new platforms of new partners. It would be great to > filter out platform problems in early stages. Do we have something similar > already? I think this is a great idea. I'm not aware of anything similar that exists already. Maybe check with mwu?
> Is there anything else we want to check here? Something else I should have thought of earlier: about:memory has a "decommitted" sub-tree in the "Other Measurements" section. Are we getting non-zero values there for B2G processes? Maybe not all the time, but at least some of the time?
Flags: needinfo?(n.nethercote)
Yes, I've seen b2g memory reports with decommited values.
Reopen if you disagree.
Assignee: nobody → thuang
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: