Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-3471

"client_obd_lock_t cl_loi_list_lock" in struct client_obd should not be a spin lock (b1_8)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Minor
    • None
    • None
    • 3
    • 8699

    Description

      client_obd_lock_t cl_loi_list_lock of struct client_obd is used to protect async page operations which are not guaranteed to not block even on linux, therefore
      spinlock (used for linux implementaion of cl_loi_list_lock) is not appropriate.

      For example, in the call chain:
      osc_check_rpcs() -> osc_send_oap_rpc() -> ptlrpcd_add_req():

      osc_check_rpc() is called with cli->cl_loi_list_lock spinlock held and
      ptlrpcd_add_req() may wait with timeout.

      In http://jira-nss.xy01.xyratex.com:8080/browse/MRP-1053 there was discovered a hang cause by scheduling from a process holding the cl_loi_list_lock.
      Corresponding core dump is removed already, and I do not remember exactly it hung that time.

      In new kernels, 3.0.42, the following call chain may block:
      osc_check_rpcs() -> osc_send_oap_rpc() -> ll_ap_make_ready() -> clear_page_dirty_for_io() -> page_mkclean() -> page_mkclean_file()

      page_mkclean_file() locks mutex:
      mutex_lock(&mapping->i_mmap_mutex);

      See http://jira-nss.xy01.xyratex.com:8080/browse/LELUS-116 for more details

      Attachments

        Activity

          People

            keith Keith Mannthey (Inactive)
            vsaveliev Vladimir Saveliev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: