[lkml]   [2001]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectre: [PATCH] up to 50% faster sys_poll()
Manfred ( wrote:
> sys_poll spends around 1/2 of the execution time allocating / freeing a
> few bytes temporary memory.
> The attached patch tries to avoid these allocation by using the stack -
> usually only a few bytes are needed, kmalloc is used for the rest.
> The result: one poll of stdin is down from 1736 cpu ticks to 865 cpu
> ticks (Pentium II/350 SMP, SMP kernel)

Tested with poll() microbenchmark from

time in microsec to find a single active pipe among N pipes
on a 650 MHz dual Pentium III using poll():

number of pipes
kernel 100 1000 10000
2.4.0-t10pre4 49 1184 14660
2.4.0 48 1162 14702
2.4.0-pp 48 1103 14205

2.4.0-pp is with Manfred's patch. Seems to be a 4-6% improvement
for large numbers of pipes, no change for 100 pipes.

Hope that was an appropriate test.

- Dan
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:0.228 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site