Skip to content

Commit

Permalink
Remove TriggerBufferOrganizer and set BO RPC threads to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherHogan committed Jun 30, 2021
1 parent 88c2ffe commit b174b5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
5 changes: 0 additions & 5 deletions src/rpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ std::string GetProtocol(RpcContext *rpc);
void StartBufferOrganizer(SharedMemoryContext *context, RpcContext *rpc,
Arena *arena, const char *addr, int num_threads,
int port);
#if 0
void TriggerBufferOrganizer(RpcContext *rpc, const char *func_name,
const std::string &blob_name, SwapBlob swap_blob,
int retries);
#endif
} // namespace hermes

// TODO(chogan): I don't like that code similar to this is in buffer_pool.cc.
Expand Down
18 changes: 2 additions & 16 deletions src/rpc_thallium.cc
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,9 @@ void StartBufferOrganizer(SharedMemoryContext *context, RpcContext *rpc,

ThalliumState *state = GetThalliumState(rpc);

int num_bo_rpc_threads = 1;
state->bo_engine = new tl::engine(addr, THALLIUM_SERVER_MODE, true,
num_threads);
num_bo_rpc_threads);
tl::engine *rpc_server = state->bo_engine;

std::string rpc_server_name = rpc_server->self();
Expand Down Expand Up @@ -486,21 +487,6 @@ void StartBufferOrganizer(SharedMemoryContext *context, RpcContext *rpc,
rpc_server->define("EnqueueBoTask", rpc_enqueue_bo_task);
}

#if 0
void TriggerBufferOrganizer(RpcContext *rpc, const char *func_name,
const std::string &blob_name, SwapBlob swap_blob,
const api::Context &ctx) {
std::string server_name = GetServerName(rpc, rpc->node_id, true);
std::string protocol = GetProtocol(rpc);
tl::engine engine(protocol, THALLIUM_CLIENT_MODE, true);
tl::remote_procedure remote_proc = engine.define(func_name);
tl::endpoint server = engine.lookup(server_name);
remote_proc.disable_response();
// TODO(chogan): Templatize?
remote_proc.on(server)(swap_blob, blob_name, ctx);
}
#endif

void StartGlobalSystemViewStateUpdateThread(SharedMemoryContext *context,
RpcContext *rpc, Arena *arena,
double sleep_ms) {
Expand Down

0 comments on commit b174b5a

Please sign in to comment.