Hello,

I'm interesting in timing OS overhead for disk accesses. As I've discussed
with Avadh in private emails, I've extended the MARSS_DELAY_IO code in
qemu/hw/ide/core.c to support an SSD simulation. At this point, I want to
understand how much OS overhead is introduced for the operations to my
disk simulation.

I'd like to do the following:

* Have a C++ program that does a small file read (and make sure the file
is not cached in RAM ahead of time).
* Do rdtsc before and after the read (times A and D).
* On the hardware side, whenever I receive the disk IO command to my mods
in ptlsim.cpp, I'd like to grab the time stamp counter at the beginning
and end of the access (times B and C).
* To get the OS overhead, compute B-A and D-C.


My questions are:

1. What variable in PTLSim or QEMU should I grab that is equivalent to the
rdtsc instruction?

2. Just to confirm, does the rdtsc instruction work as expected in
simulation mode (i.e. it gets updated every simulated clock cycle).

Thanks,

Jim Stevens


_______________________________________________
http://www.marss86.org
Marss86-Devel mailing list
[email protected]
https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel

Reply via email to