History log of /freebsd/sys/kern/subr_prf.c (Results 101 – 125 of 405)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/9.2.0
# ef90af83 20-Sep-2013 Peter Grehan <grehan@FreeBSD.org>

IFC @ r255692

Comment out IA32_MISC_ENABLE MSR access - this doesn't exist on AMD.
Need to sort out how arch-specific MSRs will be handled.


# 8740a711 13-Sep-2013 Konstantin Belousov <kib@FreeBSD.org>

Reduce the scope of the proctree_lock. If several processes cause
continuous calls to the uprintf(9), the proctree_lock could be
shared-locked for indefinite amount of time, starving exclusive
reques

Reduce the scope of the proctree_lock. If several processes cause
continuous calls to the uprintf(9), the proctree_lock could be
shared-locked for indefinite amount of time, starving exclusive
requests. Since proctree_lock is needed for fork() and exit(), this
effectively stops the machine.

While there, do the similar reduction for tprintf(9).

Reported and tested by: pho
Reviewed by: ed
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (glebius)

show more ...


# d466a5b0 11-Sep-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge head


# 47823319 11-Sep-2013 Peter Grehan <grehan@FreeBSD.org>

IFC @ r255459


# 9d32fc31 07-Sep-2013 Mark Murray <markm@FreeBSD.org>

MFC


# 34c916c6 07-Sep-2013 Navdeep Parhar <np@FreeBSD.org>

Add a vtprintf. It is to tprintf what vprintf is to printf.

Reviewed by: kib


Revision tags: release/8.4.0, release/9.1.0, release/8.3.0_cvs, release/8.3.0
# 8fa0b743 23-Jan-2012 Xin LI <delphij@FreeBSD.org>

IFC @230489 (pending review).


Revision tags: release/9.0.0
# 70d8f36a 27-Oct-2011 Peter Grehan <grehan@FreeBSD.org>

IFC @ r226824


# 80f1c58b 16-Oct-2011 Marcel Moolenaar <marcel@FreeBSD.org>

Fix double vision syndrome (read: double output) when in the
debugger without a panic.


# a5615c90 28-Jun-2011 Peter Grehan <grehan@FreeBSD.org>

IFC @ r222830


# 5e9857e7 07-Jun-2011 Attilio Rao <attilio@FreeBSD.org>

MFC


# 5e319c48 07-Jun-2011 Kenneth D. Merry <ken@FreeBSD.org>

Set pca.p_bufr to NULL when we haven't allocated a buffer.

Otherwise, p_bufr is set to garbage on the stack, and if that garbage
happens to be non-NULL, and the TOLOG or TOCONS flag is set, putbuf()

Set pca.p_bufr to NULL when we haven't allocated a buffer.

Otherwise, p_bufr is set to garbage on the stack, and if that garbage
happens to be non-NULL, and the TOLOG or TOCONS flag is set, putbuf()
will get called and attempt to fill the non-existent buffer.

This is really only relevant for tprintf() (and only when the priority is
not -1), but set it in uprintf() and ttyprintf() for completeness.

The next step, to avoid log buffer scrambling, would be to add the
PRINTF_BUFR_SIZE code to tprintf(), but this should prevent panics.

Submitted by: rmacklem
Found by: pho

show more ...


# 61b92692 31-May-2011 Attilio Rao <attilio@FreeBSD.org>

MFC


# d42a4eb5 31-May-2011 Kenneth D. Merry <ken@FreeBSD.org>

Fix apparent garbage in the message buffer.

While we have had a fix in place (options PRINTF_BUFR_SIZE=128) to fix
scrambled console output, the message buffer and syslog were still getting
log mess

Fix apparent garbage in the message buffer.

While we have had a fix in place (options PRINTF_BUFR_SIZE=128) to fix
scrambled console output, the message buffer and syslog were still getting
log messages one character at a time. While all of the characters still
made it into the log (courtesy of atomic operations), they were often
interleaved when there were multiple threads writing to the buffer at the
same time.

This fixes message buffer accesses to use buffering logic as well, so that
strings that are less than PRINTF_BUFR_SIZE will be put into the message
buffer atomically. So now dmesg output should look the same as console
output.

subr_msgbuf.c: Convert most message buffer calls to use a new spin
lock instead of atomic variables in some places.

Add a new routine, msgbuf_addstr(), that adds a
NUL-terminated string to a message buffer. This
takes a priority argument, which allows us to
eliminate some races (at least in the the string
at a time case) that are present in the
implementation of msglogchar(). (dangling and
lastpri are static variables, and are subject to
races when multiple callers are present.)

msgbuf_addstr() also allows the caller to request
that carriage returns be stripped out of the
string. This matches the behavior of msglogchar(),
but in testing so far it doesn't appear that any
newlines are being stripped out. So the carriage
return removal functionality may be a candidate
for removal later on if further analysis shows
that it isn't necessary.

