linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org,
	x86@kernel.org, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Sasha Levin <sashal@kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Michael Kelley <mikelley@microsoft.com>,
	Tianyu Lan <Tianyu.Lan@microsoft.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] x86/hyper-v: enable TSC page clocksource on 32bit
Date: Wed, 21 Aug 2019 23:17:35 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1908212316040.1983@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20190821095650.1841-1-vkuznets@redhat.com>

On Wed, 21 Aug 2019, Vitaly Kuznetsov wrote:

> There is no particular reason to not enable TSC page clocksource
> on 32-bit. mul_u64_u64_shr() is available and despite the increased
> computational complexity (compared to 64bit) TSC page is still a huge
> win compared to MSR-based clocksource.
> 
> In-kernel reads:
>   MSR based clocksource: 3361 cycles
>   TSC page clocksource: 49 cycles
> 
> Reads from userspace (unilizing vDSO in case of TSC page):
>   MSR based clocksource: 5664 cycles
>   TSC page clocksource: 131 cycles
> 
> Enabling TSC page on 32bits allows us to get rid of CONFIG_HYPERV_TSCPAGE

s/allows us/allows/

> as it is now not any different from CONFIG_HYPERV_TIMER.
> 
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
>  arch/x86/include/asm/vdso/gettimeofday.h |  6 +++---
>  drivers/clocksource/hyperv_timer.c       | 11 -----------
>  drivers/hv/Kconfig                       |  3 ---
>  include/clocksource/hyperv_timer.h       |  6 ++----
>  4 files changed, 5 insertions(+), 21 deletions(-)

Really nice cleanup as a side effect of adding functionality.

Thanks,

	tglx

  parent reply	other threads:[~2019-08-21 21:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-21  9:56 [PATCH] x86/hyper-v: enable TSC page clocksource on 32bit Vitaly Kuznetsov
2019-08-21 21:16 ` Michael Kelley
2019-08-21 21:17 ` Thomas Gleixner [this message]
2019-08-21 21:23   ` Thomas Gleixner
2019-08-22  7:52     ` Vitaly Kuznetsov

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.1908212316040.1983@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=Tianyu.Lan@microsoft.com \
    --cc=bp@alien8.de \
    --cc=daniel.lezcano@linaro.org \
    --cc=haiyangz@microsoft.com \
    --cc=hpa@zytor.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikelley@microsoft.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=sashal@kernel.org \
    --cc=sthemmin@microsoft.com \
    --cc=vkuznets@redhat.com \
    --cc=x86@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).