(cfs_time_seconds(*kgnilnd_tunables.kgn_timeout * \
*kgnilnd_tunables.kgn_timeout))
+/* Should we use the no_retry flag with vzalloc */
+#define GNILND_VZALLOC_RETRY 0
+
/* reaper thread wakup interval */
#define GNILND_REAPER_THREAD_WAKE 1
/* reaper thread checks each conn NCHECKS time every kgnilnd_data.kgn_new_min_timeout */
int *kgn_thread_affinity; /* bind scheduler threads to cpus */
int *kgn_to_reconn_disable;/* disable reconnect after timeout */
int *kgn_thread_safe; /* use thread safe kgni API */
+ int *kgn_vzalloc_noretry; /* Should we pass the noretry flag */
} kgn_tunables_t;
typedef struct kgn_mbox_info {
static inline void *kgnilnd_vzalloc(int size)
{
- void *ret = __vmalloc(size, __GFP_HIGHMEM | GFP_NOIO | __GFP_NORETRY | __GFP_ZERO,
- PAGE_KERNEL);
+ void *ret;
+ if (*kgnilnd_tunables.kgn_vzalloc_noretry)
+ ret = __vmalloc(size, __GFP_HIGHMEM | GFP_NOIO | __GFP_NORETRY |
+ __GFP_ZERO,
+ PAGE_KERNEL);
+ else
+ ret = __vmalloc(size, __GFP_HIGHMEM | GFP_NOIO | __GFP_ZERO,
+ PAGE_KERNEL);
+
LIBCFS_ALLOC_POST(ret, size);
return ret;
}
MODULE_PARM_DESC(to_reconn_disable,
"Timed out connection waits for peer before reconnecting");
+static int vzalloc_no_retry = GNILND_VZALLOC_RETRY;
+module_param(vzalloc_no_retry, int, 0644);
+MODULE_PARM_DESC(vzalloc_no_retry,
+ "Should we pass the no_retry flag to vmalloc 1: no_retry 0: normal");
+
kgn_tunables_t kgnilnd_tunables = {
.kgn_min_reconnect_interval = &min_reconnect_interval,
.kgn_max_reconnect_interval = &max_reconnect_interval,
.kgn_thread_safe = &thread_safe,
.kgn_reg_fail_timeout = ®_fail_timeout,
.kgn_to_reconn_disable = &to_reconn_disable,
- .kgn_max_purgatory = &max_conn_purg
+ .kgn_max_purgatory = &max_conn_purg,
+ .kgn_vzalloc_noretry = &vzalloc_no_retry
};
int