Skip to content

add epoll polling mode, improve latency performance in RTT mode #869

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 27, 2025

Conversation

liujinhui-job
Copy link

@liujinhui-job liujinhui-job commented Mar 19, 2025

NOTICE:In the following data, sem_wait block mode, when the timeout > 0 or timeout < 0, the RTT latency performance is poor. After reviewing the code implementation, I found the main issue lies in the flawed sem_flag logic within the ff_sys_epoll_wait function. This defect causes both sem_wait and sem_timedwait to essentially fail their intended functions, which instead of helping, is actually degrading system performance. I will address this by submitting a code fix in the next commit to correct the semaphore handling logic.

Add epoll polling mode, improve latency performance in RTT mode.
The test results after modification are as follows:
i5-12400 4.4Ghz TSC 2.5Ghz
RTT测试
epoll_wait(polling mode)
timeout = 0
32字节 7822时钟周期 3.128us
1400字节 9684时钟周期 3.873us
timeout = -1
32字节 7398时钟周期 2.959us
1400字节 9478时钟周期 3.791us
timeout = 1000
32字节 7395时钟周期 2.958us
1400字节 9524时钟周期 3.809us

epoll_wait(sem_wait block mode)
timeout = 0
32字节 12674时钟周期 5.069us
1400字节 15000时钟周期 6us
timeout = -1
32字节 18764时钟周期 7.505us
1400字节 20408时钟周期 8.163us
timeout = 1000
32字节 17474时钟周期 6.989us
1400字节 20113时钟周期 8.045us

liujinhui-job added 4 commits March 19, 2025 15:47
@jfb8856606 jfb8856606 merged commit f98fb46 into F-Stack:dev Mar 27, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants