Signed-Off-By: Chandra Seetharaman <[email protected]>
Signed-Off-By: Vivek Kashyap <[email protected]>
Signed-Off-By: Gerrit Huizenga <[email protected]>
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-ckrm1/kernel/ckrm/ckrm_numtasks.c
===================================================================
--- linux-2.6.12-ckrm1.orig/kernel/ckrm/ckrm_numtasks.c 2005-06-20 13:08:34.000000000 -0700
+++ linux-2.6.12-ckrm1/kernel/ckrm/ckrm_numtasks.c 2005-06-20 13:08:39.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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]