Date: Mon, 11 Oct 2004 14:42:34 -0400 (EDT) From: Robert Watson <rwatson@FreeBSD.org> To: John Baldwin <jhb@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/random randomdev_soft.c Message-ID: <Pine.NEB.3.96L.1041011144205.31040V-100000@fledge.watson.org> In-Reply-To: <200410111440.08998.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1041011144205.31040V-100000>