All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Huacai Chen <chenhc@lemote.com>
Cc: Andy Lutomirski <luto@kernel.org>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	chenhuacai@gmail.com, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Paul Burton <paul.burton@mips.com>,
	linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 110/110] lib/vdso: Improve do_hres() and update vdso data unconditionally
Date: Mon, 21 Oct 2019 16:52:28 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1910211648200.1904@nanos.tec.linutronix.de> (raw)
In-Reply-To: <1571662320-1280-1-git-send-email-chenhc@lemote.com>

On Mon, 21 Oct 2019, Huacai Chen wrote:
> @@ -50,7 +50,7 @@ static int do_hres(const struct vdso_data *vd, clockid_t clk,
>  		cycles = __arch_get_hw_counter(vd->clock_mode);
>  		ns = vdso_ts->nsec;
>  		last = vd->cycle_last;
> -		if (unlikely((s64)cycles < 0))
> +		if (unlikely(cycles == U64_MAX))
>  			return -1;

That used to create worse code than the weird (s64) type cast which has the
same effect. Did you double check that there is no change?

Thanks,

	tglx

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Gleixner <tglx@linutronix.de>
To: Huacai Chen <chenhc@lemote.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	chenhuacai@gmail.com, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, linux-mips@vger.kernel.org,
	Paul Burton <paul.burton@mips.com>,
	Andy Lutomirski <luto@kernel.org>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 110/110] lib/vdso: Improve do_hres() and update vdso data unconditionally
Date: Mon, 21 Oct 2019 16:52:28 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1910211648200.1904@nanos.tec.linutronix.de> (raw)
In-Reply-To: <1571662320-1280-1-git-send-email-chenhc@lemote.com>

On Mon, 21 Oct 2019, Huacai Chen wrote:
> @@ -50,7 +50,7 @@ static int do_hres(const struct vdso_data *vd, clockid_t clk,
>  		cycles = __arch_get_hw_counter(vd->clock_mode);
>  		ns = vdso_ts->nsec;
>  		last = vd->cycle_last;
> -		if (unlikely((s64)cycles < 0))
> +		if (unlikely(cycles == U64_MAX))
>  			return -1;

That used to create worse code than the weird (s64) type cast which has the
same effect. Did you double check that there is no change?

Thanks,

	tglx

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-10-21 14:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21 12:52 [PATCH 110/110] lib/vdso: Improve do_hres() and update vdso data unconditionally Huacai Chen
2019-10-21 12:52 ` Huacai Chen
2019-10-21 14:52 ` Thomas Gleixner [this message]
2019-10-21 14:52   ` Thomas Gleixner
2019-10-21 14:58   ` Thomas Gleixner
2019-10-21 14:58     ` Thomas Gleixner
2019-10-22  2:42     ` Huacai Chen
2019-10-22  2:42       ` Huacai Chen
2019-10-23  8:48       ` Thomas Gleixner
2019-10-23  8:48         ` Thomas Gleixner

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=alpine.DEB.2.21.1910211648200.1904@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=arnd@arndb.de \
    --cc=chenhc@lemote.com \
    --cc=chenhuacai@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=paul.burton@mips.com \
    --cc=stable@vger.kernel.org \
    --cc=vincenzo.frascino@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.