Optimize packet I/O and timeouts

- Introduce per-thread I/O statistics for packet I/O to reduce performance overhead.
- Implement packet_io_yield() for better thread management during I/O operations.
- Refactor time wheel management:
  - Replace timeouts-based cron tasks with (now_ts - last_ts > timeout) for scheduled tasks.
  - Update the time wheel every 5 ms for improved time management.
This commit is contained in:
luwenpeng
2024-04-18 14:20:28 +08:00
parent 892842c61b
commit 5508454a1b
32 changed files with 377 additions and 540 deletions

View File

@@ -111,8 +111,7 @@ struct session *session_manager_get_evicted_session(struct session_manager *mgr)
// return >0: next expire interval
uint64_t session_manager_get_expire_interval(struct session_manager *mgr);
void session_manager_print_stat(struct session_manager *mgr);
struct session_manager_stat *session_manager_get_stat(struct session_manager *mgr);
struct session_manager_stat *session_manager_stat(struct session_manager *mgr);
#ifdef __cpluscplus
}