-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
*
- * Copyright (c) 2011, Whamcloud, Inc.
+ * Copyright (c) 2011, 2012, Intel Corporation.
*
* Author: Eric Barton <eric@bartonsoftware.com>
*
CFS_MODULE_PARM(peer_timeout, "i", int, 0444,
"Seconds without aliveness news to declare peer dead (<=0 to disable)");
+/* Number of daemons in each thread pool which is percpt,
+ * we will estimate reasonable value based on CPUs if it's not set. */
+static unsigned int nscheds;
+CFS_MODULE_PARM(nscheds, "i", int, 0444,
+ "# scheduler daemons in each pool while starting");
+
static int nconnds = 4;
CFS_MODULE_PARM(nconnds, "i", int, 0444,
"# connection daemons while starting");
CFS_MODULE_PARM(max_reconnectms, "i", int, 0644,
"max connection retry interval (mS)");
-#if defined(__APPLE__) && !defined(__DARWIN8__)
-# define DEFAULT_EAGER_ACK 1
-#else
-# define DEFAULT_EAGER_ACK 0
-#endif
-static int eager_ack = DEFAULT_EAGER_ACK;
+static int eager_ack;
CFS_MODULE_PARM(eager_ack, "i", int, 0644,
"send tcp ack packets eagerly");
CFS_MODULE_PARM(min_bulk, "i", int, 0644,
"smallest 'large' message");
-#ifdef __APPLE__
-# ifdef __DARWIN8__
-# define DEFAULT_BUFFER_SIZE (224*1024)
-# else
-# define DEFAULT_BUFFER_SIZE (1152 * 1024)
-# endif
-#else
# define DEFAULT_BUFFER_SIZE 0
-#endif
static int tx_buffer_size = DEFAULT_BUFFER_SIZE;
CFS_MODULE_PARM(tx_buffer_size, "i", int, 0644,
"socket tx buffer size (0 for system default)");
CFS_MODULE_PARM(keepalive_idle, "i", int, 0644,
"# idle seconds before probe");
-#ifdef HAVE_BGL_SUPPORT
-#define DEFAULT_KEEPALIVE_COUNT 100
-#else
#define DEFAULT_KEEPALIVE_COUNT 5
-#endif
static int keepalive_count = DEFAULT_KEEPALIVE_COUNT;
CFS_MODULE_PARM(keepalive_count, "i", int, 0644,
"# missed probes == dead");
/* initialize ksocknal_tunables structure */
ksocknal_tunables.ksnd_timeout = &sock_timeout;
+ ksocknal_tunables.ksnd_nscheds = &nscheds;
ksocknal_tunables.ksnd_nconnds = &nconnds;
ksocknal_tunables.ksnd_nconnds_max = &nconnds_max;
ksocknal_tunables.ksnd_min_reconnectms = &min_reconnectms;
ksocknal_tunables.ksnd_zc_recv_min_nfrags = &zc_recv_min_nfrags;
#ifdef CPU_AFFINITY
+ if (enable_irq_affinity) {
+ CWARN("irq_affinity is removed from socklnd because modern "
+ "computer always has fast CPUs and more cores than "
+ "# NICs, although you still can set irq_affinity by "
+ "another way, please check manual for details.\n");
+ }
ksocknal_tunables.ksnd_irq_affinity = &enable_irq_affinity;
#endif