From owner-freebsd-questions  Tue Sep 24 14: 7: 8 2002
Delivered-To: freebsd-questions@freebsd.org
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 14A4537B404
	for <questions@freebsd.org>; Tue, 24 Sep 2002 14:07:07 -0700 (PDT)
Received: from mxzilla1.xs4all.nl (mxzilla1.xs4all.nl [194.109.6.54])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2C16543E4A
	for <questions@freebsd.org>; Tue, 24 Sep 2002 14:07:06 -0700 (PDT)
	(envelope-from micheloo@xs4all.nl)
Received: from xs2.xs4all.nl (xs2.xs4all.nl [194.109.3.12])
	by mxzilla1.xs4all.nl (8.12.3/8.12.3) with ESMTP id g8OL74mr061385
	for <questions@freebsd.org>; Tue, 24 Sep 2002 23:07:04 +0200 (CEST)
Received: (from micheloo@localhost)
	by xs2.xs4all.nl (8.11.6/8.11.6) id g8OL74e13080
	for questions@freebsd.org; Tue, 24 Sep 2002 23:07:04 +0200 (CEST)
	(envelope-from micheloo)
Date: Tue, 24 Sep 2002 23:07:04 +0200
From: Michel Oosterhof <m.oosterhof@xs4all.nl>
To: questions@freebsd.org
Subject: kqueue
Message-ID: <20020924210704.GA13019@xs4all.nl>
Reply-To: Michel Oosterhof <m.oosterhof@xs4all.nl>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4i
Sender: owner-freebsd-questions@FreeBSD.ORG
Precedence: bulk
List-ID: <freebsd-questions.FreeBSD.ORG>
List-Archive: <http://docs.freebsd.org/mail/> (Web Archive)
List-Help: <mailto:majordomo@FreeBSD.ORG?subject=help> (List Instructions)
List-Subscribe: <mailto:majordomo@FreeBSD.ORG?subject=subscribe%20freebsd-questions>
List-Unsubscribe: <mailto:majordomo@FreeBSD.ORG?subject=unsubscribe%20freebsd-questions>
X-Loop: FreeBSD.ORG


Hello.

Recently I started looking into kqueue(2), and to get to know the
interface better I attempted to turn usr.sbin/moused into a kqueue
program (replacing the main select() loop that reads the mouse
device).

Now I thought I understood the interface, I requested a kqueue, but
as soon as I add an event for monitoring I get an 'Operation not
permitted' error.  Does anyone know if this is caused because
kqueue() only supports FFS? The mouse device is on devfs (I'm running
-CURRENT, btw).

I've got one more question, actually a fact that surprises me, it
seems that tail(1) is the only place in the base system that actually
uses kqueue. Is there a reason for this? I read in most places
kqueue() is more efficient, scalable, etc. I'm sure code like ftpd
or other services would benefit. (And i'm sure Apache could use it
too).

michel

(I'm having some problems with my news reader software, or rather the
news posting software, so similar messages may appear).

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message