Subject: Re: Importing kqueue's from FreeBSD...
To: None <nathanw@MIT.EDU, tech-kern@netbsd.org>
From: Jonathan Lemon <jlemon@flugsvamp.com>
List: tech-kern
Date: 03/15/2001 15:40:49
In article <local.mail.netbsd-tech-kern/mtuy9u6rabr.fsf@contents-vnder-pressvre.mit.edu> you write:
>
>The kqueue system seems like a reasonable way to avoid the overhead
>seen by applications that want notification of events, but how much
>overhead is incurred on the rest of the system by the knote() calls,
>compared to the current infrastructure?
>
>The performance numbers referred to by the paper don't address this at
>all.

I'll admit the performance section of the paper is sadly lacking; I'm
working on that at the moment.

If there is no knote attached to the structure being monitored, then
the overhead is just a single if() statement.  Otherwise, the overhead
is roughly O(N), where N is the number of knotes attached to the structure. 

The actual time required varies, as it depends on what the filter 
routine does; for this reason, it's a good idea to keep the filters
short and sweet.
--
Jonathan