Messages in this thread | | | Date | Mon, 16 Aug 1999 21:59:44 +0200 (CEST) | From | Andrea Arcangeli <> | Subject | Re: [bigmem-patch] 4GB with Linux on IA32 |
| |
On Mon, 16 Aug 1999, Larry McVoy wrote:
>If you tell me what you want to measure I can probably code up something >for you. Or tell you how to do it - there is a lot of infrastructure in
The below one should be the patological case to show the performance hit caused by the additional pte mapping and invlpg done in the page-fault handler:
#define SIZE (700*1024*1024)
int i; char * buf = malloc(SIZE); if (!buf) ...
i = 0; get_start_time(); for (; i < SIZE; i += 4096, buf += 4096) *(int *) buf = 0; get_stop_time();
printf("time %d\n", get_diff_time());
(The optimal thing would be to measure the time in CPU ticks with rdtsc.)
Then we should repeat the same thing doing a COW. So first allocing say 300mbyte of RAM with bzero, and then forking and then starting rewring to the now read-only buffer in the child, to force lots of cow.
I just know that the performance hit of the shm case will be equal to the one of the anonymous memory case.
The pseudocode is just almost C code, so maybe this time it's simpler to add two rdtsc... (if you have some more hint you are welcome of course).
>#include "bench.h" > >main() >{ > BENCH(sysWhizzy(args), 0); > micro("Whizzy", get_n()); >} > >Pretty easy, no?
Nice ;), yes.
Andrea
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |