qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] arm mptimer implementation - why prescaler is multiply


From: Dmitry Osipenko
Subject: Re: [Qemu-devel] arm mptimer implementation - why prescaler is multiply by 10?
Date: Tue, 27 Oct 2015 21:09:05 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

27.10.2015 21:01, Peter Crosthwaite пишет:


On Tue, Oct 27, 2015 at 7:19 AM, Dmitry Osipenko <address@hidden
<mailto:address@hidden>> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]