-/* -*- 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, 2012, Intel Corporation.
+ *
* Author: Eric Barton <eric@bartonsoftware.com>
*
* Portals is free software; you can redistribute it and/or
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");
+ "# connection daemons while starting");
+
+static int nconnds_max = 64;
+CFS_MODULE_PARM(nconnds_max, "i", int, 0444,
+ "max # connection daemons");
static int min_reconnectms = 1000;
CFS_MODULE_PARM(min_reconnectms, "i", int, 0644,
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_max_reconnectms = &max_reconnectms;
ksocknal_tunables.ksnd_eager_ack = &eager_ack;
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