diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-01-16 09:18:39 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-02-05 10:07:34 -0700 |
commit | 06b23f92af87a84d70881b2ecaa72e00f7838264 (patch) | |
tree | bf23c4626e3b3c5ab01d0661e0d1b6644d10c8bf /block/blk-core.c | |
parent | da4c8c3d0975f031ef82d39927102e39fa6ddfac (diff) | |
download | lwn-06b23f92af87a84d70881b2ecaa72e00f7838264.tar.gz lwn-06b23f92af87a84d70881b2ecaa72e00f7838264.zip |
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>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 13b449df5ba0..314c3065891a 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1183,6 +1183,8 @@ void __blk_flush_plug(struct blk_plug *plug, bool from_schedule) */ if (unlikely(!rq_list_empty(plug->cached_rq))) blk_mq_free_plug_rqs(plug); + + current->flags &= ~PF_BLOCK_TS; } /** |