-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[feature][bug] Add tcp transport event dispatcher unsched flag & fix RDMA event dispatcher unsched flag #3238
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
base: master
Are you sure you want to change the base?
Changes from all commits
6b73ee9
77db6c5
d3317cc
95e13d0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,16 @@ DECLARE_int32(task_group_ntags); | |
| namespace brpc { | ||
|
|
||
| DEFINE_int32(event_dispatcher_num, 1, "Number of event dispatcher"); | ||
| DEFINE_bool(event_dispatcher_edisp_unsched, false, | ||
| "Disable event dispatcher schedule"); | ||
|
|
||
| #if BRPC_WITH_RDMA | ||
| namespace rdma { | ||
| DEFINE_bool(rdma_edisp_unsched, false, | ||
| "Deprecated and will be removed in a future release, " | ||
| "use event_dispatcher_edisp_unsched instead"); | ||
| } // namespace rdma | ||
| #endif | ||
|
|
||
| DEFINE_bool(usercode_in_pthread, false, | ||
| "Call user's callback in pthreads, use bthreads otherwise"); | ||
|
|
@@ -41,6 +51,15 @@ static bvar::LatencyRecorder* g_edisp_read_lantency = NULL; | |
| static bvar::LatencyRecorder* g_edisp_write_lantency = NULL; | ||
| static pthread_once_t g_edisp_once = PTHREAD_ONCE_INIT; | ||
|
|
||
| bool EventDispatcherUnsched() { | ||
| #if BRPC_WITH_RDMA | ||
| return FLAGS_event_dispatcher_edisp_unsched || | ||
| rdma::FLAGS_rdma_edisp_unsched; | ||
| #else | ||
| return FLAGS_event_dispatcher_edisp_unsched; | ||
| #endif | ||
| } | ||
|
Comment on lines
32
to
+61
|
||
|
|
||
| static void StopAndJoinGlobalDispatchers() { | ||
| for (int i = 0; i < FLAGS_task_group_ntags; ++i) { | ||
| for (int j = 0; j < FLAGS_event_dispatcher_num; ++j) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.