aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/Makefile
diff options
context:
space:
mode:
authorMasashi Honma <masashi.honma@gmail.com>2014-05-13 00:35:48 (GMT)
committerJouni Malinen <j@w1.fi>2014-05-16 15:25:51 (GMT)
commitf0356ec85c468f425a86cfa11b98e051a2d022e8 (patch)
tree087a6f8ee74a44e0ed71465ad0cc47a8ab03df6a /wpa_supplicant/Makefile
parentda96a6f793f0edc542f9edf963a308391565d3bf (diff)
downloadhostap-f0356ec85c468f425a86cfa11b98e051a2d022e8.zip
hostap-f0356ec85c468f425a86cfa11b98e051a2d022e8.tar.gz
hostap-f0356ec85c468f425a86cfa11b98e051a2d022e8.tar.bz2
eloop: Add epoll option for better performance
This patch adds epoll option for the eloop implementation. This can be selected with the CONFIG_ELOOP_EPOLL=y build option. [merit] See Table1. Table1. comparison table +--------+--------+-----------+------------+-------------+ | | add fd | remove fd | prepare fd | dispatch fd | +--------+--------+-----------+------------+-------------+ | select | O(1) | O(1) | O(N) | O(N) | +--------+--------+-----------+------------+-------------+ | poll | O(1) | O(1) | O(N) | O(N) | +--------+--------+-----------+------------+-------------+ | epoll | O(1) | O(1) | 0 | O(M) | +--------+--------+-----------+------------+-------------+ "add fd" is addition of fd by eloop_sock_table_add_sock(). "remove fd" is removal of fd by eloop_sock_table_remove_sock(). "prepare fd" is preparation of fds before wait in eloop_run(). "dispatch fd" is dispatchment of fds by eloop_sock_table_dispatch(). "N" is all watching fds. "M" is fds which could be dispatched after waiting. As shown in Table1, epoll option has better performance on "prepare fd" column. Because select/poll option requires setting fds before every select()/poll(). But epoll_wait() doesn't need it. And epoll option has also better performance on "dispatch fd" column. Because select/poll option needs to check all registered fds to find out dispatchable fds. But epoll option doesn't require checking all registered fds. Because epoll_wait() returns dispatchable fd set. So epoll option is effective for GO/AP functionality. [demerit] The epoll option requires additional heap memory. In case of P2P GO, it is about 8K bytes. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Diffstat (limited to 'wpa_supplicant/Makefile')
-rw-r--r--wpa_supplicant/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 48eb28a..49f7907 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -138,6 +138,9 @@ ifdef CONFIG_ELOOP_POLL
CFLAGS += -DCONFIG_ELOOP_POLL
endif
+ifdef CONFIG_ELOOP_EPOLL
+CFLAGS += -DCONFIG_ELOOP_EPOLL
+endif
ifdef CONFIG_EAPOL_TEST
CFLAGS += -Werror -DEAPOL_TEST