This is a discussion on Re: Making Apache use kqueue within the mailing.openbsd.tech forums, part of the OpenBSD category; --> To make things easier, attached there is a patch that makes Apache build the priorly mentioned kqueue.c, which should ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| To make things easier, attached there is a patch that makes Apache build the priorly mentioned kqueue.c, which should be in src/main. The patch should apply against -current. -p. On Tue, Oct 07, 2003 at 08:53:12PM -0300, Pedro Martelletto wrote: > Hi, > > In an effort to make Apache use the kqueue mechanism, I've started to > write an ap_select() replacement which uses kqueue. You can download it > at http://pedro.sna.cx/kqueue.c. > > To which extent such a change would affect Apache's performance, I > currently do not know - That's why I'm making this post. If at all > possible, I would like people to comment, test, speak. > > Feedback will be very much appreciated. > > -p. Index: src/include/ap_config.h ================================================== ================= RCS file: /cvs/src/usr.sbin/httpd/src/include/ap_config.h,v retrieving revision 1.17 diff -u -r1.17 ap_config.h --- src/include/ap_config.h 2003/08/21 13:11:35 1.17 +++ src/include/ap_config.h 2003/10/08 03:07:36 @@ -1323,6 +1323,7 @@ #define CHECK_FD_SETSIZE #endif +/* #ifdef USE_TPF_SELECT #define ap_select(_a, _b, _c, _d, _e) \ tpf_select(_a, _b, _c, _d, _e) @@ -1333,6 +1334,7 @@ #define ap_select(_a, _b, _c, _d, _e) \ select(_a, _b, _c, _d, _e) #endif +*/ #ifdef USE_TPF_ACCEPT #define ap_accept(_fd, _sa, _ln) tpf_accept(_fd, _sa, _ln) Index: src/main/Makefile.tmpl ================================================== ================= RCS file: /cvs/src/usr.sbin/httpd/src/main/Makefile.tmpl,v retrieving revision 1.4 diff -u -r1.4 Makefile.tmpl --- src/main/Makefile.tmpl 2002/07/17 11:17:00 1.4 +++ src/main/Makefile.tmpl 2003/10/08 03:07:37 @@ -11,7 +11,7 @@ http_config.o http_core.o http_log.o \ http_main.o http_protocol.o http_request.o http_vhost.o \ util.o util_date.o util_script.o util_uri.o util_md5.o \ - rfc1413.o fdcache.o + rfc1413.o fdcache.o kqueue.o .c.o: $(CC) -c $(INCLUDES) $(CFLAGS) $< @@ -164,3 +164,4 @@ $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/util_uri.h \ $(INCDIR)/http_log.h $(INCDIR)/http_conf_globals.h uri_delims.h fdcache.o: fdcache.c +kqueue.o: kqueue.c Index: src/support/ab.c ================================================== ================= RCS file: /cvs/src/usr.sbin/httpd/src/support/ab.c,v retrieving revision 1.13 diff -u -r1.13 ab.c --- src/support/ab.c 2003/08/25 16:05:28 1.13 +++ src/support/ab.c 2003/10/08 03:07:42 @@ -140,7 +140,6 @@ #include <sys/types.h> #include <sys/uio.h> -#define ap_select select #else /* (!)NO_APACHE_INCLUDES */ #include "ap_config.h" #include "ap.h" @@ -151,6 +150,8 @@ #ifndef MPE #include <sys/time.h> #endif + +#define ap_select select #ifndef NO_WRITEV #include <sys/types.h> |