haproxy/include/types/polling.h
Willy Tarreau de99e99ecf [MAJOR] introduced speculative I/O with epoll()
The principle behind speculative I/O is to speculatively try to
perform I/O before registering the events in the system. This
considerably reduces the number of calls to epoll_ctl() and
sometimes even epoll_wait(), and manages to increase overall
performance by about 10%.

The new poller has been called "sepoll". It is used by default
on Linux when it works. A corresponding option "nosepoll" and
the command line argument "-ds" allow to disable it.
2007-04-16 00:53:59 +02:00

49 lines
1.4 KiB
C

/*
include/types/polling.h
File descriptors and polling definitions.
Copyright (C) 2000-2007 Willy Tarreau - w@1wt.eu
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, version 2.1
exclusively.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _TYPES_POLLING_H
#define _TYPES_POLLING_H
/* for fd_set */
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <common/config.h>
/* poll mechanisms available */
#define POLL_USE_SELECT (1<<0)
#define POLL_USE_POLL (1<<1)
#define POLL_USE_EPOLL (1<<2)
#define POLL_USE_KQUEUE (1<<3)
#define POLL_USE_SEPOLL (1<<4)
extern int cfg_polling_mechanism; /* POLL_USE_{SELECT|POLL|EPOLL|KQUEUE|SEPOLL} */
#endif /* _TYPES_POLLING_H */
/*
* Local variables:
* c-indent-level: 8
* c-basic-offset: 8
* End:
*/