On 2/18/21 11:29 AM, Pavel Begunkov wrote: > Refactor how we do io_req_prep(), which is currently spilled across > multiple ifs and functions, that's a mess which is hard to validate. > It also cuts down amount of work we're doing during submission, where > nops(batch=32) test shows 15217 vs 16830 KIOPS, before and after > respectively. > > 1-6 are easy and should change nothing functionally. > > 7/11 cancels all the link, where currently it can be partially executed. > That happens only in some cases, and currently is not consistent. That > change alters the user visible behaviour and breaks one liburing test, > but looks like the right thing to do. (IMHO, the test is buggy in that > regard). > > 8/11 makes us to do one more opcode switch for where we previously > were doing io_req_defer_prep(). That includes all links, but the total > performance win, removing an extra async setup in 10/11, and just making > all the thing cleaner justifies it well enough. Looks good and tests good, I'm going to queue this up for 5.12 as it'll be easier for later fixes too. -- Jens Axboe