[LU-8492] ptlrpc: Correctly calculate hrp->hrp_nthrs Created: 10/Aug/16  Updated: 30/Jan/22  Resolved: 25/Oct/16

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.9.0

Type: Bug Priority: Minor
Reporter: Joseph Gmitter (Inactive) Assignee: Amir Shehata (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
Related
is related to LU-6285 Assert fails in staging client module... Resolved
is related to LU-8451 assert if cpu_pattern specifies exact... Resolved
Severity: 3
Rank (Obsolete): 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);


 Comments   
Comment by Joseph Gmitter (Inactive) [ 10/Aug/16 ]

Patch is http://review.whamcloud.com/#/c/19106/

Comment by Gerrit Updater [ 21/Oct/16 ]

remove incorrect comment

Comment by Doug Oucharek (Inactive) [ 21/Oct/16 ]

Dmitry: does your new patch replace http://review.whamcloud.com/#/c/19106/?

Comment by Dmitry Eremin (Inactive) [ 21/Oct/16 ]

My patch http://review.whamcloud.com/23222 contain this http://review.whamcloud.com/19106 patch.

Comment by Gerrit Updater [ 25/Oct/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/19106/
Subject: LU-8492 ptlrpc: Correctly calculate hrp->hrp_nthrs
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 402825050f95fff80a021e6eb04aa49a210648c9

Comment by Peter Jones [ 25/Oct/16 ]

Landed for 2.9

Generated at Sat Feb 10 02:18:02 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.