From df0df1a7316c040e966b3ae0c98b16e73560bf78 Mon Sep 17 00:00:00 2001 From: fengbojiang Date: Thu, 20 Jun 2024 16:50:00 +0800 Subject: [PATCH 1/2] update email. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 595c9cea7..644578184 100644 --- a/README.md +++ b/README.md @@ -191,4 +191,4 @@ See [LICENSE](LICENSE) Tencent Cloud F-Stack team developed F-Stack which is a general network framework based on DPDK and provides ultra high network performance. We are here looking for more and more talented people with great passion on technology to join us. You would have the chance to work with brightest minds on this planet and help Tencent cloud and F-stack continuously evolve. Send us your resume or refer your friend to us if you are interested in joining us. Open Positions: Software engineer(C/C++), Web developer, IOS/Android developer, Product Manager, Operating Manager, etc. -Contact: Please send your resume to [us](mailto:allanhuang@tencent.com) +Contact: Please send your resume to [us](mailto:fengbojiang@tencent.com) From 0b8ed6d8bd8bdb089df1626e9ffb6ce2cab9b2a0 Mon Sep 17 00:00:00 2001 From: fengbojiang Date: Mon, 25 May 2026 15:25:55 +0800 Subject: [PATCH 2/2] Fix an issue of LD_PRELOAD. When there are no requests, add a lock window to prevent applications such as Nginx from being starved to death when they attempt to initialize and acquire a lock when idle_sleep is set to 0. --- adapter/syscall/ff_socket_ops.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/adapter/syscall/ff_socket_ops.c b/adapter/syscall/ff_socket_ops.c index fcc7b2dcf..612afdf8b 100644 --- a/adapter/syscall/ff_socket_ops.c +++ b/adapter/syscall/ff_socket_ops.c @@ -371,9 +371,9 @@ static pid_t ff_sys_fork(struct ff_fork_args *args) { void *parent = args->parent_thread_handle; - /* - * Linux has performed a real fork, and at this point, - * we simply need to create a new thread and duplicate the file descriptors + /* + * Linux has performed a real fork, and at this point, + * we simply need to create a new thread and duplicate the file descriptors * that the parent process has already opened. */ if (parent) { @@ -590,7 +590,7 @@ ff_handle_each_context() while(1) { nb_handled = tmp; - if (nb_handled) { + if (likely(nb_handled)) { for (i = 0; i < ff_so_zone->count; i++) { struct ff_so_context *sc = &ff_so_zone->sc[i]; @@ -625,7 +625,15 @@ ff_handle_each_context() break; } - rte_pause(); + /* + * When there are no requests, add a lock window to prevent applications such as Nginx from being starved + * to death when they attempt to initialize and acquire a lock when idle_sleep is set to 0 + */ + if (unlikely(!tmp)) { + rte_spinlock_unlock(&ff_so_zone->lock); + rte_pause(); + rte_spinlock_lock(&ff_so_zone->lock); + } } rte_spinlock_unlock(&ff_so_zone->lock);