From owner-freebsd-bugs@FreeBSD.ORG Fri Apr 15 14:20:04 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7446A1065670 for ; Fri, 15 Apr 2011 14:20:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4ABB28FC12 for ; Fri, 15 Apr 2011 14:20:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p3FEK4LR075308 for ; Fri, 15 Apr 2011 14:20:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p3FEK4ge075307; Fri, 15 Apr 2011 14:20:04 GMT (envelope-from gnats) Resent-Date: Fri, 15 Apr 2011 14:20:04 GMT Resent-Message-Id: <201104151420.p3FEK4ge075307@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Balazs Scheidler Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3B0C106566B for ; Fri, 15 Apr 2011 14:10:51 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id A226F8FC19 for ; Fri, 15 Apr 2011 14:10:51 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p3FEAoxN052497 for ; Fri, 15 Apr 2011 14:10:50 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p3FEAo3l052496; Fri, 15 Apr 2011 14:10:50 GMT (envelope-from nobody) Message-Id: <201104151410.p3FEAo3l052496@red.freebsd.org> Date: Fri, 15 Apr 2011 14:10:50 GMT From: Balazs Scheidler To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/156423: Please add kqueue support for /dev/klog X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2011 14:20:04 -0000 >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: