On 2020/04/28 3:45, Alexey Dobriyan wrote: >> - if (td->o.zone_mode == ZONE_MODE_ZBD) { >> - ret = zbd_adjust_block(td, io_u); >> - if (ret == io_u_eof) >> - return 1; >> - } >> + ret = zbd_adjust_block(td, io_u); >> + if (ret == io_u_eof) >> + return 1; > > This is cleaner code but probably won't result in performance changes > because it is trading a branch and a regular function call to a branch > and indirect function call. > Yes. I wondered how to best avoid overhead for the regular case. Tried different things but this one was the cleanest and probably has the least impact on zbd mode itself. I am starting to think that it may be better to have a zbd_fill_io_u() function called in place of the regular fill_io_u(). That would reduce the 3 conditionals we have for zbd to one only, and also allow more liberty with io_u adjustments for zbd without impacting the regular device case. Thoughts ? -- Damien Le Moal Western Digital Research