Kris Kennaway wrote: > So it is using getpid? It should be fine on FreeBSD with the previous > provisos, but you also need to check Linux behaviour and compare on > identical hardware before you can draw conclusions.
Here's the source of unixbench syscall benchmark: unsigned long iter; void report() { fprintf(stderr,"%ld loops\n", iter); exit(0); } int main(argc, argv) int argc; char *argv[]; { int duration; if (argc != 2) { printf("Usage: %s duration\n", argv[0]); exit(1); } duration = atoi(argv[1]); iter = 0; wake_me(duration, report); while (1) { close(dup(0)); getpid(); getuid(); umask(022); iter++; } /* NOTREACHED */ } As I count it, getpid() is one of 5 syscalls made. Of these, getpid() and getuid() might be cached on Linux in some way, which actually could, with the difference in CPU speed, cause the difference. I can't check it on identical hardware.
signature.asc
Description: OpenPGP digital signature