From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 9 19:56:13 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0B301065672 for ; Sat, 9 Apr 2011 19:56:13 +0000 (UTC) (envelope-from dieterbsd@engineer.com) Received: from imr-ma04.mx.aol.com (imr-ma04.mx.aol.com [64.12.206.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6FE268FC12 for ; Sat, 9 Apr 2011 19:56:12 +0000 (UTC) Received: from imo-da03.mx.aol.com (imo-da03.mx.aol.com [205.188.169.201]) by imr-ma04.mx.aol.com (8.14.1/8.14.1) with ESMTP id p39JuAEW005550 for ; Sat, 9 Apr 2011 15:56:10 -0400 Received: from dieterbsd@engineer.com by imo-da03.mx.aol.com (mail_out_v42.9.) id n.c74.79a92a97 (43999) for ; Sat, 9 Apr 2011 15:56:05 -0400 (EDT) Received: from smtprly-dc02.mx.aol.com (smtprly-dc02.mx.aol.com [205.188.170.2]) by cia-dd06.mx.aol.com (v129.9) with ESMTP id MAILCIADD068-d2f34da0b9d2286; Sat, 09 Apr 2011 15:56:05 -0400 Received: from web-mmc-m02 (web-mmc-m02.sim.aol.com [64.12.224.135]) by smtprly-dc02.mx.aol.com (v129.9) with ESMTP id MAILSMTPRLYDC022-d2f34da0b9d2286; Sat, 09 Apr 2011 15:56:02 -0400 To: freebsd-hackers@freebsd.org Content-Transfer-Encoding: quoted-printable Date: Sat, 09 Apr 2011 15:56:02 -0400 X-MB-Message-Source: WebUI X-AOL-IP: 67.206.164.51 X-MB-Message-Type: User MIME-Version: 1.0 From: dieterbsd@engineer.com Content-Type: text/plain; charset="us-ascii"; format=flowed X-Mailer: Mail.com Webmail 33490-STANDARD Received: from 67.206.164.51 by web-mmc-m02.sysops.aol.com (64.12.224.135) with HTTP (WebMailUI); Sat, 09 Apr 2011 15:56:02 -0400 Message-Id: <8CDC50749BB9940-18FC-38C6@web-mmc-m02.sysops.aol.com> X-Spam-Flag: NO X-AOL-SENDER: dieterbsd@engineer.com Subject: *printf(9) and PRINTF_BUFR_SIZE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Apr 2011 19:56:13 -0000 While working on other problems with *printf(9), log(9), etc. I stumbled upon: options PRINTF_BUFR_SIZE=3D128 # Prevent printf output being=20 interspersed. Question 1: Am I correct in thinking that PRINTF_BUFR_SIZE is supposed to prevent this: ada2: 300.000MB/s transfuhub2: 3 ports with 3 removable, self powered ers (SATA 2.x, UDMA6, PIO 8192bytes) ada2: Command Queueing enabled Question 2: Why is vprintf() the only function that does this buffering? As far as I can tell, the various functions that call kvprintf()=20 directly without going through vprintf() do not get buffered. I'm thinking that kvprintf() would be a better place for the buffering. Or would this=20 break something?