ebpf的主从同步实现,QPS测试与内存池QPS测试。
This commit is contained in:
@@ -110,6 +110,13 @@ static void *worker_main(void *arg)
|
||||
task_t *done = (task_t *)(uintptr_t)cqe->user_data;
|
||||
task_finish(done, cqe->res);
|
||||
|
||||
// todo: 失败应该通知主线程,提供一个链表,把失败的taskpush进去。主线程用定时器任务定时处理失败信息然后destory。
|
||||
// 暂时用打印说明失败
|
||||
if(done->res < 0){
|
||||
printf("uring failed: fd:%d, offset:%ld\n", done->fd, done->off);
|
||||
}
|
||||
task_destroy(done);
|
||||
|
||||
io_uring_cqe_seen(&ctx->ring, cqe);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user