lkml.org 
[lkml]   [2005]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[patch 12/21] CKRM: Check to see if my guarantee is set to DONTCARE
From
--
Content-Disposition: inline; filename=07a-numtasks_config


Signed-Off-By: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-Off-By: Vivek Kashyap <kashyapv@us.ibm.com>
Signed-Off-By: Gerrit Huizenga <gh@us.ibm.com>

recalc and propagate was not checking for class's my_guarantee and
my_limit againt DONT_CARE. This was leading to different wierd
problems. This patch fixes it.

ckrm_numtasks.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
Index: linux-2.6.12-rc3-ckrm5/kernel/ckrm/ckrm_numtasks.c
===================================================================
--- linux-2.6.12-rc3-ckrm5.orig/kernel/ckrm/ckrm_numtasks.c 2005-05-05 09:35:11.000000000 -0700
+++ linux-2.6.12-rc3-ckrm5/kernel/ckrm/ckrm_numtasks.c 2005-05-05 09:36:29.000000000 -0700
@@ -296,7 +296,8 @@ recalc_and_propagate(struct ckrm_numtask
struct ckrm_shares *self = &res->shares;

/* calculate cnt_guarantee and cnt_limit */
- if (parres->cnt_guarantee == CKRM_SHARE_DONTCARE) {
+ if ((parres->cnt_guarantee == CKRM_SHARE_DONTCARE) ||
+ (self->my_guarantee == CKRM_SHARE_DONTCARE)) {
res->cnt_guarantee = CKRM_SHARE_DONTCARE;
} else if (par->total_guarantee) {
u64 temp = (u64) self->my_guarantee * parres->cnt_guarantee;
@@ -306,7 +307,8 @@ recalc_and_propagate(struct ckrm_numtask
res->cnt_guarantee = 0;
}

- if (parres->cnt_limit == CKRM_SHARE_DONTCARE) {
+ if ((parres->cnt_limit == CKRM_SHARE_DONTCARE) ||
+ (self->my_limit == CKRM_SHARE_DONTCARE)) {
res->cnt_limit = CKRM_SHARE_DONTCARE;
} else if (par->max_limit) {
u64 temp = (u64) self->my_limit * parres->cnt_limit;
@@ -317,7 +319,8 @@ recalc_and_propagate(struct ckrm_numtask
}

/* Calculate unused units */
- if (res->cnt_guarantee == CKRM_SHARE_DONTCARE) {
+ if ((res->cnt_guarantee == CKRM_SHARE_DONTCARE) ||
+ (self->my_guarantee == CKRM_SHARE_DONTCARE)) {
res->cnt_unused = CKRM_SHARE_DONTCARE;
} else if (self->total_guarantee) {
u64 temp = (u64) self->unused_guarantee * res->cnt_guarantee;
--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-05-05 21:24    [W:0.107 / U:0.040 seconds]
©2003-2011 Jasper Spaans. Advertise on this site