diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/ptlrpc')
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/client.c | 37 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/connection.c | 1 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/import.c | 15 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/layout.c | 6 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 29 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 5 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/nrs.c | 8 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 6 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/pinger.c | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 4 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 10 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 89 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/service.c | 9 |
13 files changed, 120 insertions, 101 deletions
diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c index 4882dd0a4483..0357f1d4532f 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/client.c +++ b/drivers/staging/lustre/lustre/ptlrpc/client.c @@ -285,14 +285,27 @@ static void ptlrpc_at_adj_net_latency(struct ptlrpc_request *req, time_t now = get_seconds(); LASSERT(req->rq_import); - at = &req->rq_import->imp_at; + + if (service_time > now - req->rq_sent + 3) { + /* bz16408, however, this can also happen if early reply + * is lost and client RPC is expired and resent, early reply + * or reply of original RPC can still be fit in reply buffer + * of resent RPC, now client is measuring time from the + * resent time, but server sent back service time of original + * RPC. + */ + CDEBUG((lustre_msg_get_flags(req->rq_reqmsg) & MSG_RESENT) ? + D_ADAPTTO : D_WARNING, + "Reported service time %u > total measured time " + CFS_DURATION_T"\n", service_time, + cfs_time_sub(now, req->rq_sent)); + return; + } /* Network latency is total time less server processing time */ - nl = max_t(int, now - req->rq_sent - service_time, 0) + 1/*st rounding*/; - if (service_time > now - req->rq_sent + 3 /* bz16408 */) - CWARN("Reported service time %u > total measured time " - CFS_DURATION_T"\n", service_time, - cfs_time_sub(now, req->rq_sent)); + nl = max_t(int, now - req->rq_sent - + service_time, 0) + 1; /* st rounding */ + at = &req->rq_import->imp_at; oldnl = at_measured(&at->iat_net_latency, nl); if (oldnl != 0) @@ -468,7 +481,6 @@ void ptlrpc_add_rqs_to_pool(struct ptlrpc_request_pool *pool, int num_rq) list_add_tail(&req->rq_list, &pool->prp_req_list); } spin_unlock(&pool->prp_lock); - return; } EXPORT_SYMBOL(ptlrpc_add_rqs_to_pool); @@ -1439,12 +1451,11 @@ static int ptlrpc_send_new_req(struct ptlrpc_request *req) if (req->rq_err) { req->rq_status = rc; return 1; - } else { - spin_lock(&req->rq_lock); - req->rq_wait_ctx = 1; - spin_unlock(&req->rq_lock); - return 0; } + spin_lock(&req->rq_lock); + req->rq_wait_ctx = 1; + spin_unlock(&req->rq_lock); + return 0; } CDEBUG(D_RPCTRACE, "Sending RPC pname:cluuid:pid:xid:nid:opc %s:%s:%d:%llu:%s:%d\n", @@ -2192,7 +2203,7 @@ int ptlrpc_set_wait(struct ptlrpc_request_set *set) if (set->set_interpret != NULL) { int (*interpreter)(struct ptlrpc_request_set *set, void *, int) = set->set_interpret; - rc = interpreter (set, set->set_arg, rc); + rc = interpreter(set, set->set_arg, rc); } else { struct ptlrpc_set_cbdata *cbdata, *n; int err; diff --git a/drivers/staging/lustre/lustre/ptlrpc/connection.c b/drivers/staging/lustre/lustre/ptlrpc/connection.c index 2a875ab57911..7e27397ce384 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/connection.c +++ b/drivers/staging/lustre/lustre/ptlrpc/connection.c @@ -184,6 +184,7 @@ static void * conn_key(struct hlist_node *hnode) { struct ptlrpc_connection *conn; + conn = hlist_entry(hnode, struct ptlrpc_connection, c_hash); return &conn->c_peer; } diff --git a/drivers/staging/lustre/lustre/ptlrpc/import.c b/drivers/staging/lustre/lustre/ptlrpc/import.c index 4ceb90db02a3..d5fc689c008b 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/import.c +++ b/drivers/staging/lustre/lustre/ptlrpc/import.c @@ -63,6 +63,19 @@ struct ptlrpc_connect_async_args { static void __import_set_state(struct obd_import *imp, enum lustre_imp_state state) { + switch (state) { + case LUSTRE_IMP_CLOSED: + case LUSTRE_IMP_NEW: + case LUSTRE_IMP_DISCON: + case LUSTRE_IMP_CONNECTING: + break; + case LUSTRE_IMP_REPLAY_WAIT: + imp->imp_replay_state = LUSTRE_IMP_REPLAY_LOCKS; + break; + default: + imp->imp_replay_state = LUSTRE_IMP_REPLAY; + } + imp->imp_state = state; imp->imp_state_hist[imp->imp_state_hist_idx].ish_state = state; imp->imp_state_hist[imp->imp_state_hist_idx].ish_time = @@ -966,7 +979,7 @@ static int ptlrpc_connect_interpret(const struct lu_env *env, imp->imp_resend_replay = 1; spin_unlock(&imp->imp_lock); - IMPORT_SET_STATE(imp, LUSTRE_IMP_REPLAY); + IMPORT_SET_STATE(imp, imp->imp_replay_state); } else { IMPORT_SET_STATE(imp, LUSTRE_IMP_RECOVER); } diff --git a/drivers/staging/lustre/lustre/ptlrpc/layout.c b/drivers/staging/lustre/lustre/ptlrpc/layout.c index bbef666b1d16..a42335e26de9 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/layout.c +++ b/drivers/staging/lustre/lustre/ptlrpc/layout.c @@ -811,8 +811,8 @@ struct req_capsule; .rmf_name = (name), \ .rmf_flags = (flags), \ .rmf_size = (size), \ - .rmf_swabber = (void (*)(void*))(swabber), \ - .rmf_dumper = (void (*)(void*))(dumper) \ + .rmf_swabber = (void (*)(void *))(swabber), \ + .rmf_dumper = (void (*)(void *))(dumper) \ } struct req_msg_field RMF_GENERIC_DATA = @@ -1839,7 +1839,7 @@ static int __req_capsule_offset(const struct req_capsule *pill, LASSERTF(offset > 0, "%s:%s, off=%d, loc=%d\n", pill->rc_fmt->rf_name, field->rmf_name, offset, loc); - offset --; + offset--; LASSERT(0 <= offset && offset < REQ_MAX_FIELD_NR); return offset; diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c index 0e2071b8a36e..9533ab976a33 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c @@ -181,7 +181,7 @@ static const char *ll_eopcode2str(__u32 opcode) return ll_eopcode_table[opcode].opname; } -#if defined (CONFIG_PROC_FS) +#if defined(CONFIG_PROC_FS) static void ptlrpc_lprocfs_register(struct proc_dir_entry *root, char *dir, char *name, struct proc_dir_entry **procroot_ret, @@ -267,7 +267,8 @@ ptlrpc_lprocfs_req_history_len_seq_show(struct seq_file *m, void *v) ptlrpc_service_for_each_part(svcpt, i, svc) total += svcpt->scp_hist_nrqbds; - return seq_printf(m, "%d\n", total); + seq_printf(m, "%d\n", total); + return 0; } LPROC_SEQ_FOPS_RO(ptlrpc_lprocfs_req_history_len); @@ -282,7 +283,8 @@ ptlrpc_lprocfs_req_history_max_seq_show(struct seq_file *m, void *n) ptlrpc_service_for_each_part(svcpt, i, svc) total += svc->srv_hist_nrqbds_cpt_max; - return seq_printf(m, "%d\n", total); + seq_printf(m, "%d\n", total); + return 0; } static ssize_t @@ -327,8 +329,8 @@ ptlrpc_lprocfs_threads_min_seq_show(struct seq_file *m, void *n) { struct ptlrpc_service *svc = m->private; - return seq_printf(m, "%d\n", - svc->srv_nthrs_cpt_init * svc->srv_ncpts); + seq_printf(m, "%d\n", svc->srv_nthrs_cpt_init * svc->srv_ncpts); + return 0; } static ssize_t @@ -371,7 +373,8 @@ ptlrpc_lprocfs_threads_started_seq_show(struct seq_file *m, void *n) ptlrpc_service_for_each_part(svcpt, i, svc) total += svcpt->scp_nthrs_running; - return seq_printf(m, "%d\n", total); + seq_printf(m, "%d\n", total); + return 0; } LPROC_SEQ_FOPS_RO(ptlrpc_lprocfs_threads_started); @@ -380,8 +383,8 @@ ptlrpc_lprocfs_threads_max_seq_show(struct seq_file *m, void *n) { struct ptlrpc_service *svc = m->private; - return seq_printf(m, "%d\n", - svc->srv_nthrs_cpt_limit * svc->srv_ncpts); + seq_printf(m, "%d\n", svc->srv_nthrs_cpt_limit * svc->srv_ncpts); + return 0; } static ssize_t @@ -1026,7 +1029,8 @@ LPROC_SEQ_FOPS_RO(ptlrpc_lprocfs_timeouts); static int ptlrpc_lprocfs_hp_ratio_seq_show(struct seq_file *m, void *v) { struct ptlrpc_service *svc = m->private; - return seq_printf(m, "%d", svc->srv_hpreq_ratio); + seq_printf(m, "%d", svc->srv_hpreq_ratio); + return 0; } static ssize_t ptlrpc_lprocfs_hp_ratio_seq_write(struct file *file, @@ -1083,7 +1087,7 @@ void ptlrpc_lprocfs_register_service(struct proc_dir_entry *entry, .data = svc}, {NULL} }; - static struct file_operations req_history_fops = { + static const struct file_operations req_history_fops = { .owner = THIS_MODULE, .open = ptlrpc_lprocfs_svc_req_history_open, .read = seq_read, @@ -1324,13 +1328,12 @@ int lprocfs_rd_pinger_recov(struct seq_file *m, void *n) { struct obd_device *obd = m->private; struct obd_import *imp = obd->u.cli.cl_import; - int rc; LPROCFS_CLIMP_CHECK(obd); - rc = seq_printf(m, "%d\n", !imp->imp_no_pinger_recover); + seq_printf(m, "%d\n", !imp->imp_no_pinger_recover); LPROCFS_CLIMP_EXIT(obd); - return rc; + return 0; } EXPORT_SYMBOL(lprocfs_rd_pinger_recov); diff --git a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c index f715e9a8b996..2fa2585584a3 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c +++ b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c @@ -383,12 +383,13 @@ int ptlrpc_send_reply(struct ptlrpc_request *req, int flags) req->rq_export->exp_obd->obd_minor); } - /* In order to keep interoprability with the client (< 2.3) which + /* In order to keep interoperability with the client (< 2.3) which * doesn't have pb_jobid in ptlrpc_body, We have to shrink the * ptlrpc_body in reply buffer to ptlrpc_body_v2, otherwise, the * reply buffer on client will be overflow. * - * XXX Remove this whenever we drop the interoprability with such client. + * XXX Remove this whenever we drop the interoperability with + * such client. */ req->rq_replen = lustre_shrink_msg(req->rq_repmsg, 0, sizeof(struct ptlrpc_body_v2), 1); diff --git a/drivers/staging/lustre/lustre/ptlrpc/nrs.c b/drivers/staging/lustre/lustre/ptlrpc/nrs.c index d5fd7215c72f..81ad7473242e 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/nrs.c +++ b/drivers/staging/lustre/lustre/ptlrpc/nrs.c @@ -155,9 +155,8 @@ static void nrs_policy_stop_primary(struct ptlrpc_nrs *nrs) { struct ptlrpc_nrs_policy *tmp = nrs->nrs_policy_primary; - if (tmp == NULL) { + if (tmp == NULL) return; - } nrs->nrs_policy_primary = NULL; @@ -912,7 +911,6 @@ static int nrs_register_policies_locked(struct ptlrpc_nrs *nrs) static int nrs_svcpt_setup_locked0(struct ptlrpc_nrs *nrs, struct ptlrpc_service_part *svcpt) { - int rc; enum ptlrpc_nrs_queue_type queue; LASSERT(mutex_is_locked(&nrs_core.nrs_mutex)); @@ -930,9 +928,7 @@ static int nrs_svcpt_setup_locked0(struct ptlrpc_nrs *nrs, INIT_LIST_HEAD(&nrs->nrs_policy_list); INIT_LIST_HEAD(&nrs->nrs_policy_queued); - rc = nrs_register_policies_locked(nrs); - - return rc; + return nrs_register_policies_locked(nrs); } /** diff --git a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c index 2f45f7657830..b51af9bf37b7 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c +++ b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c @@ -117,13 +117,13 @@ EXPORT_SYMBOL(lustre_msg_check_version); /* early reply size */ int lustre_msg_early_size(void) { - static int size = 0; + static int size; if (!size) { - /* Always reply old ptlrpc_body_v2 to keep interoprability + /* Always reply old ptlrpc_body_v2 to keep interoperability * with the old client (< 2.3) which doesn't have pb_jobid * in the ptlrpc_body. * - * XXX Remove this whenever we drop interoprability with such + * XXX Remove this whenever we drop interoperability with such * client. */ __u32 pblen = sizeof(struct ptlrpc_body_v2); diff --git a/drivers/staging/lustre/lustre/ptlrpc/pinger.c b/drivers/staging/lustre/lustre/ptlrpc/pinger.c index 340d98a64137..9dbda9332dd8 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/pinger.c +++ b/drivers/staging/lustre/lustre/ptlrpc/pinger.c @@ -545,7 +545,7 @@ void ptlrpc_pinger_wake_up(void) #define PET_READY 1 #define PET_TERMINATE 2 -static int pet_refcount = 0; +static int pet_refcount; static int pet_state; static wait_queue_head_t pet_waitq; LIST_HEAD(pet_list); diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h index 7fe2e584ffd7..a66dc3c6da41 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h +++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h @@ -76,7 +76,7 @@ void ptlrpc_initiate_recovery(struct obd_import *imp); int lustre_unpack_req_ptlrpc_body(struct ptlrpc_request *req, int offset); int lustre_unpack_rep_ptlrpc_body(struct ptlrpc_request *req, int offset); -#if defined (CONFIG_PROC_FS) +#if defined(CONFIG_PROC_FS) void ptlrpc_lprocfs_register_service(struct proc_dir_entry *proc_entry, struct ptlrpc_service *svc); void ptlrpc_lprocfs_unregister_service(struct ptlrpc_service *svc); @@ -263,7 +263,7 @@ void sptlrpc_enc_pool_fini(void); int sptlrpc_proc_enc_pool_seq_show(struct seq_file *m, void *v); /* sec_lproc.c */ -#if defined (CONFIG_PROC_FS) +#if defined(CONFIG_PROC_FS) int sptlrpc_lproc_init(void); void sptlrpc_lproc_fini(void); #else diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c index 4621b71fe0b6..0c178ec0e487 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c +++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c @@ -85,7 +85,7 @@ MODULE_PARM_DESC(ptlrpcd_bind_policy, "Ptlrpcd threads binding mode."); static struct ptlrpcd *ptlrpcds; struct mutex ptlrpcd_mutex; -static int ptlrpcd_users = 0; +static int ptlrpcd_users; void ptlrpcd_wake(struct ptlrpc_request *req) { @@ -511,10 +511,10 @@ static int ptlrpcd_bind(int index, int max) #if defined(CONFIG_NUMA) { int i; - mask = *cpumask_of_node(cpu_to_node(index)); + cpumask_copy(&mask, cpumask_of_node(cpu_to_node(index))); for (i = max; i < num_online_cpus(); i++) - cpu_clear(i, mask); - pc->pc_npartners = cpus_weight(mask) - 1; + cpumask_clear_cpu(i, &mask); + pc->pc_npartners = cpumask_weight(&mask) - 1; set_bit(LIOD_BIND, &pc->pc_flags); } #else @@ -554,7 +554,7 @@ static int ptlrpcd_bind(int index, int max) * that are already initialized */ for (pidx = 0, i = 0; i < index; i++) { - if (cpu_isset(i, mask)) { + if (cpumask_test_cpu(i, &mask)) { ppc = &ptlrpcds->pd_threads[i]; pc->pc_partners[pidx++] = ppc; ppc->pc_partners[ppc-> diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c index 0dabd83fd46f..c05a8554d737 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c @@ -125,52 +125,50 @@ static struct ptlrpc_enc_page_pool { */ int sptlrpc_proc_enc_pool_seq_show(struct seq_file *m, void *v) { - int rc; - spin_lock(&page_pools.epp_lock); - rc = seq_printf(m, - "physical pages: %lu\n" - "pages per pool: %lu\n" - "max pages: %lu\n" - "max pools: %u\n" - "total pages: %lu\n" - "total free: %lu\n" - "idle index: %lu/100\n" - "last shrink: %lds\n" - "last access: %lds\n" - "max pages reached: %lu\n" - "grows: %u\n" - "grows failure: %u\n" - "shrinks: %u\n" - "cache access: %lu\n" - "cache missing: %lu\n" - "low free mark: %lu\n" - "max waitqueue depth: %u\n" - "max wait time: "CFS_TIME_T"/%u\n" - , - totalram_pages, - PAGES_PER_POOL, - page_pools.epp_max_pages, - page_pools.epp_max_pools, - page_pools.epp_total_pages, - page_pools.epp_free_pages, - page_pools.epp_idle_idx, - get_seconds() - page_pools.epp_last_shrink, - get_seconds() - page_pools.epp_last_access, - page_pools.epp_st_max_pages, - page_pools.epp_st_grows, - page_pools.epp_st_grow_fails, - page_pools.epp_st_shrinks, - page_pools.epp_st_access, - page_pools.epp_st_missings, - page_pools.epp_st_lowfree, - page_pools.epp_st_max_wqlen, - page_pools.epp_st_max_wait, HZ - ); + seq_printf(m, + "physical pages: %lu\n" + "pages per pool: %lu\n" + "max pages: %lu\n" + "max pools: %u\n" + "total pages: %lu\n" + "total free: %lu\n" + "idle index: %lu/100\n" + "last shrink: %lds\n" + "last access: %lds\n" + "max pages reached: %lu\n" + "grows: %u\n" + "grows failure: %u\n" + "shrinks: %u\n" + "cache access: %lu\n" + "cache missing: %lu\n" + "low free mark: %lu\n" + "max waitqueue depth: %u\n" + "max wait time: " CFS_TIME_T "/%u\n", + totalram_pages, + PAGES_PER_POOL, + page_pools.epp_max_pages, + page_pools.epp_max_pools, + page_pools.epp_total_pages, + page_pools.epp_free_pages, + page_pools.epp_idle_idx, + get_seconds() - page_pools.epp_last_shrink, + get_seconds() - page_pools.epp_last_access, + page_pools.epp_st_max_pages, + page_pools.epp_st_grows, + page_pools.epp_st_grow_fails, + page_pools.epp_st_shrinks, + page_pools.epp_st_access, + page_pools.epp_st_missings, + page_pools.epp_st_lowfree, + page_pools.epp_st_max_wqlen, + page_pools.epp_st_max_wait, + HZ); spin_unlock(&page_pools.epp_lock); - return rc; + + return 0; } static void enc_pools_release_free_pages(long npages) @@ -365,8 +363,8 @@ static void enc_pools_insert(struct page ***pools, int npools, int npages) */ cur_npools = (page_pools.epp_total_pages + PAGES_PER_POOL - 1) / PAGES_PER_POOL; - end_npools = (page_pools.epp_total_pages + npages + PAGES_PER_POOL - 1) / - PAGES_PER_POOL; + end_npools = (page_pools.epp_total_pages + npages + PAGES_PER_POOL - 1) + / PAGES_PER_POOL; LASSERT(end_npools <= page_pools.epp_max_pools); np_idx = 0; @@ -816,9 +814,8 @@ int bulk_sec_desc_unpack(struct lustre_msg *msg, int offset, int swabbed) return -EINVAL; } - if (swabbed) { + if (swabbed) __swab32s(&bsd->bsd_nob); - } if (unlikely(bsd->bsd_version != 0)) { CERROR("Unexpected version %u\n", bsd->bsd_version); diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c index 635b12b22cef..8e61421515cb 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/service.c +++ b/drivers/staging/lustre/lustre/ptlrpc/service.c @@ -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; |