From: Alan Kao <alankao@andestech.com>
To: Alex Solomatnikov <sols@sifive.com>
Cc: Nick Hu <nickhu@andestech.com>, Jonathan Corbet <corbet@lwn.net>,
"Peter Zijlstra" <peterz@infradead.org>,
Palmer Dabbelt <palmer@sifive.com>, <linux-doc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
"Arnaldo Carvalho de Melo" <acme@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Ingo Molnar <mingo@redhat.com>, "Albert Ou" <albert@sifive.com>,
Namhyung Kim <namhyung@kernel.org>,
<linux-riscv@lists.infradead.org>, Jiri Olsa <jolsa@redhat.com>,
Greentime Hu <greentime@andestech.com>
Subject: Re: [PATCH 1/2] perf: riscv: preliminary RISC-V support
Date: Mon, 2 Apr 2018 16:18:06 +0800 [thread overview]
Message-ID: <20180402081806.GA24954@andestech.com> (raw)
In-Reply-To: <20180402073611.GA7694@andestech.com>
Hi Alex,
On Mon, Apr 02, 2018 at 03:36:12PM +0800, Alan Kao wrote:
> On Sat, Mar 31, 2018 at 03:47:10PM -0700, Alex Solomatnikov wrote:
>
> The original guess was that maybe, an counter value on a hart is picked
> as the minusend, and an old counter value on another hart was recorded
> as the subtrahend but numerically larger. Then, the overflow causes
> by that subtraction. Please let me name this guess as
> "cross-hart subtraction."
>
> > You can add a skew between cores in qemu, something like this:
> >
> > case CSR_INSTRET:
> > core_id()*return cpu_get_host_ticks()/10;
> > break;
> > case CSR_CYCLE:
> > return cpu_get_host_ticks();
> > break;
> >
>
> However, I tried similar stuff to reproduce the phenomenon but in vain.
> It seems that the
>
> ***cross-hart subtration doesn't even happen, because generic
> code handles them. ...
I am sorry that this observation is wrong. With appropriate tweak, we
successfully reproduce the behavior and locate the the bug.
This will be fix in v2.
Thanks for the helps.
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-04-02 8:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-26 7:57 [PATCH 0/2] perf: riscv: Preliminary Perf Event Support on RISC-V Alan Kao
2018-03-26 7:57 ` [PATCH 1/2] perf: riscv: preliminary RISC-V support Alan Kao
[not found] ` <CAJ2AOiNQuMJoPZPxy2CDFD0vnxk8E+N-8xiir2nPYKjWJKxshQ@mail.gmail.com>
2018-03-29 2:30 ` Alan Kao
2018-03-31 22:47 ` Alex Solomatnikov
2018-04-02 7:36 ` Alan Kao
2018-04-02 8:18 ` Alan Kao [this message]
2018-04-05 16:47 ` Palmer Dabbelt
2018-04-09 7:07 ` Alan Kao
2018-04-09 21:03 ` Palmer Dabbelt
2018-04-10 18:15 ` Alex Solomatnikov
2018-03-26 7:57 ` [PATCH 2/2] perf: riscv: Add Document for Future Porting Guide Alan Kao
[not found] <CAJ2AOiNQiTpJ9cBCb_fXVCyVNj9U-Xk3tUG=9toAC7HpQTRQvA@mail.gmail.com>
2018-03-29 0:41 ` [PATCH 1/2] perf: riscv: preliminary RISC-V support Palmer Dabbelt
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=20180402081806.GA24954@andestech.com \
--to=alankao@andestech.com \
--cc=acme@kernel.org \
--cc=albert@sifive.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=corbet@lwn.net \
--cc=greentime@andestech.com \
--cc=jolsa@redhat.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=nickhu@andestech.com \
--cc=palmer@sifive.com \
--cc=peterz@infradead.org \
--cc=sols@sifive.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;
as well as URLs for NNTP newsgroup(s).