The new code queues multiple requests with add_request, then waits
for all of them to finish. If it called make_request, it would
combine contiguous requests, but make_request is for buffer cache
I/O, and swap I/O bypasses the buffer cache.
Here is a simple program to measure swap I/O performance:
=== big.c ===
/*
* Usage: time big
* Measure performance of Linux swap I/O by dirtying bss pages.
* NOTE: you must either boot with the option "mem=4M", or
* define MB to be 2-3 times the size of your physical memory.
*/
#define MB 10 /* MB of VM to page out */
main() {
int i;
static char a[MB*1024*1024];
for (i=0; i<sizeof(a); i+=4096)
a[i] = 1;
return 0;
}
Eric Gisin, ericg@unixg.ubc.ca