Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 May 2002 05:24:36 -0700 (PDT)
From:      Hiten Pandya <hitmaster2k@yahoo.com>
To:        Peter Wemm <peter@wemm.org>
Cc:        Doug White <dwhite@resnet.uoregon.edu>, Omar Thameen <omar@clifford.inch.com>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: tuning a CPU bound server 
Message-ID:  <20020519122437.3254.qmail@web21108.mail.yahoo.com>
In-Reply-To: <20020519051546.A1FC539F9@overcee.wemm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--- Peter Wemm <peter@wemm.org> wrote:
> > -- Hiten Pandya <hiten@uk.FreeBSD.org> wrote:
> > Just wondering, are these the kind of problems which can be solved by
> > using the kqueue(2) mechanism, or am I talking nuts again?
> > 
> > Regards.
> 
> Yes, kqueue solves it nicely.  I overestimated the work required.  In
> fact, it looks like it would be quite easy to do.  There are three places
> that need work.
> src/util/events.c  (the main event loop, keeps a persistent select mast)
> src/util/readable.c (quick select-until-readable)
> src/util/writable.c (quick select-until-writable)
> 
> events.c is practically begging to be converted to kqueue as it has
> explicit init/register/unregister/loop type operation that allows callers
> to register/unregister callbacks for given fd's when they become readable
> or writable.  This is the exact scenario that kqueue is ideal for.
> 
> The other two are not heavily used and could quickly whip up their own mini
> kqueue for the task.

Sounds like a good task for someone with time in their hands. ;)
As an example: http://www.monkeys.com/freeware/kqueue-echo.c, someone might
find that useful.

Regards.

  -- Hiten Pandya
  -- <hiten@uk.FreeBSD.org>, <hiten@xMach.org>

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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




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