From owner-cvs-src@FreeBSD.ORG Sat Jun 21 19:18:32 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 9853437B401; Sat, 21 Jun 2003 19:18:32 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D77143FA3; Sat, 21 Jun 2003 19:18:32 -0700 (PDT) (envelope-from iedowse@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h5M2IW0U087607; Sat, 21 Jun 2003 19:18:32 -0700 (PDT) (envelope-from iedowse@repoman.freebsd.org) Received: (from iedowse@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h5M2IVUt087606; Sat, 21 Jun 2003 19:18:31 -0700 (PDT) Message-Id: <200306220218.h5M2IVUt087606@repoman.freebsd.org> From: Ian Dowse Date: Sat, 21 Jun 2003 19:18:31 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sbin/dmesg dmesg.c src/sys/sys msgbuf.h src/sys/conf files src/sys/kern subr_log.c subr_msgbuf.c subr_prf.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: Sun, 22 Jun 2003 02:18:32 -0000 iedowse 2003/06/21 19:18:31 PDT FreeBSD src repository Modified files: sbin/dmesg dmesg.c sys/sys msgbuf.h sys/conf files sys/kern subr_log.c subr_prf.c Added files: sys/kern subr_msgbuf.c Log: Replace the code for reading and writing the kernel message buffer with a new implementation that has a mostly reentrant "addchar" routine, supports multiple message buffers in the kernel, and hides the implementation details from callers. The new code uses a kind of sequence number to represend the current read and write positions in the buffer. This approach (suggested mainly by bde) permits the read and write pointers to be maintained separately, which reduces the number of atomic operations that are required. The "mostly reentrant" above refers to the way that while it is now always safe to have any number of concurrent writers, readers could see the message buffer after a writer has advanced the pointers but before it has witten the new character. Discussed on: freebsd-arch Revision Changes Path 1.20 +1 -3 src/sbin/dmesg/dmesg.c 1.796 +1 -0 src/sys/conf/files 1.58 +7 -18 src/sys/kern/subr_log.c 1.1 +239 -0 src/sys/kern/subr_msgbuf.c (new) 1.103 +26 -94 src/sys/kern/subr_prf.c 1.21 +22 -4 src/sys/sys/msgbuf.h