Closed Bug 1857828 Opened 1 year ago Closed 1 year ago

Use an RWLock for atom tables.

Categories

(Core :: XPCOM, task)

task

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox120 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sp3])

Attachments

(1 file)

Seems like a consistent progression in CSS-heavy speedometer tests (win64 example).

See comment 0. This should avoid some lock contention, specially when
parsing CSS and other off-main-thread uses of atoms.

If we're seeing lock contention, we might also want to consider bumping the number of subtables. The idea is that we try to have basically no contention for any two non-identical atoms (though of course if both threads are using the same atom we can't solve that with a subtable).

Any sense of which case it is?

Flags: needinfo?(emilio)
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch

I didn't dig too much, but my intuition was that it seems reasonable (and likely) that CSS being parsed off the main thread contains the same atoms that the main thread uses and also atomizes (think class names ids etc).

Flags: needinfo?(emilio)

Maybe just briefly test if 2x-ing or 10x-ing the number of buckets has any impact beyond what we got with this change?

Blocks: 1858106
Whiteboard: [sp3]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: