| Age | Commit message (Collapse) | Author |
|
This shamelessly steals the model established in the UDP workers, i.e.
if the kernel is able to bind multiple listening sockets to the same
endpoint, we will share them across threads. If it can't, all threads
will accept on the same socket.
The fast path handles most of the connections, only the rare case of
no data yet on the socket is offloaded to the slow path (which used to
be the mainloop) for completion. This scales nicely, as the higher the
load is, the higher chances are that an accept happens only after the
network roundtrip to the peer completes, leading to more connections
that already have data waiting for us.
We also consolidate the workstruct init and deinit code, preparation
for later unifying all thread state structs for all protocols (mca,
udc and tcp).
The config file gains a per tcp connection worker count and some docs
explaining what this knob buys and costs, nudging the user to either
keep it 0 or dial it up to at least 2.
|
|
|
|
|
|
|
|
|
|
It's with a heavy heart that I remove libowfat as my event library from
opentracker.
libowfat is what taught opentracker to walk and then fly. The tracker was
literally standing on the shoulder of giants when I started writing it in
2006. For its time, the event abstraction was unparalleled and it has
held up for many years, and it served the bittorrent community greatly.
https://erdgeist.org/gitweb/opentracker/commit/?id=ad472597c569568bad0526d116b601dfcb36638c
Unfortunately, it is very likely that libowfat will not be maintained
anymore for the foreseeable future, it is already not easy to get its
source from upstream and opentracker started receiving bug reports that I
can not reasonably answer or patch.
Before the project gets more dependent on the limitations of libowfat's
current state, I need to teach opentracker to stand on its own feet and
fly by itself. I've learned a great deal in the process and have even
more respect now for what libowfat pioneered.
The path for opentracker is cleared now. Ground work has already been
laid in the migration process to support multi threaded http processing
while keeping the aggressive reduction of syscalls alive that made the
libowfat+opentracker combo so scalable.
Here be some dragons, though: Even though there is a unit test suite
now, the event loop's rewrite has not been battle tested yet. So you
might want to hold up for a bit before jumping on the solo band wagon.
What awaits at the end will be a long overdue v1.0, which will be named
in honour of Felix.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
considered to be thread safe.
* the new workstruct also introduces a well defined buffer and result passing path
* a new function scan_find_keywords is a wrapper around scan_urlencoded_query that maps keys in url to values passed in an array of ot_keywords structs
* this new function cleans up much of url parameter parsing work, where read_ptr and write_ptr have been introduced rather than the confusing char *c, *data variables
* I now use memcmp instead of byte_diff to allow compiler to optimize constant size string compares
* got rid of UTORRENT_1600_WORKAROUND
* livesync_ticker is now only called from one (currently main) thread to avoid race conditions
|
|
|
|
|
|
|
|
|
|
|
|
|