From: Ingo Molnar <mingo@elte.hu>
To: Sven-Thorsten Dietrich <sven@thebigcorporation.com>
Cc: "Luis Claudio R. Goncalves" <lclaudio@uudg.org>,
Thomas Gleixner <tglx@linutronix.de>,
linux-rt-users@vger.kernel.org
Subject: Re: [PATCH] Fixes spurious system load spikes in /proc/loadavgrt
Date: Thu, 23 Aug 2007 17:51:05 +0200 [thread overview]
Message-ID: <20070823155105.GA29405@elte.hu> (raw)
In-Reply-To: <1187883233.1453.60.camel@sx.thebigcorporation.com>
* Sven-Thorsten Dietrich <sven@thebigcorporation.com> wrote:
> On Thu, 2007-08-16 at 21:37 -0300, Luis Claudio R. Goncalves wrote:
> > Hello,
> >
> > The values in /proc/loadavgrt are sometimes the real load and sometimes
> > garbage. As you can see in th tests below, it occurs from in 2.6.21.5-rt20
> > to 2.6.23-rc2-rt2. The code for calc_load(), in kernel/timer.c has not
> > changed much in -rt patches.
>
> >
> > Signed-off-by: Luis Claudio R. Goncalves <lclaudio@uudg.org>
> > ---
> >
> > diff --git a/kernel/sched.c b/kernel/sched.c
> > index 811a502..c61609a 100644
> > --- a/kernel/sched.c
> > +++ b/kernel/sched.c
> > @@ -2520,6 +2520,13 @@ unsigned long rt_nr_uninterruptible(void)
> > for_each_online_cpu(i)
> > sum += cpu_rq(i)->rt_nr_uninterruptible;
> >
> > + /*
> > + * Since we read the counters lockless, it might be slightly
> > + * inaccurate. Do not allow it to go below zero though:
> > + */
> > + if (unlikely((long)sum < 0))
> > + sum = 0;
> > +
> > return sum;
> > }
> >
> > diff --git a/linux-2.6.21.x86_64/kernel/timer.c b/linux-2.6.21.x86_64_lc/kernel/timer.c
> > index 882ca9d..0e49bf6 100644
> > --- a/linux-2.6.21.x86_64/kernel/timer.c
> > +++ b/linux-2.6.21.x86_64_lc/kernel/timer.c
> > @@ -1432,23 +1432,25 @@ unsigned long avenrun_rt[3];
> > static inline void calc_load(unsigned long ticks)
> > {
> > unsigned long active_tasks; /* fixed-point */
> > + unsigned long active_rt_tasks; /* fixed-point */
> > static int count = LOAD_FREQ;
> >
> > count -= ticks;
> > if (unlikely(count < 0)) {
> > active_tasks = count_active_tasks();
> > + active_rt_tasks = count_active_rt_tasks();
>
> Where is this used?
what is "this"? /proc/loadavg? Or the code/patch you quoted?
Ingo
next prev parent reply other threads:[~2007-08-23 15:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-17 0:37 [PATCH] Fixes spurious system load spikes in /proc/loadavgrt Luis Claudio R. Goncalves
2007-08-17 3:58 ` Daniel Walker
2007-08-17 8:39 ` Thomas Gleixner
2007-08-17 16:24 ` Daniel Walker
2007-08-17 21:37 ` Thomas Gleixner
2007-08-17 21:43 ` Daniel Walker
2007-08-17 22:21 ` Thomas Gleixner
2007-08-17 22:43 ` Daniel Walker
2007-08-17 23:33 ` Thomas Gleixner
2007-08-23 15:33 ` Sven-Thorsten Dietrich
2007-08-23 15:51 ` Ingo Molnar [this message]
2007-08-23 15:57 ` Sven-Thorsten Dietrich
2007-08-23 16:13 ` Luis Claudio R. Goncalves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070823155105.GA29405@elte.hu \
--to=mingo@elte.hu \
--cc=lclaudio@uudg.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=sven@thebigcorporation.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.