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

ptlrpc: Correctly calculate hrp->hrp_nthrs

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.9.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      This ticket separates out patch http://review.whamcloud.com/#/c/19106/ from LU-6285 was already resolved when the new issue was identified (as noted in LU-6285)

      It addresses the following:

      There is still an issue which could cause the assert.

      cpu_pattern can sepcify exactly 1 cpu in a partition:
      "0[0]". That means CPT0 will have CPU 0. CPU 0 can have
      hyperthreading enabled. This combination would result in

      weight = cfs_cpu_ht_nsiblings(0);
      hrp->hrp_nthrs = cfs_cpt_weight(ptlrpc_hr.hr_cpt_table, i);
      hrp->hrp_nthrs /= weight;
      

      evaluating to 0. Where

      cfs_cpt_weight(ptlrpc_hr.hr_cpt_table, i) == 1
      weight == 2
      

      Therefore only divide out with weight if

      hrp->hrp_nthrs >= weight
      

      This will avoid the assert:

      LASSERT(hrp->hrp_nthrs > 0);
      

      Attachments

        Issue Links

          Activity

            [LU-8492] ptlrpc: Correctly calculate hrp->hrp_nthrs
            adilger Andreas Dilger made changes -
            Link New: This issue is related to LU-8451 [ LU-8451 ]
            pjones Peter Jones made changes -
            Fix Version/s New: Lustre 2.9.0 [ 11891 ]
            Fix Version/s Original: Lustre 2.10.0 [ 12204 ]
            Resolution New: Fixed [ 1 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]
            pjones Peter Jones made changes -
            Link New: This issue is duplicated by LDEV-333 [ LDEV-333 ]
            jgmitter Joseph Gmitter (Inactive) made changes -
            Link New: This issue is related to LU-6285 [ LU-6285 ]
            jgmitter Joseph Gmitter (Inactive) made changes -
            Description Original: This ticket separates out patch http://review.whamcloud.com/#/c/19106/ from LU-6285 was already resolved when the new issue was identified (as noted in LU-6285)

            There is still an issue which could cause the assert.

            cpu_pattern can sepcify exactly 1 cpu in a partition:
            "0[0]". That means CPT0 will have CPU 0. CPU 0 can have
            hyperthreading enabled. This combination would result in
            {code}
            weight = cfs_cpu_ht_nsiblings(0);
            hrp->hrp_nthrs = cfs_cpt_weight(ptlrpc_hr.hr_cpt_table, i);
            hrp->hrp_nthrs /= weight;
            {code}
            evaluating to 0. Where
            {code}
            cfs_cpt_weight(ptlrpc_hr.hr_cpt_table, i) == 1
            weight == 2
            {code}
            Therefore only divide out with weight if
            {code}
            hrp->hrp_nthrs >= weight
            {code}
            This will avoid the assert:
            {code}
            LASSERT(hrp->hrp_nthrs > 0);
            {code}
            New: This ticket separates out patch http://review.whamcloud.com/#/c/19106/ from LU-6285 was already resolved when the new issue was identified (as noted in LU-6285)

            It addresses the following:


            There is still an issue which could cause the assert.

            cpu_pattern can sepcify exactly 1 cpu in a partition:
            "0[0]". That means CPT0 will have CPU 0. CPU 0 can have
            hyperthreading enabled. This combination would result in
            {code}
            weight = cfs_cpu_ht_nsiblings(0);
            hrp->hrp_nthrs = cfs_cpt_weight(ptlrpc_hr.hr_cpt_table, i);
            hrp->hrp_nthrs /= weight;
            {code}
            evaluating to 0. Where
            {code}
            cfs_cpt_weight(ptlrpc_hr.hr_cpt_table, i) == 1
            weight == 2
            {code}
            Therefore only divide out with weight if
            {code}
            hrp->hrp_nthrs >= weight
            {code}
            This will avoid the assert:
            {code}
            LASSERT(hrp->hrp_nthrs > 0);
            {code}
            jgmitter Joseph Gmitter (Inactive) made changes -
            Description Original: There is still an issue which could cause the assert.

            cpu_pattern can sepcify exactly 1 cpu in a partition:
            "0[0]". That means CPT0 will have CPU 0. CPU 0 can have
            hyperthreading enabled. This combination would result in
            {code}
            weight = cfs_cpu_ht_nsiblings(0);
            hrp->hrp_nthrs = cfs_cpt_weight(ptlrpc_hr.hr_cpt_table, i);
            hrp->hrp_nthrs /= weight;
            {code}
            evaluating to 0. Where
            {code}
            cfs_cpt_weight(ptlrpc_hr.hr_cpt_table, i) == 1
            weight == 2
            {code}
            Therefore only divide out with weight if
            {code}
            hrp->hrp_nthrs >= weight
            {code}
            This will avoid the assert:
            {code}
            LASSERT(hrp->hrp_nthrs > 0);
            {code}
            New: This ticket separates out patch http://review.whamcloud.com/#/c/19106/ from LU-6285 was already resolved when the new issue was identified (as noted in LU-6285)

            There is still an issue which could cause the assert.

            cpu_pattern can sepcify exactly 1 cpu in a partition:
            "0[0]". That means CPT0 will have CPU 0. CPU 0 can have
            hyperthreading enabled. This combination would result in
            {code}
            weight = cfs_cpu_ht_nsiblings(0);
            hrp->hrp_nthrs = cfs_cpt_weight(ptlrpc_hr.hr_cpt_table, i);
            hrp->hrp_nthrs /= weight;
            {code}
            evaluating to 0. Where
            {code}
            cfs_cpt_weight(ptlrpc_hr.hr_cpt_table, i) == 1
            weight == 2
            {code}
            Therefore only divide out with weight if
            {code}
            hrp->hrp_nthrs >= weight
            {code}
            This will avoid the assert:
            {code}
            LASSERT(hrp->hrp_nthrs > 0);
            {code}
            jgmitter Joseph Gmitter (Inactive) created issue -

            People

              ashehata Amir Shehata (Inactive)
              jgmitter Joseph Gmitter (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: