On Thu, Apr 07, 2022 at 10:45:07AM -0600, Logan Gunthorpe wrote: > Cleanup the code to make a common label for the schedule, > prepare_to_wait() and retry path. This drops the do_prepare boolean. > > This requires moveing the prepare_to_wait() above the > read_seqcount_begin() call on the retry path. However there's no > appearant requirement for ordering between these two calls. > > This should hopefully be easier to read rather than following the > extra do_prepare boolean, but it will also be used in a subsequent > patch to add more code common to all schedule() calls. Hm. Maybe it is marginally better, but I always hate gotos inside of loop bodys. What prevents us from factoring most of the loop body into a helper function?