Skip to content

Commit

Permalink
[KERNEL] Set fake RTT to 500ms on manual server switch
Browse files Browse the repository at this point in the history
5ms was apparently way too low and lead to frequent switch-aways from
the local dnbd3-server on heavy load during bootup.
  • Loading branch information
srett committed Jan 18, 2024
1 parent 155d329 commit fe9c627
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kernel/blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ static int dnbd3_blk_ioctl(struct block_device *bdev, fmode_t mode, unsigned int
alt_server->best_count = 100;
} else {
for (j = 0; j < DISCOVER_HISTORY_SIZE; ++j)
if (alt_server->rtts[j] < 5000)
alt_server->rtts[j] = 5000;
if (alt_server->rtts[j] < 500000)
alt_server->rtts[j] = 500000;
alt_server->best_count = 0;
}
}
Expand Down

0 comments on commit fe9c627

Please sign in to comment.