From: David Miller <davem@davemloft.net>
To: mathieu.desnoyers@polymtl.ca
Cc: linux-kernel@vger.kernel.org
Subject: Re: sparc64: Optimized immediate value implementation build error
Date: Tue, 14 Oct 2008 12:02:15 -0700 (PDT) [thread overview]
Message-ID: <20081014.120215.101891203.davem@davemloft.net> (raw)
In-Reply-To: <20081014160848.GA20740@Krystal>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: Text/Plain; charset=utf-8, Size: 2352 bytes --]
From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Date: Tue, 14 Oct 2008 12:08:48 -0400
> * David Miller (davem@davemloft.net) wrote:
> > On the other hand, CONFIG_PSRWLOCK_LATENCY_TEST fails to build:
> >
> > CC lib/psrwlock-latency-trace.o
> > lib/psrwlock-latency-trace.c: In function âcalibrate_get_cyclesâ:
> > lib/psrwlock-latency-trace.c:60: error: implicit declaration of function ârdtsc_barrierâ
> >
> > You could use sched_clock() or similar, we do have portable
> > interfaces by which to do these things. And if we don't
> > have something fitting exactly what is needed here, add it :-)
> >
>
> I think the %tick register we get with get_cycles() on sparc64 is what
> is needed. Hopefully it's synchronized across CPUs on SMP systems ?
Yes, it is synchronized.
> On x86_64, rdtsc_barrier() issues a synchronizing instruction (cpuid)
> which serializes the instructions executed on the CPU so we do not
> execute rdtsc speculatively. Is reading %tick synchronized on sparc64 or
> not ?
It is synchronized on sparc64.
> Is there a similar %tick register on sparc32 ? I've read somewhere it's
> new to sparc v8. (http://cr.yp.to/hardware/sparc.html) So I guess we
> should simply disable this psrwlock latency tracer on SPARC32 ?
Not really. There is only the time keeping device out in I/O space
which is very expensive to access.
This is why we don't have a sched_clock() implementation on sparc32.
> Probably that the best way to deal with this is to create a
>
> (generic code)
> HAVE_GET_CYCLES
> def_bool n
>
> (sparc, x86, powerpc... Kconfig)
> config SPARC64/X86/POWERPC
> select HAVE_GET_CYCLES
>
> And we can make CONFIG_PSRWLOCK_LATENCY_TEST depend on HAVE_GET_CYCLES.
Yes, something like that.
> > Also:
> >
> > <stdin>:1421:2: warning: #warning syscall marker not implemented
> > <stdin>:1425:2: warning: #warning syscall trace not implemented
> >
> > which should be fixed by the following patch:
> >
> > sparc: Add sys_trace() and sys_marker() syscall table entries.
> >
>
> Thanks, I'll merge it :) I don't expect the userspace tracing to be in
> its final form, but it's good to add such support.
I think so too :)
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
prev parent reply other threads:[~2008-10-14 19:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-03 20:10 Mathieu Desnoyers
2008-10-13 8:15 ` David Miller
2008-10-13 23:37 ` Mathieu Desnoyers
2008-10-14 1:31 ` David Miller
2008-10-14 2:17 ` Mathieu Desnoyers
2008-10-14 2:31 ` David Miller
2008-10-14 4:47 ` Mathieu Desnoyers
2008-10-14 9:15 ` David Miller
2008-10-14 16:08 ` Mathieu Desnoyers
2008-10-14 19:02 ` David Miller [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=20081014.120215.101891203.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
/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®