xpoll/startup: log on INFO level at startup, which mechanism is used
This commit is contained in:
parent
6fdc122a51
commit
39f8f43b64
|
|
@ -854,7 +854,8 @@ int main(int argc, char **argv)
|
|||
if (have_low_ports)
|
||||
hlog(LOG_INFO, "POSIX capabilities available: can bind low ports");
|
||||
|
||||
hlog(LOG_INFO, "After configuration FileLimit is %d, MaxClients is %d", fileno_limit, maxclients);
|
||||
hlog(LOG_INFO, "After configuration FileLimit is %d, MaxClients is %d, xpoll using %s",
|
||||
fileno_limit, maxclients, xpoll_implementation);
|
||||
|
||||
/* validate maxclients vs fileno_limit, now when it's determined */
|
||||
if (fileno_limit < maxclients + 50) {
|
||||
|
|
|
|||
11
src/xpoll.c
11
src/xpoll.c
|
|
@ -28,6 +28,13 @@
|
|||
#include "hlog.h"
|
||||
#include "cellmalloc.h"
|
||||
|
||||
#ifdef XP_USE_EPOLL
|
||||
const char xpoll_implementation[] = "epoll";
|
||||
#endif
|
||||
#ifdef XP_USE_POLL
|
||||
const char xpoll_implementation[] = "poll";
|
||||
#endif
|
||||
|
||||
#ifndef _FOR_VALGRIND_
|
||||
cellarena_t *xpoll_fd_pool;
|
||||
#endif
|
||||
|
|
@ -50,7 +57,7 @@ struct xpoll_t *xpoll_initialize(struct xpoll_t *xp, void *tp, int (*handler) (s
|
|||
xp->handler = handler;
|
||||
|
||||
#ifdef XP_USE_EPOLL
|
||||
hlog(LOG_DEBUG, "xpoll: initializing %p using epoll()", (void *)xp);
|
||||
//hlog(LOG_DEBUG, "xpoll: initializing %p using epoll()", (void *)xp);
|
||||
xp->epollfd = epoll_create(1000);
|
||||
if (xp->epollfd < 0) {
|
||||
hlog(LOG_CRIT, "xpoll: epoll_create failed: %s", strerror(errno));
|
||||
|
|
@ -59,7 +66,7 @@ struct xpoll_t *xpoll_initialize(struct xpoll_t *xp, void *tp, int (*handler) (s
|
|||
fcntl(xp->epollfd, F_SETFL, FD_CLOEXEC);
|
||||
#else
|
||||
#ifdef XP_USE_POLL
|
||||
hlog(LOG_DEBUG, "xpoll: initializing %p using poll()", (void *)xp);
|
||||
//hlog(LOG_DEBUG, "xpoll: initializing %p using poll()", (void *)xp);
|
||||
xp->pollfd_len = XP_INCREMENT;
|
||||
xp->pollfd = hmalloc(sizeof(struct pollfd) * xp->pollfd_len);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -78,4 +78,6 @@ extern void xpoll_outgoing(struct xpoll_t *xp, struct xpoll_fd_t *xfd, int have_
|
|||
extern int xpoll(struct xpoll_t *xp, int timeout);
|
||||
extern void xpoll_init(void);
|
||||
|
||||
extern const char xpoll_implementation[];
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue