Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Apr 2011 14:10:50 GMT
From:      Balazs Scheidler <bazsi@balabit.hu>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/156423: Please add kqueue support for /dev/klog
Message-ID:  <201104151410.p3FEAo3l052496@red.freebsd.org>
Resent-Message-ID: <201104151420.p3FEK4ge075307@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         156423
>Category:       kern
>Synopsis:       Please add kqueue support for /dev/klog
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 15 14:20:03 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Balazs Scheidler
>Release:        8.1-RELEASE
>Organization:
BalaBit IT Ltd.
>Environment:
FreeBSD fbsd81.balabit 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:

The multi-threaded version of syslog-ng (an alternative to syslogd) would try to use the kqueue mechanism to drive its main loop for maximum performance. 

However /dev/klog currently doesn't support kqueue().

There's a patch by DragonflyBSD, which seems to implement it (however I don't know FreeBSD kernel code that much):

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/fef8f01a63adb168dd043d0e835694b0d02c59c9

The kqueue() support is implemented through a wrapper library called libivykis (http://sourceforge.net/projects/libivykis/). This library makes it possible to enable or disable polling mechanisms at runtime using an environment variable.

For now, I'll simply disable kqueue() support, and revert to using plain poll(), since with the current syslog-ng architecture it's either an all-or-nothing decision. (e.g. either everything goes with kqueue() or nothing) 

I'm sure sockets would work nicely and users may come up with alternatives (like running two instances of syslog-ng, one for /dev/klog the other for the rest), but it's a big hassle.

So if it's not a big issue, please try to support it in one of the upcoming FreeBSD versions, so I can reenable kqueue() support.

Thanks.

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



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