Linux Kernel 2.4 Useful Patches

Web access to the GIT repository - GIT access to the repository

poll-optim-jiffies : Optimize the timeout computation for poll() and epoll()

The poll and epoll mechanisms use a millisecond-based timeout which gets converted to jiffies. However, the conversion is suboptimal in that it contains one multiply and one divide. The patch makes use of msec_to_jiffies() to let the compiler eliminate those operations when HZ divides 1000.

Initial date:2005/12/04
Description:Optimize the timeout computation for poll() and epoll()
Author(s):Willy Tarreau
See also:epoll-lt
Abstract:The poll and epoll mechanisms use a millisecond-based timeout which gets converted to jiffies. However, the conversion is suboptimal in that it contains one multiply and one divide. The patch makes use of msec_to_jiffies() to let the compiler eliminate those operations when HZ divides 1000.

Notes

The epoll patch only applies to epoll-enabled kernels.

Contents


(C) Willy Tarreau - 2008-06-01