int lnet_lib_init(void);
void lnet_lib_exit(void);
+extern unsigned int lnet_numa_range;
extern int portal_rotor;
int lnet_notify(lnet_ni_t *ni, lnet_nid_t peer, int alive, cfs_time_t when);
bool lnet_ni_unique_net(struct list_head *nilist, char *iface);
void lnet_incr_dlc_seq(void);
__u32 lnet_get_dlc_seq_locked(void);
-inline __u32 lnet_get_numa_range(void);
struct lnet_peer_ni *lnet_get_next_peer_ni_locked(struct lnet_peer *peer,
struct lnet_peer_net *peer_net,
MODULE_PARM_DESC(use_tcp_bonding,
"Set to 1 to use socklnd bonding. 0 to use Multi-Rail");
-static __u32 lnet_numa_range = 0;
-module_param(lnet_numa_range, int, 0444);
+unsigned int lnet_numa_range = 0;
+module_param(lnet_numa_range, uint, 0444);
MODULE_PARM_DESC(lnet_numa_range,
"NUMA range to consider during Multi-Rail selection");
return atomic_read(&lnet_dlc_seq_no);
}
-inline __u32 lnet_get_numa_range(void)
-{
- return lnet_numa_range;
-}
-
/**
* LNet ioctl handler.
*
int best_credits;
int best_lpni_credits;
int md_cpt;
- int shortest_distance;
+ unsigned int shortest_distance;
/*
* get an initial CPT to use for locking. The idea here is not to
* b. Iterate through each of the peer_nets/nis to decide
* the best peer/local_ni pair to use
*/
- shortest_distance = INT_MAX;
+ shortest_distance = UINT_MAX;
best_credits = INT_MIN;
list_for_each_entry(peer_net, &peer->lp_peer_nets, lpn_on_peer_list) {
if (!lnet_is_peer_net_healthy_locked(peer_net))
*/
ni = NULL;
while ((ni = lnet_get_next_ni_locked(local_net, ni))) {
+ unsigned int distance;
int ni_credits;
- int distance;
if (!lnet_is_ni_healthy_locked(ni))
continue;
* All distances smaller than the NUMA range
* are treated equally.
*/
- if (distance < lnet_get_numa_range())
- distance = lnet_get_numa_range();
+ if (distance < lnet_numa_range)
+ distance = lnet_numa_range;
/*
* Select on shorter distance, then available