From owner-cvs-all@FreeBSD.ORG Mon Oct 11 18:44:11 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 011BE16A4CE; Mon, 11 Oct 2004 18:44:11 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 65D3043D41; Mon, 11 Oct 2004 18:44:10 +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 i9BIgYrU052869; Mon, 11 Oct 2004 14:42:34 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i9BIgYNC052866; Mon, 11 Oct 2004 14:42:34 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Mon, 11 Oct 2004 14:42:34 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: John Baldwin In-Reply-To: <200410111440.08998.jhb@FreeBSD.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org 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: Mon, 11 Oct 2004 18:44:11 -0000 On Mon, 11 Oct 2004, John Baldwin wrote: > On Saturday 09 October 2004 06:07 pm, Robert Watson wrote: > > 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. > > Like TAILQ_CONCAT? :) Exactly like that! Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research