Commit Graph

6 Commits

Author SHA1 Message Date
Joakim Hassila 8ea0afb4c4
Added second implementation of liburing as discussed in #1761. (#1804)
Motivation:

As outlined in #1761, io_uring is a new async I/O facility on Linux.

This commit includes a second stab at adding this to SwiftNIO.

Modifications:

Added Uring Selector implementation.

Added liburing support shims.

Disabled one assert that trips during normal usage likely due to async nature of poll updates, for discussion

Added shared kernel sqpoll ring support (can be run with normal user privs in 5.13)

Support for both single shot polls (should work all the way back to 5.1 kernels, needs testing) and multishot streaming polls and modifications for polls (scheduled due in 5.13) for slightly better performance (and better impedance match to SwiftNIO usage)

Added extensive debug logs which can be enabled with -D compiler flags (should likely be removed when bringup and testing is complete)

Adjusted tests.

Added documentation.

Result:

Basic liburing support is in place.

Co-authored-by: Johannes Weiss <johannesweiss@apple.com>
2021-04-29 10:40:27 +01:00
Joakim Hassila 22b58cebee
Update documentation related to allocation troubleshooting on Linux and the ability to run unit tests in parallel. (#1796)
Motivation:

It's not obvious how to do analysis of allocation regressions on Linux, so some documentation would be helpful.
The run time for the unit tests can be quite long (a couple of minutes), can be cut down significantly if running tests in parallel, adding a hint about that.

Modification:

Updated documentation.

Result:

Easier to troubleshoot mallocs on Linux and faster running of unit tests.
2021-04-09 11:49:48 +01:00
Cory Benfield e7880565aa
We use main as our development branch now. (#1651) 2020-09-24 18:02:44 +01:00
Peter Adams c5fa0b4565
Allocation diffing script no longer drops data. (#1513)
Allocation diffing script no longer drops data.

Motivation:

Looking at allocations is hard enough without the script getting the allocation counts wrong.

Modifications:

Where multiple allocations resolved to the same "key" only the last allocation was accounted for. I have changed the script to store all allocations - still keyed in the same way. When diffing the total number of allocations is used - if they are different the total and all contributing stack traces are output.

Added a total for all allocations everywhere at the end together with a difference number.

Output all stack traces before and after contributing to a detected diff.

Update the documentation to reflect changes.

Change the threshold for reporting diffs from > 1000 to >= 1000. This means if allocations go from 1000 to 2000 they are reported as a difference rather than a new allocation.

Result:

It is now easier - if somewhat more verbose to compare allocations.
2020-05-12 09:11:56 +01:00
George Barnett ddb7109142
Include stackdiff-ing in the debugging-allocations doc (#1384)
Motivation:

We recently grew a script to diff the output of `malloc-aggregation.d`,
we should document how this can be used when debugging allocation
regressions.

Modifications:

- Update the doc to include an example of using the script to debug an
  allocation regression
- Fix a bug in the script where before/after were mixed up
- Fix a bug in the script where usage would print '()\n' instead of '\n'

Result:

- Better info on debugging allocations

Co-authored-by: Johannes Weiss <johannesweiss@apple.com>
2020-02-06 16:10:04 +00:00
Johannes Weiss 6bd0a9e61a
document debugging with allocation tests (#1277)
Motivation:

The tooling around the allocation counter tests is pretty opaque and
also not easy to use.

Modifications:

Document what interested folks should know.

Result:

More people will be able to debug allocations in SwiftNIO.

Co-Authored-By: Cory Benfield <lukasa@apple.com>
2019-12-02 11:05:04 +00:00