base-hw: Virtualbox thread priorities

Adrian-Ken Rueegsegger ken at ...309...
Fri Jul 10 17:19:11 CEST 2015


Hello Josef,

On 07/10/2015 02:08 PM, Josef Söntgen wrote:
> Since the stats are absolute it would be best to reset them to zero
> before collecting them a second time. In this case the rtc_drv should
> not be in the top range anymore because it should not be used by vbox
> while it is running but only once when it starts.

I collected another round of numbers that are non-cumulative for
hw_x86_64 (not running on Muen). As before, the first measurement was
done in the bootloader of the guest VM:

pd_label             | label        | spent    | % of total
---------------------+--------------+----------+-----------
init -> virtualbox   | EMT          | 98001213 | 37.45505%
init -> virtualbox   | virtualbox   | 83688021 | 31.98470%
init -> rtc_drv      | rtc_ep       | 36408986 | 13.91514%
init -> rtc_drv      | rtc_drv      | 23748123 |  9.07629%
init                 | init         |  4032147 |  1.54105%
init -> acpi_drv     | acpi_drv     |  2543088 |  0.97194%
init -> platform_drv | platform_drv |  2430257 |  0.92882%
init -> ps2_drv      | ps2_drv_ep   |  1830875 |  0.69974%
init -> timer        | timer_drv_ep |  1654987 |  0.63252%
init -> virtualbox   | VMPwrUp      |  1586461 |  0.60633%

And here the second measurement once the Linux login prompt is visible:

pd_label           | label             | spent      | % of total
-------------------+-------------------+------------+-----------
init -> virtualbox | EMT               | 1521043562 | 98.25379%
init -> timer      | timer_drv_ep      |   19607895 |  1.26660%
init -> virtualbox | Timer             |    2819414 |  0.18212%
init -> timer      | timeout_scheduler |    1971086 |  0.12732%
init -> virtualbox | alarm-timer       |    1298777 |  0.08390%
init -> virtualbox | ATA-1             |     525509 |  0.03395%
core               | pager_activation  |     522312 |  0.03374%
init -> fb_drv     | vesa_ep           |     181979 |  0.01176%
core               | entrypoint        |      61660 |  0.00398%
init -> virtualbox | OhciFramer        |      15831 |  0.00102%

So looking at these numbers the EMT thread is even more dominant and the
rtc_drv is indeed gone: its spent/used figures of the second measurement
are actually zero.

>> I do not know the implementation details of rtc_drv but I did not expect
>> it to make the top 10.
> 
> I did not expect this either. Although it is indeed somewhat expensive
> (i.e. it should be avoided to read it several times a second), I cannot
> imagine why it takes about 10% of the total time when starting vbox.
> It basically reads the time from the cmos which merely involves an IPC
> to core to read the I/O port. It would be good to know if the number of
> calls of the rtc_drv differ between base-hw and base-nova.

Compared to the other work that is going on during startup I would have
guessed that the rtc_drv had very little to do... Not quite sure if this
could be a contributor to the timing inaccuracies that we observe on
hw_x86_64_muen. There we have to specify kernel parameters notsc and lpj
with a fixed value so Linux boots reliably.

Regards,
Adrian




More information about the users mailing list