Spread 5.0.0 kqueue and epoll Patch
This patch is a complete rewrite of a previous patch for adding
to Spread 4.x. It makes Spread 5.0.0 replace daemon select
calls with FreeBSD
support for the client library is standard as of Spread release
5.0.0rc2 and no longer requires a patch. The availalability
detected automatically. Therefore, you do not have to manually
define any macros. Using
epoll can improve the performance of a
Spread daemon when it is serving thousands to millions of client
As of Spread version 5.0.0rc2, the following changes have been incorporated into the upstream release and no longer require a patch:
Beyond adding enhanced event processing, this patch fixes a FreeBSD compilation error, installation on systems using Perl 5.22 or higher, log file initialization and writing with
-loption, interface binding in loopback-only configurations, some event processing related range checks, and a premature socket descriptor
|spread-5.0.0-kqueue-epoll.patch.gz||Although this patch is well-tested and suitable for use in production environments, you should keep in mind that high/medium/low priority event processing is different from the original code. For each priority level, if at least one ready event of a higher priority was processed, then only one event of the current priority level is processed. Otherwise, all ready events of the current priority level are processed. This ensures lower priority events do not starve.|
Renamed patch after merging 5.0.0 changes, which left patch unchanged.
Merged Spread 5.0.0rc2 changes.
Simplified handle_events() and eliminated potentially incorrect event caching.
Replaced session hash table with O(1) directly-indexed array lookup.
Initialized uninitialized network.c globals to zero.
Removed no-op protocol functions
Removed unused mbox parameter
Fixed bug where old data could be written to newly assigned session.
Do not execute inactive events
Changed epoll implementation
Corrected handling of priority event queues to process pending events.
Fixed FreeBSD compilation error in daemon/ tree
Added first draft of kqueue/epoll support based on prior 4.x patches.
Added first draft of poll client patch based on prior 4.x patches.
Fixed fixpaths to work with Perl 5.22.
Corrected priority and fd_type range checking in events.c.
Fixed daemon session log initialization sequence.
Restored functioning of loopback config file and fixed FreeBSD scope id.