Whamcloud - gitweb
* Guarded #define EXPORT_SYMTAB
authoreeb <eeb>
Sat, 26 Jul 2003 16:59:43 +0000 (16:59 +0000)
committereeb <eeb>
Sat, 26 Jul 2003 16:59:43 +0000 (16:59 +0000)
*  Bit the bullet and #defined PTL_MTU
   NB currently defined in <portals/lib-types.h>; maybe should move...

22 files changed:
lnet/include/lnet/lib-types.h
lnet/klnds/qswlnd/qswlnd.h
lnet/klnds/socklnd/socklnd.h
lnet/klnds/socklnd/socklnd_cb.c
lnet/klnds/toelnd/toenal.h
lnet/libcfs/debug.c
lnet/libcfs/proc.c
lnet/router/router.h
lustre/ldlm/ldlm_lib.c
lustre/obdclass/obdo.c
lustre/obdclass/otree.c
lustre/obdclass/simple.c
lustre/osc/osc_lib.c
lustre/portals/include/portals/lib-types.h
lustre/portals/knals/qswnal/qswnal.h
lustre/portals/knals/socknal/socknal.h
lustre/portals/knals/socknal/socknal_cb.c
lustre/portals/knals/toenal/toenal.h
lustre/portals/libcfs/debug.c
lustre/portals/libcfs/proc.c
lustre/portals/router/router.h
lustre/ptlrpc/ptlrpc_lib.c

