- 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 wake-ups when processing audit records real-time. - 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 yields fairness between various forms of sleep on the audit pipes. Obtained from: TrustedBSD Project Discussed with: rwatson MFC after: 1 week
This commit is contained in:
parent
e5337493b3
commit
d250020a68
@ -466,7 +466,7 @@ audit_pipe_submit(au_id_t auid, au_event_t event, au_class_t class, int sorf,
|
||||
}
|
||||
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_submit_user(void *record, u_int record_len)
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user