From: Lucas Correia Villa Real <lucasvr@gobolinux.org>
To: Felipe W Damasio <felipewd@elipse.com.br>,
Lista da disciplina de Sistemas Operacionais III
<sisopiii-l@cscience.org>
Cc: Ricardo Nabinger Sanchez <rnsanchez@terra.com.br>,
Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: [SisopIII-l] Re: [PATCH] fix #endif misplacement
Date: Fri, 28 Nov 2003 14:59:08 -0200 [thread overview]
Message-ID: <200311281459.08071.lucasvr@gobolinux.org> (raw)
In-Reply-To: <3FC77A59.2090705@elipse.com.br>
Hi,
Actually, the original code seems to be ok:
#ifndef CONFIG_NUMA
if (!use_tsc)
#endif
return (unsigned long long)jiffies * (1000000000 / HZ);
That is: on x86 we'll get into "#ifndef CONFIG_NUMA", and "if (!use_tsc)" will
be called, which should be the expected behaviour.
Maybe in your case the use_tsc flag was being set to 0 (bug in detection code
/ unsupported feature by the processor?), leading your code to ignore the TSC
and return the current time based on the current jiffies instead.
Lucas
On Friday 28 November 2003 14:39, Felipe W Damasio wrote:
> Hi Tim,
>
> Tim Schmielau wrote:
> > No, this is exactly what is intended: don't use the TSC on NUMA, use
> > jiffies instead.
>
> The patch didn't hurt this.
>
> > Look at the comment just above those lines.
>
> The patch doesn't uses jiffies indiscriminately: Only if we're on a
> NUMA system with !use_tsc.
>
> Otherwise (on x86 SMP, for example) we use rdtsc...which seems The
> Right Thing(tm). Hece move the #endif a bit down.
>
> Cheers
>
> Felipe
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2003-11-28 16:59 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 [this message]
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 ` [SisopIII-l] " Lucas Correia Villa Real
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=200311281459.08071.lucasvr@gobolinux.org \
--to=lucasvr@gobolinux.org \
--cc=akpm@osdl.org \
--cc=felipewd@elipse.com.br \
--cc=linux-kernel@vger.kernel.org \
--cc=rnsanchez@terra.com.br \
--cc=sisopiii-l@cscience.org \
/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).