diff options
| author | Amir Shehata <amir.shehata@intel.com> | 2016-11-03 04:25:01 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-07 13:36:46 +0300 |
| commit | 9cc58f1eba46cbaafbc5eb0b519ba26ac1d0d26a (patch) | |
| tree | f1f51f984bb0e8d348e201cb74c1b11df4f84d9f /include/linux/workqueue.h | |
| parent | 028f78a9b83534f18ee7383cfad0052aa0de47a1 (diff) | |
| download | linux-9cc58f1eba46cbaafbc5eb0b519ba26ac1d0d26a.tar.xz | |
staging/lustre/ptlrpc: Correctly calculate hrp->hrp_nthrs
cpu_pattern can specify 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, if hrp_nthrs becomes zero, just set it to 1.
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-on: http://review.whamcloud.com/19106
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8492
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/workqueue.h')
0 files changed, 0 insertions, 0 deletions
