From: Marc Fiuczynski Date: Tue, 12 Apr 2005 22:32:03 +0000 (+0000) Subject: Disabled the newly introduced CKRM numtask forkrate code. X-Git-Tag: before-fedora-2_6_18-1_2239_FC5-vs2_0_2_2-rc6-merge~220 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=5f49856bd6676b30129db03f6a558d325f41c09f;p=linux-2.6.git Disabled the newly introduced CKRM numtask forkrate code. --- diff --git a/configs/kernel-2.6.10-i686-planetlab.config b/configs/kernel-2.6.10-i686-planetlab.config index 908313cce..615624a40 100644 --- a/configs/kernel-2.6.10-i686-planetlab.config +++ b/configs/kernel-2.6.10-i686-planetlab.config @@ -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 diff --git a/init/Kconfig b/init/Kconfig index b425cfb2c..509119525 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -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 diff --git a/kernel/ckrm/ckrm_numtasks.c b/kernel/ckrm/ckrm_numtasks.c index 21d8f9b17..a1d839d2e 100644 --- a/kernel/ckrm/ckrm_numtasks.c +++ b/kernel/ckrm/ckrm_numtasks.c @@ -21,6 +21,7 @@ * Code Description: TBD */ +#include #include #include #include @@ -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; }