index 47c0dd2..d300360 100644 (file)
@@ -138,8 +138,10 @@ typedef struct {
 
 /* temporary expedient: limit number of entries in discontiguous MDs */
 #if PTL_LARGE_MTU
-# define PTL_MD_MAX_IOV        64
+# define PTL_MTU        (512<<10)
+# define PTL_MD_MAX_IOV        128
 #else
+# define PTL_MTU        (64<<10)
 # define PTL_MD_MAX_IOV 16
 #endif
 
index 85e585b..ef19ace 100644 (file)
@@ -24,7 +24,9 @@
 
 #ifndef _QSWNAL_H
 #define _QSWNAL_H
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 
 #ifdef PROPRIETARY_ELAN
 # include <qsw/kernel.h>
@@ -93,12 +95,7 @@ typedef unsigned long kqsw_csum_t;
  * Performance Tuning defines
  * NB no mention of PAGE_SIZE for interoperability
  */
-#if PTL_LARGE_MTU
-# define KQSW_MAXPAYLOAD               (256<<10) /* biggest message this NAL will cope with */
-#else
-# define KQSW_MAXPAYLOAD               (64<<10) /* biggest message this NAL will cope with */
-#endif
-
+#define KQSW_MAXPAYLOAD                 PTL_MTU
 #define KQSW_SMALLPAYLOAD              ((4<<10) - KQSW_HDR_SIZE) /* small/large ep receiver breakpoint */
 
 #define KQSW_TX_MAXCONTIG              (1<<10) /* largest payload that gets made contiguous on transmit */
index 188d1f2..47ccd62 100644 (file)
@@ -25,7 +25,9 @@
  */
 
 #define DEBUG_PORTAL_ALLOC
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 
 #include <linux/config.h>
 #include <linux/module.h>
 
 #define SOCKNAL_N_SCHED num_online_cpus()       /* # socknal schedulers */
 
-#if PTL_LARGE_MTU
-# define SOCKNAL_MAX_FWD_PAYLOAD (256<<10)      /* biggest payload I can forward */
-#else
-# define SOCKNAL_MAX_FWD_PAYLOAD (64<<10)       /* biggest payload I can forward */
-#endif
+#define SOCKNAL_MAX_FWD_PAYLOAD PTL_MTU         /* biggest payload I can forward */
 
 #define SOCKNAL_NLTXS           128             /* # normal transmit messages */
 #define SOCKNAL_NNBLK_LTXS     128             /* # transmit messages reserved if can't block */
index ef74bc9..c9d805d 100644 (file)
@@ -1375,22 +1375,18 @@ int ksocknal_scheduler (void *arg)
         int                nloops = 0;
         int                id = sched - ksocknal_data.ksnd_schedulers;
         char               name[16];
-#if (CONFIG_SMP && CPU_AFFINITY)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-        int                cpu = cpu_logical_map(id % num_online_cpus());
-#else
-#warning "Take care of architecure specific logical APIC map"
-        int cpu = 1;    /* Have to change later. */
-#endif /* LINUX_VERSION_CODE */
-        
-        set_cpus_allowed (current, 1 << cpu);
-        id = cpu;
-#endif /* CONFIG_SMP && CPU_AFFINITY */
 
         snprintf (name, sizeof (name),"ksocknald[%d]", id);
         kportal_daemonize (name);
         kportal_blockallsigs ();
-        
+
+#if (CONFIG_SMP && CPU_AFFINITY)
+        if ((cpu_online_map & (1 << id)) != 0)
+                current->cpus_allowed = (1 << id);
+        else
+                CERROR ("Can't set CPU affinity for %s\n", name);
+#endif /* CONFIG_SMP && CPU_AFFINITY */
+
         spin_lock_irqsave (&sched->kss_lock, flags);
 
         while (!ksocknal_data.ksnd_shuttingdown) {
index f793d3b..3654848 100644 (file)
@@ -27,7 +27,9 @@
  */
 
 #define DEBUG_PORTAL_ALLOC
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 
 #include <linux/config.h>
 #include <linux/module.h>
index 2606819..9d15c8f 100644 (file)
@@ -20,7 +20,9 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 
 #include <linux/config.h>
 #include <linux/module.h>
index 2fa739a..bb6c377 100644 (file)
@@ -22,7 +22,9 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 
 #include <linux/config.h>
 #include <linux/module.h>
index b8c3bec..19159ab 100644 (file)
@@ -23,7 +23,9 @@
 
 #ifndef _KPTLROUTER_H
 #define _KPTLROUTER_H
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 
 #include <linux/config.h>
 #include <linux/module.h>
index e3f8673..55a00d2 100644 (file)
@@ -19,7 +19,9 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 #define DEBUG_SUBSYSTEM S_LDLM
 
 #ifdef __KERNEL__
index 51f7156..f1d1b27 100644 (file)
@@ -25,7 +25,9 @@
  */
 
 #define DEBUG_SUBSYSTEM S_CLASS
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 
 #include <linux/module.h>
 #include <linux/obd_class.h>
index 16ef088..e35424d 100644 (file)
@@ -24,7 +24,9 @@
  *  extent tree.  
  */
 
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 #include <linux/version.h>
 #include <linux/config.h>
 #include <linux/module.h>
index 1aceaeb..a285fb7 100644 (file)
@@ -21,7 +21,9 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 
 #include <linux/version.h>
 #include <linux/fs.h>
index db22668..e4219b0 100644 (file)
@@ -19,7 +19,9 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 #define DEBUG_SUBSYSTEM S_OSC
 
 #ifdef __KERNEL__
index 47c0dd2..d300360 100644 (file)
@@ -138,8 +138,10 @@ typedef struct {
 
 /* temporary expedient: limit number of entries in discontiguous MDs */
 #if PTL_LARGE_MTU
-# define PTL_MD_MAX_IOV        64
+# define PTL_MTU        (512<<10)
+# define PTL_MD_MAX_IOV        128
 #else
+# define PTL_MTU        (64<<10)
 # define PTL_MD_MAX_IOV 16
 #endif
 
index 85e585b..ef19ace 100644 (file)
@@ -24,7 +24,9 @@
 
 #ifndef _QSWNAL_H
 #define _QSWNAL_H
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 
 #ifdef PROPRIETARY_ELAN
 # include <qsw/kernel.h>
@@ -93,12 +95,7 @@ typedef unsigned long kqsw_csum_t;
  * Performance Tuning defines
  * NB no mention of PAGE_SIZE for interoperability
  */
-#if PTL_LARGE_MTU
-# define KQSW_MAXPAYLOAD               (256<<10) /* biggest message this NAL will cope with */
-#else
-# define KQSW_MAXPAYLOAD               (64<<10) /* biggest message this NAL will cope with */
-#endif
-
+#define KQSW_MAXPAYLOAD                 PTL_MTU
 #define KQSW_SMALLPAYLOAD              ((4<<10) - KQSW_HDR_SIZE) /* small/large ep receiver breakpoint */
 
 #define KQSW_TX_MAXCONTIG              (1<<10) /* largest payload that gets made contiguous on transmit */
index 188d1f2..47ccd62 100644 (file)
@@ -25,7 +25,9 @@
  */
 
 #define DEBUG_PORTAL_ALLOC
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 
 #include <linux/config.h>
 #include <linux/module.h>
 
 #define SOCKNAL_N_SCHED num_online_cpus()       /* # socknal schedulers */
 
-#if PTL_LARGE_MTU
-# define SOCKNAL_MAX_FWD_PAYLOAD (256<<10)      /* biggest payload I can forward */
-#else
-# define SOCKNAL_MAX_FWD_PAYLOAD (64<<10)       /* biggest payload I can forward */
-#endif
+#define SOCKNAL_MAX_FWD_PAYLOAD PTL_MTU         /* biggest payload I can forward */
 
 #define SOCKNAL_NLTXS           128             /* # normal transmit messages */
 #define SOCKNAL_NNBLK_LTXS     128             /* # transmit messages reserved if can't block */
index ef74bc9..c9d805d 100644 (file)
@@ -1375,22 +1375,18 @@ int ksocknal_scheduler (void *arg)
         int                nloops = 0;
         int                id = sched - ksocknal_data.ksnd_schedulers;
         char               name[16];
-#if (CONFIG_SMP && CPU_AFFINITY)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-        int                cpu = cpu_logical_map(id % num_online_cpus());
-#else
-#warning "Take care of architecure specific logical APIC map"
-        int cpu = 1;    /* Have to change later. */
-#endif /* LINUX_VERSION_CODE */
-        
-        set_cpus_allowed (current, 1 << cpu);
-        id = cpu;
-#endif /* CONFIG_SMP && CPU_AFFINITY */
 
         snprintf (name, sizeof (name),"ksocknald[%d]", id);
         kportal_daemonize (name);
         kportal_blockallsigs ();
-        
+
+#if (CONFIG_SMP && CPU_AFFINITY)
+        if ((cpu_online_map & (1 << id)) != 0)
+                current->cpus_allowed = (1 << id);
+        else
+                CERROR ("Can't set CPU affinity for %s\n", name);
+#endif /* CONFIG_SMP && CPU_AFFINITY */
+
         spin_lock_irqsave (&sched->kss_lock, flags);
 
         while (!ksocknal_data.ksnd_shuttingdown) {
index f793d3b..3654848 100644 (file)
@@ -27,7 +27,9 @@
  */
 
 #define DEBUG_PORTAL_ALLOC
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 
 #include <linux/config.h>
 #include <linux/module.h>
index 2606819..9d15c8f 100644 (file)
@@ -20,7 +20,9 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 
 #include <linux/config.h>
 #include <linux/module.h>
index 2fa739a..bb6c377 100644 (file)
@@ -22,7 +22,9 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 
 #include <linux/config.h>
 #include <linux/module.h>
index b8c3bec..19159ab 100644 (file)
@@ -23,7 +23,9 @@
 
 #ifndef _KPTLROUTER_H
 #define _KPTLROUTER_H
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 
 #include <linux/config.h>
 #include <linux/module.h>
index 3dfec9a..f45f352 100644 (file)
@@ -19,7 +19,9 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 #define DEBUG_SUBSYSTEM S_RPC
 
 #ifdef __KERNEL__