aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_locked.c
diff options
context:
space:
mode:
authorhanlin <hanlin_wang@163.com>2020-05-19 17:34:17 +0800
committerFlorin Coras <florin.coras@gmail.com>2020-05-20 15:30:28 +0000
commit4266d4d5ff96043f6d2fbd217e97eddf8916e346 (patch)
tree4fcee312019fc21bc658e57fbf9c6898022a53d2 /src/vcl/vcl_locked.c
parentcf755442670b9126b3f6aabe27c2bfb32179fafa (diff)
vcl: nest vcl_mq_epfd to support epoll_wait without high CPU usage
Now, libc epfd and vls epfd are independent and can only epoll_wait independently without timeout, then app calling epoll_wait will occupy high CPU. So we nest vcl_mq_epfd into libc epfd when using eventfd with VPP, and then we can only epoll_wait libc epfd with specified timeout. Type: feature Signed-off-by: hanlin <hanlin_wang@163.com> Change-Id: I6b6e0f501c769e186714bfbc187cfaed2533b4c2 Signed-off-by: hanlin <hanlin_wang@163.com>
Diffstat (limited to 'src/vcl/vcl_locked.c')
-rw-r--r--src/vcl/vcl_locked.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vcl/vcl_locked.c b/src/vcl/vcl_locked.c
index ae9c9762dc1..19522c05d61 100644
--- a/src/vcl/vcl_locked.c
+++ b/src/vcl/vcl_locked.c
@@ -1381,6 +1381,12 @@ vls_app_create (char *app_name)
return VPPCOM_OK;
}
+unsigned char
+vls_use_eventfd (void)
+{
+ return vcm->cfg.use_mq_eventfd;
+}
+
/*
* fd.io coding-style-patch-verification: ON
*