Closed Bug 1470918 Opened Last year Closed Last year

multiple DataStorage threads in the parent process

Categories

(Core :: Security: PSM, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: froydnj, Assigned: keeler)

References

Details

(Whiteboard: [MemShrink:P2][psm-assigned])

Attachments

(1 file)

I am looking at my processes in htop, and I can see multiple DataStorage threads in the parent process.  AFAICT, all of them must have come from:

https://searchfox.org/mozilla-central/source/security/manager/ssl/DataStorage.cpp#268-279

but this method can only be called once.  So we're creating a DataStorage thread for each DataStorage object that can be created?  That seems not good, even if we're only creating a limited number of DataStorage objects.  Could we have them all use the same SharedThreadPool or something?
Whiteboard: [MemShrink] → [MemShrink:P2]
Assignee: nobody → dkeeler
Priority: -- → P1
Whiteboard: [MemShrink:P2] → [MemShrink:P2][psm-assigned]
This introduces a helper class that provides one thread all DataStorage
instances can use to do background work. This thread should have a light
workload which mainly consists of reading some files at startup, periodically
writing to these files, and writing them again at shutdown. One thread should be
able to handle this and in any case having multiple threads trying to perform
i/o at the same time would probably be less efficient than merely performing the
work sequentially.
Comment on attachment 8988865 [details]
bug 1470918 - use only one thread for all DataStorage instances r?franziskus,froydnj

Nathan Froyd [:froydnj] has approved the revision.

https://phabricator.services.mozilla.com/D1890
Attachment #8988865 - Flags: review+
Comment on attachment 8988865 [details]
bug 1470918 - use only one thread for all DataStorage instances r?franziskus,froydnj

Franziskus Kiefer [:fkiefer or :franziskus] has approved the revision.

https://phabricator.services.mozilla.com/D1890
Attachment #8988865 - Flags: review+
Pushed by dkeeler@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7afeaceba53d
use only one thread for all DataStorage instances r=franziskus,froydnj
https://hg.mozilla.org/mozilla-central/rev/7afeaceba53d
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Depends on: 1502841
Depends on: 1527372
You need to log in before you can comment on or make changes to this bug.