Request reset at config upload, increase client req handling freq on idle
This commit is contained in:
BIN
src/.main.c.swp
Normal file
BIN
src/.main.c.swp
Normal file
Binary file not shown.
@@ -167,7 +167,7 @@ void my_sleep(int microseconds) {
|
||||
// Compact threshold: if a client has more than this many messages in a single
|
||||
// outgoing buffer that all arrived within COMPACT_WINDOW_US, pack them into
|
||||
// a single CompactedMessage frame to reduce ws_sendframe_bin syscall overhead.
|
||||
#define COMPACT_THRESHOLD 4
|
||||
#define COMPACT_THRESHOLD 10
|
||||
#define COMPACT_WINDOW_US 100000ULL // 100 ms
|
||||
|
||||
static void compact_outgoing_buffer(SizedPtr* buf)
|
||||
@@ -570,7 +570,7 @@ int main(int argc, char** argv)
|
||||
}
|
||||
|
||||
|
||||
if (clients_try_timer == 0)
|
||||
if (clients_try_timer == 0 || emulState != EMUL_STATE_EXEC)
|
||||
{
|
||||
|
||||
if(getCurrentUsec() - lastTickCountWindowAt > 1000000)
|
||||
|
||||
@@ -601,6 +601,7 @@ void handleConfigCtrlMessage(
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
printf("[CTRL/CONFIG] loaded %zu devices\n", st.count);
|
||||
|
||||
// Apply projections
|
||||
@@ -733,6 +734,7 @@ void handleConfigCtrlMessage(
|
||||
st.seg_names[i][j] = strdup(handl->ctx->deviceMem->memsegNames[j]);
|
||||
}
|
||||
}
|
||||
*emulContext->resetRequest = 1;
|
||||
uint8_t* out = fb_build_config_device_id_mapping(
|
||||
nonce, st.paths, st.path_lens, st.seg_names, st.seg_counts, dc, &msg_len);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user