From owner-cvs-all@FreeBSD.ORG Sat Oct 9 22:09:02 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D0B5016A4CE; Sat, 9 Oct 2004 22:09:02 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5138E43D3F; Sat, 9 Oct 2004 22:09:02 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.13.1/8.13.1) with ESMTP id i99M7Ynj014344; Sat, 9 Oct 2004 18:07:34 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i99M7YuA014341; Sat, 9 Oct 2004 18:07:34 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Sat, 9 Oct 2004 18:07:34 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org In-Reply-To: <200410092204.i99M4Dl7026960@repoman.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: cvs commit: src/sys/dev/random randomdev_soft.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Oct 2004 22:09:03 -0000 On Sat, 9 Oct 2004, Robert Watson wrote: > - When reaping harvested entries from the queue, move all entries from > the queue at once, and when done with them, insert them all into a > thread-local queue for processing; then insert them all into the > empty fifo at once. This reduces O(4n) mutex operations to O(2) > mutex operations per wakeup. Right now we do a slightly harmful O(2N) walk of the records to move them to a thread-local queue. It would be very nice to have an O(1) tailq (and other list) "move them all" operation to move all entries to a local head. This would also be useful when dealing with other work queues in worker threads, such as bio queues, etc. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research