Re: [PATCH v1 4/4] s390x: Testing the Subchannel I/O read

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

 




On 2019-11-14 17:51, Thomas Huth wrote:
On 14/11/2019 17.38, Pierre Morel wrote:
[...]
+static char buffer[4096];
+
+static void delay(int d)
+{
+    int i, j;
+
+    while (d--)
+        for (i = 1000000; i; i--)
+            for (j = 1000000; j; j--)
+                ;
+}
You could set a timer.
Hum, do we really want to do this?
I'm pretty sure that the compiler optimizes empty loops away. Maybe have
a look at the disassembly of your delay function...

Anyway, it's likely better to use STCK and friends to get a proper
timing. You could move get_clock_ms() from s390x/intercept.c to the
lib/s390x folder and then use that function here.


Yes, I can, thanks.

Pierre




  Thomas

--
Pierre Morel
IBM Lab Boeblingen




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux