From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 16 00:46:35 2010 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 2738E1065673 for ; Fri, 16 Jul 2010 00:46:35 +0000 (UTC) (envelope-from spawk@acm.poly.edu) Received: from acm.poly.edu (acm.poly.edu [128.238.9.200]) by mx1.freebsd.org (Postfix) with ESMTP id BE5628FC19 for ; Fri, 16 Jul 2010 00:46:34 +0000 (UTC) Received: (qmail 23718 invoked from network); 16 Jul 2010 00:46:33 -0000 Received: from unknown (HELO ?10.0.0.174?) (spawk@128.238.64.31) by acm.poly.edu with AES256-SHA encrypted SMTP; 16 Jul 2010 00:46:33 -0000 Message-ID: <4C3FABED.4090104@acm.poly.edu> Date: Thu, 15 Jul 2010 20:46:37 -0400 From: Boris Kochergin User-Agent: Thunderbird 2.0.0.24 (X11/20100530) MIME-Version: 1.0 To: Patrick Mahan , freebsd-hackers@freebsd.org References: <4C3F8322.40700@mahan.org> In-Reply-To: <4C3F8322.40700@mahan.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: Use of printf's inside a kernel thread 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: Fri, 16 Jul 2010 00:46:35 -0000 Patrick Mahan wrote: > > Just wondering if there is some constraints to using printf() calls > inside a kernel thread (created by kthread_create()). I'm currently > trying to debug a worker thread but the printf's are coming out > garbled. Not entirely sure why this could be occurring. > > OS: FreeBSD 7.3 on an Intel Xeon with 8 Gbytes of memory. > > Any ideas? > > Thanks, > > Patrick > I don't think printf() output from the kernel is serialized. The PRINTF_BUFR_SIZE=128 GENERIC kernel option in 8.x alleviates this to a good extent, and there is a reference to it in /usr/src/sys/conf/options in 7.3, so it might be available there as well. Try it out. -Boris