Whamcloud - gitweb
LU-1346 libcfs: cleanup macros in kp30.h
[fs/lustre-release.git] / lnet / klnds / socklnd / socklnd_modparams.c
index 0dd1544..2244c52 100644 (file)
@@ -1,8 +1,8 @@
-/* -*- 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
@@ -41,6 +41,12 @@ static int peer_timeout = 180;
 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");
@@ -107,11 +113,7 @@ static int keepalive_idle = 30;
 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");
@@ -172,6 +174,7 @@ int ksocknal_tunables_init(void)
 
         /* 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;
@@ -199,6 +202,12 @@ int ksocknal_tunables_init(void)
         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