From: Thomas Gleixner <tglx@linutronix.de>
To: Frank Rowand <frank.rowand@am.sony.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [patch] RT: calc_load() uses wrong variable to calculate RT load
Date: Wed, 6 May 2009 10:44:59 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.0905061044170.3388@localhost.localdomain> (raw)
In-Reply-To: <4A00D16A.3000908@am.sony.com>
On Tue, 5 May 2009, Frank Rowand wrote:
> In calc_load() use RT tasks to calculate the RT load.
>
> Signed-off-by: Frank Rowand <frank.rowand@am.sony.com>
>
> ---
>
> Ingo,
>
> In calc_load():
>
> #ifdef CONFIG_PREEMPT_RT
> active_rt_tasks = count_active_rt_tasks();
> #endif
>
> but active_rt_tasks is then not used. I have not read through enough code
> to verify my supposition, but the obvious use of this variable would be for
> the calculation of the RT load average.
>
> If my supposition is correct, this patch fixes the problem.
Yep, that's correct. Though I ponder to get rid of avenrun_rt all
together.
Thanks,
tglx
> The patch is compile tested only.
>
> -Frank Rowand
> Sony Corporation of America
>
>
> Index: linux-2.6.29.2/kernel/timer.c
> ===================================================================
> --- linux-2.6.29.2.orig/kernel/timer.c
> +++ linux-2.6.29.2/kernel/timer.c
> @@ -1249,9 +1249,9 @@ static inline void calc_load(unsigned lo
> CALC_LOAD(avenrun[1], EXP_5, active_tasks);
> CALC_LOAD(avenrun[2], EXP_15, active_tasks);
> #ifdef CONFIG_PREEMPT_RT
> - CALC_LOAD(avenrun_rt[0], EXP_1, active_tasks);
> - CALC_LOAD(avenrun_rt[1], EXP_5, active_tasks);
> - CALC_LOAD(avenrun_rt[2], EXP_15, active_tasks);
> + CALC_LOAD(avenrun_rt[0], EXP_1, active_rt_tasks);
> + CALC_LOAD(avenrun_rt[1], EXP_5, active_rt_tasks);
> + CALC_LOAD(avenrun_rt[2], EXP_15, active_rt_tasks);
> #endif
> count += LOAD_FREQ;
>
>
prev parent reply other threads:[~2009-05-06 8:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-05 23:53 Frank Rowand
2009-05-06 8:44 ` Thomas Gleixner [this message]
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=alpine.LFD.2.00.0905061044170.3388@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=frank.rowand@am.sony.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®