[Dovecot] Patch: ioloop using kqueue/kevent for FreeBSD
Hi, I would like to submit the attached patch. It implements IO loop using FreeBSD's kqueue/kevent syscalls. It is based on snapshot of CVS HEAD as of 2005-12-12.
I could only give it limited testing on FreeBSD 5.4 but it works fine so far.
Vaclav Haisman
Only after posting the first patch I realised it is not good enough wrt/ IO_ERROR handling. The attached patch should be better.
Vaclav Haisman
On Wed, 2005-12-14 at 17:42 +0100, Vaclav Haisman wrote:
Only after posting the first patch I realised it is not good enough wrt/ IO_ERROR handling. The attached patch should be better.
Thanks, committed. I did a few minor changes so that it's consistent with Dovecot's coding style. Also a few other changes:
unsigned char mode:3; -> enum io_condition in the struct. More readable and it doesn't use more space anyway unless you're going to add more fields.
memset() isn't needed after p_new(), it's already guaranteed to be zeroed.
I'm not sure if the IO_ERROR handling isn't exactly correct. Can a callback be called twice there when error happens? Anyway, IO_ERROR isn't currently used anywhere. I added it for code that's going to be in Dovecot 2.0 where it needs to know when pipe gets closed.
What are the AC_CANONICAL_* macros in configure.in? I didn't add them.
On Wed, 14 Dec 2005, Timo Sirainen wrote:
Ok, I will remember this.
I thought about this too. Maybe it can be fixed if its sole purpose is to watch out for pipe/socket getting disconnected. The EV_EOF flag should do just that.
What are the AC_CANONICAL_* macros in configure.in? I didn't add them.
I needed these to make the libtool I use work.
It would be nice if somebody with FreeBSD or NetBSD could test this patch a little bit under heavier load. My options are in this respect limited.
Vaclav Haisman
We're looking at moving to dovecot from courier, and I'd like to know
what sort of use dovecot has in use on production mail systems.
We're a small ISP and have about 10,000 mail users. If anyone on
this list is using dovecot in a similar environment please drop me a
line privately.
Also have anyone successfully compiled 1.0alpha5 on Mac OS X? I
haven't heard from anyone on my previous email, which makes me a
little nervous.
-- Roger J. Weeks Systems & Network Administrator Mendocino Community Network
We are using dovecot alpha5 in production for 3K users, on Solaris 9 (sparc), IMAP only. We have been using it since alpha3. We saw quite a few asserts/cores in alpha3 (which Timo responded to and fixed very quickly), almost no problems or cores in alpha4, no problems in alpha5 except for my NFS lockd issue two days ago. Dovecot is very solid software for "alpha", IMHO.
Jeff Earickson Colby College
On Thu, 15 Dec 2005, Roger Weeks wrote:
On Wed, 14 Dec 2005, Timo Sirainen wrote:
ctx->fds[fd].mode |= condition;
Without either the bitfield or some masking it is possible that this will set some higher bits on. If it happens then the parts of code that compare the mode against zero will break.
Is it not possible for some higher bit to be set? Can the code stay as it is?
[...]
Vaclav Haisman
participants (5)
-
Brad
-
Jeff A. Earickson
-
Roger Weeks
-
Timo Sirainen
-
Vaclav Haisman