Re: [PATCH] syscall latency improvement #1

Andrew Morton
2002-01-26T02:18:37Z

Linus Torvalds wrote:
>
> It should be eminently testable. Just remove the cli from the standard
> kernel, and do before-and-after tests.
>

#include <unistd.h>

main()
{
int i = 100 * 1000 * 1000;

while (i--)
getpid();
}

With cli:
./a.out 22.05s user 15.31s system 99% cpu 37.361 total

without cli:
./a.out 18.29s user 17.42s system 99% cpu 35.731 total

That's 4.6%. Intel P3.

It's also 306 cycles per iteration. So the cli added 14 cycles.

-