Whamcloud - gitweb
b=19944 promise every cpu has at least 2MB debug memory.
authorLanden <landen@sun.com>
Tue, 30 Mar 2010 19:00:32 +0000 (12:00 -0700)
committerRobert Read <rread@sun.com>
Tue, 30 Mar 2010 19:00:32 +0000 (12:00 -0700)
i=johann

libcfs/libcfs/tracefile.c
lustre/tests/cfg/local.sh

index 63a23ef..47f3ab5 100644 (file)
@@ -907,8 +907,11 @@ int cfs_trace_set_debug_mb(int mb)
         int limit = cfs_trace_max_debug_mb();
         struct cfs_trace_cpu_data *tcd;
 
         int limit = cfs_trace_max_debug_mb();
         struct cfs_trace_cpu_data *tcd;
 
-        if (mb < cfs_num_possible_cpus())
+        if (mb < cfs_num_possible_cpus()) {
+                printk(KERN_ERR "Cannot set debug_mb to %d, the value should be >= %d\n",
+                       mb, num_possible_cpus());
                 return -EINVAL;
                 return -EINVAL;
+        }
 
         if (mb > limit) {
                 printk(CFS_KERN_ERR "Lustre: Refusing to set debug buffer size "
 
         if (mb > limit) {
                 printk(CFS_KERN_ERR "Lustre: Refusing to set debug buffer size "
index d4c32b6..46a9fc2 100644 (file)
@@ -45,6 +45,9 @@ SINGLEMDS=${SINGLEMDS:-"mds1"}
 TIMEOUT=${TIMEOUT:-20}
 PTLDEBUG=${PTLDEBUG:-0x33f0404}
 DEBUG_SIZE=${DEBUG_SIZE:-10}
 TIMEOUT=${TIMEOUT:-20}
 PTLDEBUG=${PTLDEBUG:-0x33f0404}
 DEBUG_SIZE=${DEBUG_SIZE:-10}
+if [ `grep processor /proc/cpuinfo | wc -l` -gt 5 ]; then
+    DEBUG_SIZE=$((`grep processor /proc/cpuinfo | wc -l` * 2))   # promise 2MB for every cpu
+fi
 SUBSYSTEM=${SUBSYSTEM:- 0xffb7e3ff}
 
 ENABLE_QUOTA=${ENABLE_QUOTA:-""}
 SUBSYSTEM=${SUBSYSTEM:- 0xffb7e3ff}
 
 ENABLE_QUOTA=${ENABLE_QUOTA:-""}