Date: Fri, 6 Jul 2001 11:20:02 -0700 (PDT) From: P Kern <pkern@utcs.utoronto.ca> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/28738: IPFW log messages causes syslogd to fsync. Message-ID: <200107061820.f66IK2K69543@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/28738; it has been noted by GNATS.
From: P Kern <pkern@utcs.utoronto.ca>
To: dima@unixfreak.org
Cc: FreeBSD-gnats-submit@freebsd.org, pkern@utcs.utoronto.ca
Subject: Re: bin/28738: IPFW log messages causes syslogd to fsync.
Date: Fri, 6 Jul 2001 14:15:21 -0400
>From unixfreak.org!dima Thu Jul 5 21:13:29 2001
>
> pkern@utcs.utoronto.ca writes:
> > >Description:
> >
> > syslogd is set to fsync after each klog message.
> > This results in a lot of disk activity if IPFW is being used
> > with verbose logging enabled -- an fsync for each IPFW syslog
> > (and there could be more than one IPFW log message per packet).
> > But IPFW syslogs use the LOG_SECURITY facility so it's possible
> > to exempt those messages from being fsync'ed each time.
>
> But it may not be the only one using LOG_SECURITY.
Hi. I made sure to check the kernel sources before trying this change.
In 4.3-RELEASE, IPFW messages are the only ones using LOG_SECURITY.
So this change would only affect how syslogd behaves when it receives
IPFW messages from the kernel.
> And if it is now, can you say that for N months in the future?
Hmmm, I'm guessing this implies that new code should include comments.
Sorry about that. Here's an updated patch. Hope this helps. pk.
--- syslogd.c 2001/06/12 08:25:31 1.1
+++ syslogd.c 2001/07/06 22:01:36
@@ -712,6 +712,11 @@
++p;
if ((pri & LOG_FACMASK) == LOG_CONSOLE)
flags |= IGN_CONS;
+
+ /* don't fsync for IPFW messages. */
+ if ((pri & LOG_FACMASK) == LOG_SECURITY)
+ flags &= ~SYNC_FILE;
+
} else {
/* kernel printf's come out on console */
flags |= IGN_CONS;
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107061820.f66IK2K69543>
