Bump minimum kernel version to 2.6.30 to use EFD_SEMAPHORE
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Wed, 6 Apr 2022 19:32:44 +0000 (15:32 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 12 Apr 2022 20:44:55 +0000 (16:44 -0400)
The bump in the kernel version allows the use of EFD_SEMAPHORE for
eventfd.

Adjust the README.md to reflect this. No need to provide direct
instruction for older kernel. We leave the '--disable-epoll' switch
available and the code behind it simply because other platform might not
have epoll available.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Id512f018c5394c9cc699e19c3d5a0d753e56414b

README.adoc
src/bin/lttng-sessiond/notification-thread-events.cpp
src/bin/lttng-sessiond/notification-thread.cpp

index b9669d941302a26ce00cdbd1147095b699d5d57a..830dd933e850ac1505c80347a1ffdd66d42dad51 100644 (file)
@@ -52,11 +52,7 @@ endif::env-github[]
 You need the following dependencies to build and run the {lt}
 components:
 
-* **Linux kernel{nbsp}≥{nbsp}2.6.27**
-+
-Use `{nbh}{nbh}disable{nbh}epoll` at <<configure,build configuration>>
-time to build {lt} for an older kernel. However, note that we can't
-provide any guarantee below 2.6.27.
+* **Linux kernel{nbsp}≥{nbsp}2.6.30**
 
 * **http://www.liburcu.org/[Userspace{nbsp}RCU]{nbsp}≥{nbsp}0.11.0**.
 +
@@ -193,9 +189,6 @@ If you want to embed the manual pages into the `lttng`,
 so that you don't need `man` to view them, use the
 `{nbh}{nbh}enable{nbh}embedded{nbh}help` option.
 
-If your Linux kernel is older than 2.6.27, use the
-`{nbh}{nbh}disable{nbh}epoll` option.
-
 This build configuration script finds LTTng{nbh}UST with
 https://www.freedesktop.org/wiki/Software/pkg-config/[pkg{nbh}config]:
 set the `PKG_CONFIG_PATH` environment variable accordingly if
index da4f8a4b2ad515f601b90435fe696acde129beb0..909ccbff2cc1b6f36eba822957bdfec10a11a957 100644 (file)
@@ -3137,18 +3137,6 @@ int pop_cmd_queue(struct notification_thread_handle *handle,
                goto error_unlock;
        }
 
-       /* Simulate behaviour of EFD_SEMAPHORE for older kernels. */
-       counter -= 1;
-       if (counter != 0) {
-               ret = lttng_write(handle->cmd_queue.event_fd, &counter,
-                               sizeof(counter));
-               if (ret != sizeof(counter)) {
-                       PERROR("Failed to write back to event_fd for EFD_SEMAPHORE emulation");
-                       ret = -1;
-                       goto error_unlock;
-               }
-       }
-
        *cmd = cds_list_first_entry(&handle->cmd_queue.list,
                        struct notification_thread_command, cmd_list_node);
        cds_list_del(&((*cmd)->cmd_list_node));
index 17a9956824f6c09dc01a807e112a4a0627fe1c01..7d9f4ed12dd72bae638db763f757ee8ffa7021a0 100644 (file)
@@ -105,7 +105,7 @@ struct notification_thread_handle *notification_thread_handle_create(
 
        sem_init(&handle->ready, 0, 0);
 
-       event_fd =  eventfd(0, EFD_CLOEXEC);
+       event_fd =  eventfd(0, EFD_CLOEXEC | EFD_SEMAPHORE);
        if (event_fd < 0) {
                PERROR("event_fd creation");
                goto error;
This page took 0.028911 seconds and 4 git commands to generate.