lkml.org 
[lkml]   [2006]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] sched - fix interactive typo
    Date
    On Saturday 14 January 2006 23:56, Mike Galbraith wrote:
    > Greetings,
    >
    > At 09:23 PM 1/13/2006 +1100, Con Kolivas wrote:
    > >Index: linux-2.6.15/kernel/sched.c
    > >===================================================================
    > >--- linux-2.6.15.orig/kernel/sched.c
    > >+++ linux-2.6.15/kernel/sched.c
    > >@@ -756,26 +756,17 @@ static int recalc_task_prio(task_t *p, u
    >
    > <snip>
    >
    > >+ * If a task was sleeping with the noninteractive
    > >+ * label do not apply this non-linear boost
    > > */
    > >- if (p->sleep_type == SLEEP_NONINTERACTIVE &&
    > > p->mm) { - if (p->sleep_avg >=
    > > INTERACTIVE_SLEEP(p)) - sleep_time
    > > = 0;
    > >- else if (p->sleep_avg + sleep_time >=
    > >- INTERACTIVE_SLEEP(p)) {
    > >- p->sleep_avg =
    > > INTERACTIVE_SLEEP(p); - sleep_time
    > > = 0;
    > >- }
    > >- }
    > >+ if (p->sleep_type != SLEEP_NONINTERACTIVE ||
    > > p->mm)
    >
    > Typo alert. Looks like that should be ||
    > !p->mm. ^

    Good catch!

    That would have hurt like that too.

    Andrew please apply to or rollup into interactivity series.

    Cheers,
    Con
    ---
    Fix typo thanks Mike Galbraith for spotting.

    Signed-off-by: Con Kolivas <kernel@kolivas.org>

    kernel/sched.c | 2 +-
    1 files changed, 1 insertion(+), 1 deletion(-)

    Index: linux-2.6.15/kernel/sched.c
    ===================================================================
    --- linux-2.6.15.orig/kernel/sched.c
    +++ linux-2.6.15/kernel/sched.c
    @@ -768,7 +768,7 @@ static int recalc_task_prio(task_t *p, u
    * If a task was sleeping with the noninteractive
    * label do not apply this non-linear boost
    */
    - if (p->sleep_type != SLEEP_NONINTERACTIVE || p->mm)
    + if (p->sleep_type != SLEEP_NONINTERACTIVE || !p->mm)
    sleep_time *=
    (MAX_BONUS - CURRENT_BONUS(p)) ? : 1;
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2006-01-14 15:40    [W:0.028 / U:34.208 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site