From: Sachin Sant <sachinp@linux.vnet.ibm.com>
To: "Desnes A. Nunes do Rosario" <desnesn@linux.ibm.com>
Cc: shuah@kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] selftests/powerpc: Purge extra count_pmc() calls of ebb selftests
Date: Wed, 8 Jul 2020 16:08:03 +0530 [thread overview]
Message-ID: <F0DC61BE-076E-4977-812F-532C6F76CFBB@linux.vnet.ibm.com> (raw)
In-Reply-To: <20200626164737.21943-1-desnesn@linux.ibm.com>
> On 26-Jun-2020, at 10:17 PM, Desnes A. Nunes do Rosario <desnesn@linux.ibm.com> wrote:
>
> An extra count on ebb_state.stats.pmc_count[PMC_INDEX(pmc)] is being per-
> formed when count_pmc() is used to reset PMCs on a few selftests. This
> extra pmc_count can occasionally invalidate results, such as the ones from
> cycles_test shown hereafter. The ebb_check_count() failed with an above
> the upper limit error due to the extra value on ebb_state.stats.pmc_count.
>
> Furthermore, this extra count is also indicated by extra PMC1 trace_log on
> the output of the cycle test (as well as on pmc56_overflow_test):
>
> ==========
> ...
> [21]: counter = 8
> [22]: register SPRN_MMCR0 = 0x0000000080000080
> [23]: register SPRN_PMC1 = 0x0000000080000004
> [24]: counter = 9
> [25]: register SPRN_MMCR0 = 0x0000000080000080
> [26]: register SPRN_PMC1 = 0x0000000080000004
> [27]: counter = 10
> [28]: register SPRN_MMCR0 = 0x0000000080000080
> [29]: register SPRN_PMC1 = 0x0000000080000004
>>> [30]: register SPRN_PMC1 = 0x000000004000051e
> PMC1 count (0x280000546) above upper limit 0x2800003e8 (+0x15e)
> [FAIL] Test FAILED on line 52
> failure: cycles
> ==========
>
> Signed-off-by: Desnes A. Nunes do Rosario <desnesn@linux.ibm.com>
> ---
I too have run into similar failure with cycles_test. I will add that the failure
is inconsistent. I have run into this issue 1 out of 25 times. The failure always
happen at first instance. Subsequent tries work correctly.
With this patch applied the test completes successfully 25 out of 25 times.
# ./cycles_test
test: cycles
…..
…..
[25]: register SPRN_MMCR0 = 0x0000000080000080
[26]: register SPRN_PMC1 = 0x0000000080000004
[27]: counter = 10
[28]: register SPRN_MMCR0 = 0x0000000080000080
[29]: register SPRN_PMC1 = 0x0000000080000004
[30]: register SPRN_PMC1 = 0x000000004000048f
PMC1 count (0x2800004b7) above upper limit 0x2800003e8 (+0xcf)
[FAIL] Test FAILED on line 52
failure: cycles
With the patch
# ./cycles_test
test: cycles
…..
…..
[25]: register SPRN_MMCR0 = 0x0000000080000080
[26]: register SPRN_PMC1 = 0x0000000080000004
[27]: counter = 10
[28]: register SPRN_MMCR0 = 0x0000000080000080
[29]: register SPRN_PMC1 = 0x0000000080000004
PMC1 count (0x280000028) is between 0x27ffffc18 and 0x2800003e8 delta +0x410/-0x3c0
success: cycles
#
FWIW Tested-by : Sachin Sant <sachinp@linux.vnet.ibm.com>
Thanks
-Sachin
next prev parent reply other threads:[~2020-07-08 10:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-26 16:47 [PATCH] selftests/powerpc: Purge extra count_pmc() calls of ebb selftests Desnes A. Nunes do Rosario
2020-07-08 10:38 ` Sachin Sant [this message]
2020-07-08 12:52 ` Desnes Augusto Nunes do Rosario
2020-07-16 12:55 ` Michael Ellerman
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=F0DC61BE-076E-4977-812F-532C6F76CFBB@linux.vnet.ibm.com \
--to=sachinp@linux.vnet.ibm.com \
--cc=desnesn@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=shuah@kernel.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).