Disabled the newly introduced CKRM numtask forkrate code.
authorMarc Fiuczynski <mef@cs.princeton.edu>
Tue, 12 Apr 2005 22:32:03 +0000 (22:32 +0000)
committerMarc Fiuczynski <mef@cs.princeton.edu>
Tue, 12 Apr 2005 22:32:03 +0000 (22:32 +0000)
configs/kernel-2.6.10-i686-planetlab.config
init/Kconfig
kernel/ckrm/ckrm_numtasks.c

index 908313c..615624a 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-1.14_FC2.1.planetlab
-# Tue Apr  5 11:00:04 2005
+# Linux kernel version: 2.6.10-1.14_FC2.1.planetlab.2005.03.31
+# Tue Apr 12 15:59:21 2005
 #
 CONFIG_X86=y
 CONFIG_MMU=y
@@ -36,6 +36,7 @@ CONFIG_CKRM_RES_NULL=m
 CONFIG_CKRM_RES_MEM=y
 # CONFIG_CKRM_TYPE_SOCKETCLASS is not set
 CONFIG_CKRM_RES_NUMTASKS=y
+# CONFIG_CKRM_RES_NUMTASKS_FORKRATE is not set
 CONFIG_CKRM_CPU_SCHEDULE=y
 # CONFIG_CKRM_RES_BLKIO is not set
 CONFIG_CKRM_CPU_SCHEDULE_AT_BOOT=y
index b425cfb..5091195 100644 (file)
@@ -202,11 +202,22 @@ config CKRM_RES_NUMTASKS
        depends on CKRM_TYPE_TASKCLASS
        default m
        help
-         Provides a Resource Controller for CKRM that allows limiting no of
+         Provides a Resource Controller for CKRM that allows limiting number of
          tasks a task class can have.
        
          Say N if unsure, Y to use the feature.
 
+config CKRM_RES_NUMTASKS_FORKRATE
+       tristate "Number of Tasks Resource Manager for Fork Rate"
+       depends on CKRM_RES_NUMTASKS
+       default y
+       help
+         Provides a Resource Controller for CKRM that allows limiting the rate
+         of tasks a task class can fork per hour.
+       
+         Say N if unsure, Y to use the feature.
+
+
 config CKRM_CPU_SCHEDULE
        bool "CKRM CPU scheduler"
        depends on CKRM_TYPE_TASKCLASS
index 21d8f9b..a1d839d 100644 (file)
@@ -21,6 +21,7 @@
  * Code Description: TBD
  */
 
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/slab.h>
@@ -149,6 +150,7 @@ static int numtasks_get_ref_local(void *arg, int force)
        if (res == NULL)
                return 1;
 
+#ifdef CONFIG_CKRM_RES_NUMTASKS_FORKRATE
        // force is not associated with fork. So, if force is specified
        // we don't have to bother about forkrate.
        if (!force) {
@@ -167,6 +169,7 @@ static int numtasks_get_ref_local(void *arg, int force)
                        return 0;
                }
        }
+#endif
 
        atomic_inc(&res->cnt_cur_alloc);
 
@@ -215,9 +218,11 @@ static int numtasks_get_ref_local(void *arg, int force)
                atomic_dec(&res->cnt_cur_alloc);
        } else if (!borrowed) { 
                total_cnt_alloc++;
+#ifdef CONFIG_CKRM_RES_NUMTASKS_FORKRATE
                if (!force) { // force is not associated with a real fork.
                        res->forks_in_period++;
                }
+#endif
        }
        return rc;
 }