When size>TABLE_SIZE it can hang as well (say, 10001), because when we get TABLE_SIZE IRQs we'll stop increasing table_idx, then we'll never be able to get out of the main loop. Signed-off-by: Peter Xu <peterx@xxxxxxxxxx> --- x86/tscdeadline_latency.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/x86/tscdeadline_latency.c b/x86/tscdeadline_latency.c index 3ad2950..0a3532d 100644 --- a/x86/tscdeadline_latency.c +++ b/x86/tscdeadline_latency.c @@ -112,7 +112,11 @@ int main(int argc, char **argv) delta = argc <= 1 ? 200000 : atol(argv[1]); size = argc <= 2 ? TABLE_SIZE : atol(argv[2]); breakmax = argc <= 3 ? 0 : atol(argv[3]); - printf("breakmax=%d\n", breakmax); + + if (size >= TABLE_SIZE) + size = TABLE_SIZE; + printf("delta=%d, size=%d, breakmax=%d\n", delta, size, breakmax); + test_tsc_deadline_timer(); do { -- 2.21.0