Skip to contentSkip to conversation

t/io_uring: Fix the parameters calculation for multiple threads scenario

PATCH In review Pankaj Raghav 2 participants 2 messages Oct 15, 2021 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20211015121029eucas1p159b174d661cb7a67684032107f870b5c@eucas1p1.samsung.com

#1 lore raw

PATCH 1/1 t/io_uring: Fix the parameters calculation for multiple threads scenario

The this_done, this_call and this_reap parameter should be a summation of the corresponding field from all the submitters.

Currently, we are adding the done, calls and reaps param of the last used submitter nthread times.

---
 t/io_uring.c | 1 +
 1 file changed, 1 insertion(+)
t/io_uring.c +1 -0
index 5a80e074..a87042f8 100644
@@ -1348,6 +1348,7 @@ int main(int argc, char *argv[])
 			stats_running = 1;
 
 		for (j = 0; j < nthreads; j++) {
+			s = get_submitter(j);
 			this_done += s->done;
 			this_call += s->calls;
 			this_reap += s->reaps;
Signature · 1 line
2.25.1
#2 lore raw
Quoted 5 lines · Pankaj Raghav

The this_done, this_call and this_reap parameter should be a summation of the corresponding field from all the submitters.

Currently, we are adding the done, calls and reaps param of the last used submitter nthread times.

Oops, applied thanks.

Signature · 1 line
Jens Axboe