Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ea1f1786 authored by Nitin Rawat's avatar Nitin Rawat
Browse files

scsi: ufs: Make recovery wq as multithreaded



Change dedicated work queue created for ufs recovery workers
(eh_handler,rls_handler & eeh_handler) from single threaded
to multithreaded workqueue.

Few instances of deadlock is observed where there is
one worker running on the workqueue waiting for the
lock which is held by other worker thread waiting
on the single threaded workqueue.

    Task name: kworker/u16:4 pid: 5047 cpu: 5 prio: 120
    state: 0x2 exit_state: 0x0
    Stack:
    __switch_to+0x12c
    __schedule+0x908
    schedule+0x70
    rwsem_down_write_failed+0x388owner
    down_write+0x4c
    ufshcd_rls_handler+0x58
    process_one_work+0x20c
    worker_thread+0x328
    kthread+0x118
    ret_from_fork+0x10
    ret_from_fork+0x10
ufshcd_rls_handler is running and is waiting for hba->lock .
=======================================================
    Task name: work pid: 11008 cpu: 5 prio: 98
    state: 0x2 exit_state: 0x0
    Stack:
    __switch_to+0x12c
    __schedule+0x908
    schedule+0x70
    schedule_timeout+0x3c
    wait_for_common+0x12c
    wait_for_completion+0x14
    __flush_work+0x214
    flush_work+0x10
    ufshcd_link_recovery+0x50
    ufshcd_uic_hibern8_enter+0x20c
    ufshcd_devfreq_scale+0x100
    ufshcd_clk_scaling_enable+0x150
    msm_set_storage_clk_scaling+0x3c
    hypnus_ioctl_set_storage_scaling+0x1c
    hypnus_ioctl+0xe8
    do_vfs_ioctl+0x5dc
    __arm64_sys_ioctl+0x70
    el0_svc_common+0xb8
    el0_svc_handler+0x6c
    el0_svc+0x8
[<0>] UNKNOWN+0x0
ufshcd_link_recovery has acquired hba_lock and is waiting for
waiting for the completion of rls_handler.

Change-Id: I0d659d6b527951d30fc1cd8edcee42fbc6a2ea2a
Signed-off-by: default avatarNitin Rawat <nitirawa@codeaurora.org>
parent dd22fab7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment