All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] block: invalidate cached plug timestamp on context switch
@ 2026-06-16 14:15 Usama Arif
  2026-06-16 14:15 ` [PATCH 1/2] kernel/fork: clear PF_BLOCK_TS in copy_process() Usama Arif
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Usama Arif @ 2026-06-16 14:15 UTC (permalink / raw)
  To: axboe, linux-block, bsegall, dietmar.eggemann, juri.lelli,
	kprateek.nayak, linux-kernel, mgorman, mingo, peterz, rostedt,
	vincent.guittot, vschneid
  Cc: shakeel.butt, hannes, riel, kernel-team, Usama Arif

The details for this are in patch 2. The main reason for this series
is to invalidate the cached timestamp on context switch. This was
done in sched_update_worker() only before which was resulting in
blk-iocost reading stale timestamps and throttling based on wrong
information.

Patch 1 is a prerequisite to create the invariant that
PF_BLOCK_TS set implies current->plug != NULL.

v2 -> v3:
  https://lore.kernel.org/all/20260612094042.3350401-1-usama.arif@linux.dev/
  - Add patch 1 to clear PF_BLOCK_TS in copy_process() so the
    invariant survives fork.
  - Drop the if (plug) NULL check inside blk_plug_invalidate_ts(),
    relying on the invariant established by patch 1. (Peter Zijlstra)

v1 -> v2:
  https://lore.kernel.org/all/20260611231428.345098-1-usama.arif@linux.dev/
  - Move the PF_BLOCK_TS check into blk_plug_invalidate_ts() and
    upgrade it to __always_inline (Peter Zijlstra).
  - Drop the tsk parameter; the helper only ever operates on current.
 
Usama Arif (2):
  kernel/fork: clear PF_BLOCK_TS in copy_process()
  block: invalidate cached plug timestamp after task switch

 include/linux/blkdev.h | 16 ++++++----------
 kernel/fork.c          |  1 +
 kernel/sched/core.c    | 12 ++++++++----
 3 files changed, 15 insertions(+), 14 deletions(-)

-- 
2.53.0-Meta


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-06-16 17:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-16 14:15 [PATCH 0/2] block: invalidate cached plug timestamp on context switch Usama Arif
2026-06-16 14:15 ` [PATCH 1/2] kernel/fork: clear PF_BLOCK_TS in copy_process() Usama Arif
2026-06-16 14:15 ` [PATCH 2/2] block: invalidate cached plug timestamp after task switch Usama Arif
2026-06-16 16:08 ` [PATCH 0/2] block: invalidate cached plug timestamp on context switch Jens Axboe
2026-06-16 16:10   ` Jens Axboe
2026-06-16 16:54     ` Peter Zijlstra
2026-06-16 17:09       ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.