|
@@ -543,7 +543,6 @@ ptlrpc_server_nthreads_check(struct ptlrpc_service *svc,
|
|
|
if (tc->tc_thr_factor != 0) {
|
|
|
int factor = tc->tc_thr_factor;
|
|
|
const int fade = 4;
|
|
|
- cpumask_t mask;
|
|
|
|
|
|
/*
|
|
|
* User wants to increase number of threads with for
|
|
@@ -557,8 +556,8 @@ ptlrpc_server_nthreads_check(struct ptlrpc_service *svc,
|
|
|
* have too many threads no matter how many cores/HTs
|
|
|
* there are.
|
|
|
*/
|
|
|
- cpumask_copy(&mask, topology_thread_cpumask(0));
|
|
|
- if (cpus_weight(mask) > 1) { /* weight is # of HTs */
|
|
|
+ /* weight is # of HTs */
|
|
|
+ if (cpumask_weight(topology_thread_cpumask(0)) > 1) {
|
|
|
/* depress thread factor for hyper-thread */
|
|
|
factor = factor - (factor >> 1) + (factor >> 3);
|
|
|
}
|
|
@@ -2752,7 +2751,6 @@ int ptlrpc_start_thread(struct ptlrpc_service_part *svcpt, int wait)
|
|
|
|
|
|
int ptlrpc_hr_init(void)
|
|
|
{
|
|
|
- cpumask_t mask;
|
|
|
struct ptlrpc_hr_partition *hrp;
|
|
|
struct ptlrpc_hr_thread *hrt;
|
|
|
int rc;
|
|
@@ -2770,8 +2768,7 @@ int ptlrpc_hr_init(void)
|
|
|
|
|
|
init_waitqueue_head(&ptlrpc_hr.hr_waitq);
|
|
|
|
|
|
- cpumask_copy(&mask, topology_thread_cpumask(0));
|
|
|
- weight = cpus_weight(mask);
|
|
|
+ weight = cpumask_weight(topology_thread_cpumask(0));
|
|
|
|
|
|
cfs_percpt_for_each(hrp, i, ptlrpc_hr.hr_partitions) {
|
|
|
hrp->hrp_cpt = i;
|