On Tue, 22 Apr 2025 at 04:03, Yu Kuai <yukuai1@xxxxxxxxxxxxxxx> wrote: > > So, either preempt takes a long time, or generate lots of bio to plug > takes a long time can both results in larger iostat IO latency. I still > think delay setting request start_time to blk_mq_flush_plug_list() might > be a reasonable fix. I'll try out your proposed fix also. Is it not possible for a task to be preempted during a blk_mq_flush_plug_list() call, e.g. in the driver layer? I understand that you might not want to issue I/O on preempt, but that's a distinct problem from clearing the cached ktime no? There is no upper bound on the amount of time a task might be scheduled out due to preempt which means there is no limit to the staleness of that value. I would assume the only safe thing to do (like is done for various other timestamps) is reset it when the task gets scheduled out.