From owner-cvs-src@FreeBSD.ORG Wed Aug 11 03:33:33 2004 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 ECD3616A4CE; Wed, 11 Aug 2004 03:33:32 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D07E843D54; Wed, 11 Aug 2004 03:33:32 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i7B3XWVZ049407; Wed, 11 Aug 2004 03:33:32 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i7B3XWaO049406; Wed, 11 Aug 2004 03:33:32 GMT (envelope-from rwatson) Message-Id: <200408110333.i7B3XWaO049406@repoman.freebsd.org> From: Robert Watson Date: Wed, 11 Aug 2004 03:33:32 +0000 (UTC) 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 randomdev_soft.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: Wed, 11 Aug 2004 03:33:33 -0000 rwatson 2004-08-11 03:33:32 UTC FreeBSD src repository Modified files: sys/dev/random randomdev_soft.c Log: Perform a lockless read to test whether an entropy havesting fifo is full, avoiding the cost of mutex operations if it is. We re-test once the mutex is acquired to make sure it's still true before doing the -modify-write part of the read-modify-write. Note that due to the maximum fifo depth being pretty deep, this is unlikely to improve harvesting performance yet. Approved by: markm Revision Changes Path 1.4 +4 -0 src/sys/dev/random/randomdev_soft.c