lkml.org 
[lkml]   [2005]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 12/38] CKRM e18: Check to see if my guarantee is set to DONTCARE
    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-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 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-06-23 12:56    [W:0.040 / U:0.048 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site