subr_prf.c: Add a new msglogstr() routine that calls
msgbuf_logstr().

Rename putcons() to putbuf(). This now handles
buffered output to the message log as well as
the console. Also, remove the logic in putcons()
(now putbuf()) that added a carriage return before
a newline. The console path was the only path that
needed it, and cnputc() (called by cnputs())
already adds a carriage return. So this
duplication resulted in kernel-generated console
output lines ending in '\r''\r''\n'.

Refactor putchar() to handle the new buffering
scheme.

Add buffering to log().

Change log_console() to use msglogstr() instead of
msglogchar(). Don't add extra newlines by default
in log_console(). Hide that behavior behind a
tunable/sysctl (kern.log_console_add_linefeed) for
those who would like the old behavior. The old
behavior led to the insertion of extra newlines
for log output for programs that print out a
string, and then a trailing newline on a separate
write. (This is visible with dmesg -a.)

msgbuf.h: Add a prototype for msgbuf_addstr().

Add three new fields to struct msgbuf, msg_needsnl,
msg_lastpri and msg_lock. The first two are needed
for log message functionality previously handled
by msglogchar(). (Which is still active if
buffering isn't enabled.)

Include sys/lock.h and sys/mutex.h for the new
mutex.

Reviewed by: gibbs

show more ...


Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0
# b17f9ad2 16-Aug-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Merge svn+ssh://svn.freebsd.org/base/head@211344


Revision tags: release/8.1.0_cvs, release/8.1.0
# 4a82f108 12-Jul-2010 Jung-uk Kim <jkim@FreeBSD.org>

Use type-specific inline function imax() instead of deprecated macro MAX().

Prodded by: bde


# 4624e08a 09-Jul-2010 Jung-uk Kim <jkim@FreeBSD.org>

Implement optional 'precision' for numbers. Previously, it was parsed but
ignored. Some third-party modules (e.g., APCICA) prefer this format over
zero padding flag '0'.


Revision tags: release/7.3.0_cvs, release/7.3.0
# 1a0fda2b 04-Mar-2010 Dag-Erling Smørgrav <des@FreeBSD.org>

IFH@204581


Revision tags: release/8.0.0_cvs, release/8.0.0
# 874108ae 12-Nov-2009 Oleksandr Tymoshenko <gonzo@FreeBSD.org>

MFC @199204


# ca1d2f65 03-Nov-2009 Ed Schouten <ed@FreeBSD.org>

Make /dev/klog and kern.msgbuf* MPSAFE.

Normally msgbufp is locked using Giant. Switch it to use the
msgbuf_lock. Instead of changing the tsleep() calls to msleep(), just
convert it to condvar(9).

Make /dev/klog and kern.msgbuf* MPSAFE.

Normally msgbufp is locked using Giant. Switch it to use the
msgbuf_lock. Instead of changing the tsleep() calls to msleep(), just
convert it to condvar(9).

In my opinion the locking around msgbuf_peekbytes() still remains
questionable. It looks like locks are dropped while performing copies of
multiple blocks to userspace, which may cause the msgbuf to be reset in
the mean time. At least getting it underneath from Giant should make it
a little easier for us to figure out how to solve that.

Reminded by: rdivacky

show more ...


# 10b3b545 17-Sep-2009 Dag-Erling Smørgrav <des@FreeBSD.org>

Merge from head


# 7d4b968b 17-Sep-2009 Dag-Erling Smørgrav <des@FreeBSD.org>

Merge from head up to r188941 (last revision before the USB stack switch)


Revision tags: release/7.2.0_cvs, release/7.2.0
# 1829d5da 12-Mar-2009 Warner Losh <imp@FreeBSD.org>

Update the projects tree to a newer FreeBSD current.


# 91c3cbfe 27-Feb-2009 Ed Schouten <ed@FreeBSD.org>

Remove redundant code in printf() and vprintf().

printf() and vprintf() are exactly the same, except the way arguments
are passed. Just like we see in other pieces of code (i.e. libc's
printf()), im

Remove redundant code in printf() and vprintf().

printf() and vprintf() are exactly the same, except the way arguments
are passed. Just like we see in other pieces of code (i.e. libc's
printf()), implement printf() using vprintf().

Submitted by: Christoph Mallon <christoph mallon gmx de>

show more ...


# ff7b7d90 27-Feb-2009 Ed Schouten <ed@FreeBSD.org>

Revert previous commit to subr_prf.c and make it more tidy.

As mentioned by bz and bde, the change I made wasn't the proper way to
fix. Inspired by bde's patch, perform some small cleanups to uprint

Revert previous commit to subr_prf.c and make it more tidy.

As mentioned by bz and bde, the change I made wasn't the proper way to
fix. Inspired by bde's patch, perform some small cleanups to uprintf().

Reviewed by: bz

show more ...


12345678910>>...17