Open Bug 397830 Opened 18 years ago Updated 3 years ago

PKIX: eliminate object locks

Categories

(NSS :: Libraries, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: alvolkov.bgs, Unassigned)

Details

(Whiteboard: PKIX)

Object locks should be eliminated as they used only to lock object to only change object reference count. Instead, PR_AtomicIncrement/PR_AtomicDecrement should be used.
Whiteboard: PKIX
I am surprised to learn that the ONLY use of the object locks was for the ref count. I agree that if that is the ONLY use of those locks, and if there is no other NEED for an object lock, then those locks are superfluous and they can be eliminated. Is there really no need for any locks on any objects?
No, I don't think that's true. I believe the object lock is also supposed to protect read/write access to other object members, not just the refcount. At least it was supposed to.
In today's meeting, Alexei reported that he has found that the object locks are being used to protect ONLY the object's own ref count. He says that in cases where object CONTENTS need to be protected, ANOTHER lock is typically being created and used for that purpose. It would be nice to fix all that, but time is short, so IF these additional locks are being used correctly, then they are merely inefficient, and the effort to eliminate the extra locks and use only the object locks can be put off until 3.13 or later, if necessary.
This is just a performance enhancement, an efficiency measure.
Priority: -- → P3
Version: 3.12 → trunk
Unsetting target milestone in unresolved bugs whose targets have passed.
Target Milestone: 3.12 → ---
Severity: normal → S3

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: alvolkov.bgs → nobody
You need to log in before you can comment on or make changes to this bug.