Re: [PATCH] syscall latency improvement #1

Linus Torvalds
2002-01-26T01:21:27Z

On Fri, 25 Jan 2002, Andrew Morton wrote:
> >
> > Looking at the code, I suspect that 99.9% of this "improvement" comes from
> > one thing, and one thing only: you removed the "cli" in the system call
> > return path.
>
> Before the cli was in the stock kernel, I had added it in the
> low-latency patch. Careful testing showed that it added
> 13 machine cycles to a system call on a P3.

That sounds about right. The empty system call path is basically dominated
by the trap/iret costs, and is on the order of 200 cycles or so on most
CPU's. So 13 cycles would account for the roughly 5% improvement.

Linus