From afc2b4d4766b0e4ee8519ac6fcd98353d3864322 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Thu, 4 Jul 2024 20:09:51 +0200 Subject: TCP: Allow delay for sends This is not at all optimal for applications that already buffer their data but can have a huge impact on those that don't. Applications that don't wish to use this should disable this for their socket. --- kernel/drivers/pit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'kernel/drivers') diff --git a/kernel/drivers/pit.c b/kernel/drivers/pit.c index 9161885..b875449 100644 --- a/kernel/drivers/pit.c +++ b/kernel/drivers/pit.c @@ -51,7 +51,8 @@ void int_clock(reg_t *regs) { timer_current_uptime = tsc_calculate_ms(current_tsc); random_add_entropy_fast((u8 *)¤t_tsc, sizeof(current_tsc)); switch_counter++; - if (timer_current_uptime - last_flush > 50) { + if (timer_current_uptime - last_flush > 5) { + tcp_flush_buffers(); tcp_flush_acks(); last_flush = timer_current_uptime; } -- cgit v1.2.3