On Wed, May 21, 2025 at 12:08:02PM +0800, Ming Lei wrote: > Not dig into this implementation, will look into later. > > I guess it should work by extending elv_change_ctx. > > However we have other elevator_queue lifetime issue, that is why > ->elevator_lock is used almost everywhere. > > Another solution is to move all `sched_data` into 'struct elevator_queue': With "sched_data" you primarily mean the sched tags here, right? Anyway, getting scheduler owned items out of the request_queue and into the elevator data seems like the right thing to do, but it might indeed be very invasive.