Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Oct 2007 13:30:17 GMT
From:      "Christian S.J. Peron" <csjp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 127427 for review
Message-ID:  <200710121330.l9CDUHvB040657@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=127427

Change 127427 by csjp@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);
 }
 
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710121330.l9CDUHvB040657>