Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Jul 2010 20:46:37 -0400
From:      Boris Kochergin <spawk@acm.poly.edu>
To:        Patrick Mahan <mahan@mahan.org>, freebsd-hackers@freebsd.org
Subject:   Re: Use of printf's inside a kernel thread
Message-ID:  <4C3FABED.4090104@acm.poly.edu>
In-Reply-To: <4C3F8322.40700@mahan.org>
References:  <4C3F8322.40700@mahan.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C3FABED.4090104>