PERFORCE change 127427 for review
Christian S.J. Peron
csjp at FreeBSD.org
Fri Oct 12 06:30:18 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=127427
Change 127427 by csjp at push on 2007/10/12 13:29:57
- Change the wakeup logic associated with having multiple sleepers
on multiple different audit pipes. The old method used cv_signal()
which would result in only one thread being woken up after we
appended a record to it's queue. This resulted in un-timely wakeups
when processing audit records.
- Assign PSOCK priority to threads that have been sleeping on a read(2).
This is the same priority threads are woken up with when they select(2)
or poll(2). This ensures fairness between various forms of sleep on
the audit pipes.
Affected files ...
.. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_pipe.c#33 edit
Differences ...
==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_pipe.c#33 (text+ko) ====
@@ -466,7 +466,7 @@
}
audit_pipe_records++;
mtx_unlock(&audit_pipe_mtx);
- cv_signal(&audit_pipe_cv);
+ cv_broadcastpri(&audit_pipe_cv, PSOCK);
}
/*
@@ -493,7 +493,7 @@
audit_pipe_append(ap, record, record_len);
audit_pipe_records++;
mtx_unlock(&audit_pipe_mtx);
- cv_signal(&audit_pipe_cv);
+ cv_broadcastpri(&audit_pipe_cv, PSOCK);
}
More information about the p4-projects
mailing list