Skip to content

Commit 279f6b6

Browse files
committed
opal/event: use epoll by default on Linux
Under normal circumstances epoll and poll produce similar performance on Linux. When busy polling is enabled they do not. Testing with a TCP-based system shows a significan performance degredation when using poll with busy waiting enabled. This performance regression is not seen when using epoll. This PR adjusts the default value of opal_event_include to epoll on Linux only to fix the regression. Fixes #10929 Signed-off-by: Nathan Hjelm <hjelmn@google.com>
1 parent c5de3ca commit 279f6b6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

opal/util/event.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1313
* Copyright (c) 2018-2020 Amazon.com, Inc. or its affiliates. All
1414
* Rights reserved.
15+
* Copyright (c) 2022 Google, LLC. All rights reserved.
1516
* $COPYRIGHT$
1617
*
1718
* Additional copyrights may follow
@@ -45,8 +46,10 @@ int opal_event_register_params(void)
4546
// Get supported methods
4647
opal_event_all_available_eventops = event_get_supported_methods();
4748

48-
#ifdef __APPLE__
49+
#if defined(PLATFORM_OS_DARWIN)
4950
opal_event_module_include = "select";
51+
#elif defined(PLATFORM_OS_LINUX)
52+
opal_event_module_include = "epoll";
5053
#else
5154
opal_event_module_include = "poll";
5255
#endif

0 commit comments

Comments
 (0)