All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Peter Crosthwaite <crosthwaitepeter@gmail.com>
Cc: "peter.maydell@linaro.org" <peter.maydell@linaro.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"Krzeminski,
	Marcin (Nokia - PL/Wroclaw)" <marcin.krzeminski@nokia.com>
Subject: Re: [Qemu-devel] arm mptimer implementation - why prescaler is multiply by 10?
Date: Tue, 27 Oct 2015 21:09:05 +0300	[thread overview]
Message-ID: <562FBDC1.50805@gmail.com> (raw)
In-Reply-To: <CAPokK=qiDbSP-bo7xwdp5ius_RfS9C6HdWNP5VBZx=8i1EfYsQ@mail.gmail.com>

27.10.2015 21:01, Peter Crosthwaite пишет:
>
>
> On Tue, Oct 27, 2015 at 7:19 AM, Dmitry Osipenko <digetx@gmail.com
> <mailto:digetx@gmail.com>> wrote:
>
>     27.10.2015 16:48, Krzeminski, Marcin (Nokia - PL/Wroclaw) пишет:
>
>         Hello,
>         I am playing with U-Boot on ARM under qemu.
>         U-boot uses mptimer, and under qemu one second takes about 1 in real world.
>         At the moment it seem that in u-boot is ok, so I have question about
>         below function.
>         Why prescaler value is multiply by 10?
>         static inline uint64_t a9_gtimer_get_conv(A9GTimerState *s)
>         {
>               uint64_t prescale = extract32(s->control, R_CONTROL_PRESCALER_SHIFT,
>                                             R_CONTROL_PRESCALER_LEN);
>               return (prescale + 1) * 10;
>         }
>         Regards,
>         Marcin
>
>
>     Hello Marcin,
>
>      From my observation, Linux kernel is booting noticeably faster in the
>     emulated guest and host machine CPU usage is lower if we "artificially"
>     slowdown the MPtimer. You really shouldn't use it for the RTC, so doing that
>     trick shouldn't affect guest behavior.
>
>     However, maybe there is some other rational behind it and Peter C and/or
>     Peter M might know better.
>
>
> So I do wonder whether with your ptimer conversion this will be obsoleted, as
> the rate limiter there may do the work for us.
>
> Regards,
> Peter
>
>     --
>     Dmitry
>
>

You might be right, I haven't tried it without prescale multiplier with recent 
ptimer fixes. Will try and report back.

-- 
Dmitry

  reply	other threads:[~2015-10-27 18:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-27 13:48 [Qemu-devel] arm mptimer implementation - why prescaler is multiply by 10? Krzeminski, Marcin (Nokia - PL/Wroclaw)
2015-10-27 14:19 ` Dmitry Osipenko
2015-10-27 14:26   ` Peter Maydell
2015-10-27 18:01   ` Peter Crosthwaite
2015-10-27 18:09     ` Dmitry Osipenko [this message]
2015-10-27 18:19     ` Peter Maydell
2015-10-27 18:22       ` Peter Crosthwaite
2015-10-29  7:00         ` Krzeminski, Marcin (Nokia - PL/Wroclaw)
2015-10-29 15:18           ` Dmitry Osipenko

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=562FBDC1.50805@gmail.com \
    --to=digetx@gmail.com \
    --cc=crosthwaitepeter@gmail.com \
    --cc=marcin.krzeminski@nokia.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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 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.