From: Maxim Baryshnikov Date: Thu, 26 May 2016 03:51:14 +0000 (+0200) Subject: Some minor fixes. X-Git-Url: https://rtime.felk.cvut.cz/gitweb/l4.git/commitdiff_plain/f2e3ae020870560afd8c46471707afdc654897f1 Some minor fixes. --- diff --git a/l4/pkg/benchmark/server/src/main.c b/l4/pkg/benchmark/server/src/main.c index b790cc57f..0bd379b3a 100644 --- a/l4/pkg/benchmark/server/src/main.c +++ b/l4/pkg/benchmark/server/src/main.c @@ -18,11 +18,11 @@ #define ALL_WORKSETS_BENCH struct s { - int dummy[56]; + char dummy[56]; struct s *ptr; }; -struct s array[0x1000000/sizeof(struct s)]; +struct s array[0x2100000/sizeof(struct s)]; #define REPEATS (0x20000000) static __inline__ uint64_t rdtsc(void) @@ -46,25 +46,29 @@ int main(int argc, char *argv[]) while (1) #endif { - unsigned int i; - for (i=0; i < size / sizeof(array[0]); i++) - array[i].ptr = &array[i+1]; - array[ size / sizeof(array[0]) - 1].ptr = &array[0]; + uint8_t repeat_times = 70; + while (repeat_times--){ + + unsigned int i; + for (i=0; i < size / sizeof(array[0]); i++) + array[i].ptr = &array[i+1]; + array[ size / sizeof(array[0]) - 1].ptr = &array[0]; - i = REPEATS; - volatile struct s *p = &array[0]; - uint64_t tic, tac; - tic = rdtsc(); - while (i--) { - p = p->ptr; - //printf("%p\n", p); - } - tac = rdtsc(); - printf("%d %llu\n", size, (tac - tic) / REPEATS); - fflush(stdout); + i = REPEATS; + volatile struct s *p = &array[0]; + uint64_t tic, tac; + tic = rdtsc(); + while (i--) { + p = p->ptr; + //printf("%p\n", p); + } + tac = rdtsc(); + printf("%d %llu\n", size, (tac - tic) / REPEATS); + fflush(stdout); } printf("10 sec wait and do again.\n"); l4_sleep(10000); + } } return 0; } diff --git a/l4/pkg/bootstrap_custom/server/src/ARCH-x86/crt0.S b/l4/pkg/bootstrap_custom/server/src/ARCH-x86/crt0.S index 4e3b04e15..df13f8cb9 100644 --- a/l4/pkg/bootstrap_custom/server/src/ARCH-x86/crt0.S +++ b/l4/pkg/bootstrap_custom/server/src/ARCH-x86/crt0.S @@ -75,11 +75,12 @@ _start: mov $(X86_CR0_PG | X86_CR0_WP | X86_CR0_PE),%eax mov %eax,%cr0 */ +#ifdef JAILHOUSE movl $MSR_MTRR_DEF_TYPE,%ecx rdmsr or $MTRR_ENABLE,%eax wrmsr - +#endif //JAILHOUSE cld cli mov $(3 * 8), %eax