From: Lucas Correia Villa Real <lucasvr@gobolinux.org>
To: Lista da disciplina de Sistemas Operacionais III
<sisopiii-l@cscience.org>,
Ricardo Nabinger Sanchez <rnsanchez@terra.com.br>,
Tim Schmielau <tim@physik3.uni-rostock.de>
Cc: Andrew Morton <akpm@osdl.org>,
sisopiii-l@cscience.org, linux-kernel@vger.kernel.org
Subject: Re: [SisopIII-l] Re: [PATCH] fix #endif misplacement
Date: Fri, 28 Nov 2003 20:24:05 -0200 [thread overview]
Message-ID: <200311282024.06096.lucasvr@gobolinux.org> (raw)
In-Reply-To: <20031128193541.448d2893.rnsanchez@terra.com.br>
On Friday 28 November 2003 19:35, Ricardo Nabinger Sanchez wrote:
> Quoting Tim Schmielau <tim@physik3.uni-rostock.de>
> Sent on Fri, 28 Nov 2003 17:34:49 +0100 (CET)
>
> > > This patch fixes an #endif misplacement, which leads to dead code in
> > > sched_clock() in arch/i386/kernel/timers/timer_tsc.c, due to a return
> > > outside the ifdef/endif.
> >
> > No, this is exactly what is intended: don't use the TSC on NUMA, use
> > jiffies instead.
> > Look at the comment just above those lines.
>
> I'm breaking things. Sorry.
>
> I think I understood it now: the #ifndef protects only the check for TSC
> availability on non-NUMA archs. If it's available, and not under NUMA (so
> the ifndef), use it (jump to the rdtscll()), otherwise return the
> expression result.
>
> The strange thing to me is that I'm getting 1/10 of the expected value when
> measuring tasks timeslices. Instead of getting ~100ms for tasks which just
> burn CPU, I'm getting 10ms.
>
> I measure timeslices inside schedule(), updating the average timeslice for
> the leaving process, using (now - prev->timestamp).
>
> Any clue of what am I doing wrong?
Hi,
It could it be possible that TSC isn't being enabled on your processor due to
a buggy TSC. You can try to trace the code on init_tsc(), in
arch/i386/kernel/timers/timer_tsc.c to realize what's going on.
You can also try to check whether you're using HPET or not (when enabled and
supported it makes use of TSC) in your .config . In the case you're not using
it, the code that calibrates and dictates how to deal with the stamp counter
is calibrate_tsc(), in arch/i386/kernel/timers/common.c.
Hope this helps,
Lucas
prev parent reply other threads:[~2003-11-28 22:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-28 16:19 [PATCH] fix #endif misplacement Ricardo Nabinger Sanchez
2003-11-28 16:34 ` Tim Schmielau
2003-11-28 16:39 ` [SisopIII-l] " Felipe W Damasio
2003-11-28 16:59 ` Lucas Correia Villa Real
2003-11-28 17:05 ` Nick Piggin
2003-11-28 17:12 ` Felipe W Damasio
2003-11-28 21:15 ` Ricardo Nabinger Sanchez
2003-11-28 17:29 ` [patch] " Tim Schmielau
2003-11-28 18:29 ` [patch] another jiffies wrap bug Tim Schmielau
2003-11-28 21:35 ` [PATCH] fix #endif misplacement Ricardo Nabinger Sanchez
2003-11-28 22:24 ` Lucas Correia Villa Real [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=200311282024.06096.lucasvr@gobolinux.org \
--to=lucasvr@gobolinux.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rnsanchez@terra.com.br \
--cc=sisopiii-l@cscience.org \
--cc=tim@physik3.uni-rostock.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).