Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCST suspend takes much time on iser target #185

Open
lvainblat opened this issue Jul 25, 2023 · 0 comments
Open

SCST suspend takes much time on iser target #185

lvainblat opened this issue Jul 25, 2023 · 0 comments

Comments

@lvainblat
Copy link

isert-scst has a dedicated workqueue where RDMA completion handler (isert_cq_comp_work_cb) runs. New commands arrive to isert_cq_comp_work_cb() that eventually checks (in scst_translate_lun()) if SCST is suspended:

 isert_cq_comp_work_cb ->
  isert_poll_cq ->
    isert_pdu_rx ->
      cmnd_rx_start ->
        scsi_cmnd_start ->
          scst_cmd_init_stage1_done ->
            scst_cmd_init_done ->
              scst_init_cmd ->
                __scst_init_cmd ->
                  scst_translate_lun

If SCST is suspended, scst_init_cmd() sleeps 50ms in order to "keep initiator away from too many BUSY commands".
The problem is that this sleep sticks the workqueue thread, that is responsible also to complete "old" requests, that were received before scst_suspend_activity(). As a result suspend itself may take much time, because "old" commands do not get thread context to be finished.

For example in my environment with ~80 outstanding commands suspend takes ~3sec. If I comment out msleep(50) in scst_init_cmd(), it takes just ~100ms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant