Displaying 2 results from an estimated 2 matches for "hypercall_cycl".
Did you mean:
hypercall_cycles
2007 Apr 18
1
[RFC, PATCH 21/24] i386 Vmi proc node
...et;
+} __attribute__((packed));
+
+/* XXX This hack can only be used with passthrough TSC */
+static inline unsigned long long get_tsc(void)
+{
+ unsigned long long tsc;
+ asm volatile("rdtsc" : "=&A" (tsc));
+ return tsc;
+}
+
+static unsigned long long hypercall_cycles = 0xffffffffULL;
+static void time_hypercall(void)
+{
+ unsigned long long tsc_start, tsc_end, cycles;
+ int i;
+ for (i = 0; i < 1000; i++) {
+ tsc_start = get_tsc();
+ vmi_rdtsc();
+ tsc_end = get_tsc();
+ cycles = tsc_end - tsc_start;
+ if (cycles < hypercall_cycles)
+ hypercall_c...
2007 Apr 18
1
[RFC, PATCH 21/24] i386 Vmi proc node
...et;
+} __attribute__((packed));
+
+/* XXX This hack can only be used with passthrough TSC */
+static inline unsigned long long get_tsc(void)
+{
+ unsigned long long tsc;
+ asm volatile("rdtsc" : "=&A" (tsc));
+ return tsc;
+}
+
+static unsigned long long hypercall_cycles = 0xffffffffULL;
+static void time_hypercall(void)
+{
+ unsigned long long tsc_start, tsc_end, cycles;
+ int i;
+ for (i = 0; i < 1000; i++) {
+ tsc_start = get_tsc();
+ vmi_rdtsc();
+ tsc_end = get_tsc();
+ cycles = tsc_end - tsc_start;
+ if (cycles < hypercall_cycles)
+ hypercall_c...