Re: VST and Sched Load Balance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/7/05, Srivatsa Vaddagiri <[email protected]> wrote:
> Hi,
>         VST patch (http://lwn.net/Articles/118693/) attempts to avoid useless
> regular (local) timer ticks when a CPU is idle.

<snip>

>  linux-2.6.11-vatsa/kernel/sched.c |   52 ++++++++++++++++++++++++++++++++++++++
>  1 files changed, 52 insertions(+)
> 
> diff -puN kernel/sched.c~vst-sched_load_balance kernel/sched.c
> --- linux-2.6.11/kernel/sched.c~vst-sched_load_balance  2005-04-07 17:51:34.000000000 +0530
> +++ linux-2.6.11-vatsa/kernel/sched.c   2005-04-07 17:56:18.000000000 +0530

<snip>

> @@ -1796,6 +1817,25 @@ find_busiest_group(struct sched_domain *
> 
>                         nr_cpus++;
>                         avg_load += load;
> +
> +#ifdef CONFIG_VST
> +                       if (idle != NOT_IDLE || !grp_sleeping ||
> +                                               (grp_sleeping && woken))
> +                               continue;
> +
> +                       sd1 = sd + (i-cpu);
> +                       interval = sd1->balance_interval;
> +
> +                       /* scale ms to jiffies */
> +                       interval = msecs_to_jiffies(interval);
> +                       if (unlikely(!interval))
> +                               interval = 1;
> +
> +                       if (jiffies - sd1->last_balance >= interval) {
> +                               woken = 1;
> +                               cpu_set(i, wakemask);
> +                       }

Sorry for the late reply, but shouldn't this jiffies comparison be
done with time_after() or time_before()?

Thanks,
Nish
-
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]
  Powered by Linux