Skip to content

Commit a002367

Browse files
committed
ext/sockets: adding SO_BUSY_POLL socket option for Linux.
To possibly reduce the latency when polling packets by activating it from the network interface for N microseconds. The kernel by doing so, increase the CPU(s) activity bound to the socket significantly. Note that not only the kernel needs to have support enabled for it (which the average distribution usually does) but the network interface itself needs to support it too. If not, it is just a no-op.
1 parent 3677871 commit a002367

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

ext/sockets/sockets.stub.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,13 @@
454454
*/
455455
const SO_EXCLBIND = UNKNOWN;
456456
#endif
457+
#ifdef SO_BUSY_POLL
458+
/**
459+
* @var int
460+
* @cvalue SO_BUSY_POLL
461+
*/
462+
const SO_BUSY_POLL = UNKNOWN;
463+
#endif
457464
#ifdef SKF_AD_OFF
458465
/**
459466
* @var int

ext/sockets/sockets_arginfo.h

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)