xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Jan Beulich <JBeulich@suse.com>,
	Stefano Stabellini <sstabellini@kernel.org>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: [Xen-devel] Fwd: [xen-4.10-testing bisection] complete test-armhf-armhf-xl-arndale
Date: Fri, 21 Jun 2019 10:14:03 +0100	[thread overview]
Message-ID: <87cf1036-c492-4126-0e3a-f0b839d32d39@arm.com> (raw)
In-Reply-To: <5D0C9C440200007800239FC5@prv1-mh.provo.novell.com>

Hi Jan,

On 21/06/2019 09:58, Jan Beulich wrote:
>>>> On 20.06.19 at 19:24, <julien.grall@arm.com> wrote:
>> Actually I may have found the error. I feel quite ashamed I didn't spot
>> this during review and when the bisector fingered it.
>>
>> staging-4.11 and staging.4.12 didn't have get_cycles implemented (i.e it
>> returned 0). During the backport, get_cycles() got suddenly implemented
>> (aside the isb()) so it now returns the number of cycles.
> 
> Stefano, how can this be a valid backport under the given title? The
> (imo) only correct way of backporting that hunk would have been to
> simply drop it, adding isb() instead of the switch to call the function
> in the two other places.
> 
> To both of you: How certain are you that the subsequent type
> change is really all that's needed, and that the sudden change in
> behavior of get_cycles() won't have other undue side effects?

Here the current callers:

42sh> ack get_cycles

include/asm-arm/time.h
12:static inline cycles_t get_cycles (void)

include/asm-x86/time.h
29:static inline cycles_t get_cycles(void)

arch/arm/time.c
152:    boot_count = get_cycles();
193:    uint64_t ticks = get_cycles() - boot_count;

arch/x86/irq.c
898:        tsc_in = tb_init_done ? get_cycles() : 0;
900:        TRACE_3D(TRC_HW_IRQ_HANDLED, irq, tsc_in, get_cycles());
921:        tsc_in = tb_init_done ? get_cycles() : 0;
923:        TRACE_3D(TRC_HW_IRQ_HANDLED, irq, tsc_in, get_cycles());

common/tmem.c
275:    pgp->timestamp = get_cycles();
389:    life = get_cycles() - pgp->timestamp;

common/keyhandler.c
389:    per_cpu(read_cycles_time, cpu) = get_cycles();
412:    per_cpu(read_cycles_time, cpu) = get_cycles();

common/trace.c
595:        u64 tsc = (u64)get_cycles();
778:            this_cpu(lost_records_first_tsc)=(u64)get_cycles();

The two callers we care the most are in arch/arm/time.c. They were added with 
the patch backported and I know this is fine because the value before was 64-bit 
as well. So there are no change except for the isb() here.

I am not sure anyone ever tested/used tmem.c on Arm (and it is dropped on recent 
release). So that's not going to make much difference.

common/keyhandler.c, this is mostly for debugging.

common/trace.c does not matter as tracing does not work on Arm before 4.12.

So I am pretty confident that this change will not provoke more side effects 
than an isb() directly in the code.

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

      reply	other threads:[~2019-06-21  9:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2B31D2BD02000066A2327079@prv1-mh.provo.novell.com>
2019-06-19  7:28 ` [Xen-devel] Fwd: [xen-4.10-testing bisection] complete test-armhf-armhf-xl-arndale Jan Beulich
2019-06-19  9:02   ` Julien Grall
2019-06-19 15:59     ` Julien Grall
2019-06-19 16:56       ` Stefano Stabellini
2019-06-20 17:24         ` Julien Grall
2019-06-20 23:55           ` Stefano Stabellini
2019-06-21  8:58           ` Jan Beulich
2019-06-21  9:14             ` Julien Grall [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=87cf1036-c492-4126-0e3a-f0b839d32d39@arm.com \
    --to=julien.grall@arm.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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).