On 09/16/2013 10:22 AM, Juan Casse wrote: > Problem: > When specifying iodepth > 1 while doing random async io > without a random map (and using the default random generator), the > main while loop in do_io() will issue extra io in the amount of io > allowed to accumulate in the queue. For example, a job with size=24k > and bs=8k will perform 4 io instead of the expected 3. > > Reason: > The above behavior occurs because the while loop in do_io() > will continue until the amount of "completed io" >= size, but io > in the queue are not accounted for because they have not been > completed by io_u_queued_complete(). > > Exceptions: > The above behavior does not manifest itself when: > using random_generator=lfsr bacause lfsr knows when to stop > generating, and get_io_u() inside the while loop returns NULL, > breaking out of the loop. > using random map because random map ensures that all blocks > are hit, and after they are all hit, no more are generated. > > Proposed Solution: > Stop while loop based on bytes issued instead of bytes completed. Looks good, applied. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe fio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html