Skip to content
  • Tejun Heo's avatar
    blk-throttle: separate out throtl_service_queue->pending_timer from throtl_data->dispatch_work · 69df0ab0
    Tejun Heo authored
    
    
    Currently, throtl_data->dispatch_work is a delayed_work item which
    handles both delayed dispatch and issuing bios.  The two tasks will be
    separated to support proper hierarchy.  To prepare for that, this
    patch separates out the timer into throtl_service_queue->pending_timer
    from throtl_data->dispatch_work and make the latter a work_struct.
    
    * As the timer is now per-service_queue, it's initialized and
      del_sync'd as its corresponding service_queue is created and
      destroyed.  The timer, when triggered, simply schedules
      throtl_data->dispathc_work for execution.
    
    * throtl_schedule_delayed_work() is renamed to
      throtl_schedule_pending_timer() and takes @sq and @expires now.
    
    * Simiarly, throtl_schedule_next_dispatch() now takes @sq, which
      should be the parent_sq of the service_queue which just got a new
      bio or updated.  As the parent_sq is always the top-level
      service_queue now, this doesn't change anything at this point.
    
    This patch doesn't introduce any behavior differences.
    
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatarVivek Goyal <vgoyal@redhat.com>
    69df0ab0