From owner-cvs-src@FreeBSD.ORG Mon Nov 17 15:02:22 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A0C2B16A4CE; Mon, 17 Nov 2003 15:02:22 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D76D43F85; Mon, 17 Nov 2003 15:02:22 -0800 (PST) (envelope-from markm@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hAHN2LXJ061071; Mon, 17 Nov 2003 15:02:21 -0800 (PST) (envelope-from markm@repoman.freebsd.org) Received: (from markm@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hAHN2LSu061069; Mon, 17 Nov 2003 15:02:21 -0800 (PST) (envelope-from markm) Message-Id: <200311172302.hAHN2LSu061069@repoman.freebsd.org> From: Mark Murray Date: Mon, 17 Nov 2003 15:02:21 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/random harvest.c hash.c randomdev.c randomdev.h yarrow.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2003 23:02:22 -0000 markm 2003/11/17 15:02:21 PST FreeBSD src repository Modified files: sys/dev/random harvest.c hash.c randomdev.c randomdev.h yarrow.c Log: Overhaul the entropy device: o Each source gets its own queue, which is a FIFO, not a ring buffer. The FIFOs are implemented with the sys/queue.h macros. The separation is so that a low entropy/high rate source can't swamp the harvester with low-grade entropy and destroy the reseeds. o Each FIFO is limited to 256 (set as a macro, so adjustable) events queueable. Full FIFOs are ignored by the harvester. This is to prevent memory wastage, and helps to keep the kernel thread CPU usage within reasonable limits. o There is no need to break up the event harvesting into ${burst} sized chunks, so retire that feature. o Break the device away from its roots with the memory device, and allow it to get its major number automagically. Revision Changes Path 1.21 +5 -5 src/sys/dev/random/harvest.c 1.11 +1 -1 src/sys/dev/random/hash.c 1.45 +92 -101 src/sys/dev/random/randomdev.c 1.4 +4 -1 src/sys/dev/random/randomdev.h 1.43 +3 -19 src/sys/dev/random/yarrow.c