block: update cached timestamp post schedule/preemption
authorJens Axboe <axboe@kernel.dk>
Tue, 16 Jan 2024 16:18:39 +0000 (09:18 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 5 Feb 2024 17:07:34 +0000 (10:07 -0700)
commit06b23f92af87a84d70881b2ecaa72e00f7838264
treebf23c4626e3b3c5ab01d0661e0d1b6644d10c8bf
parentda4c8c3d0975f031ef82d39927102e39fa6ddfac
block: update cached timestamp post schedule/preemption

Mark the task as having a cached timestamp when set assign it, so we
can efficiently check if it needs updating post being scheduled back in.
This covers both the actual schedule out case, which would've flushed
the plug, and the preemption case which doesn't touch the plugged
requests (for many reasons, one of them being then we'd need to have
preemption disabled around plug state manipulation).

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
block/blk.h
include/linux/blkdev.h
include/linux/sched.h
kernel/sched/core.c