]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Arran Cudbard-Bell [Thu, 12 Dec 2019 18:04:50 +0000 (01:04 +0700)]
strdup filename in more places
Alan T. DeKok [Thu, 12 Dec 2019 17:43:27 +0000 (12:43 -0500)]
remove unused variable
Alan T. DeKok [Thu, 12 Dec 2019 17:39:49 +0000 (12:39 -0500)]
Revert "add API to clear request_data"
This reverts commit
33c8af9031618f293195802facfd5ab3cb3433dc .
no longer needed
Alan T. DeKok [Thu, 12 Dec 2019 17:39:29 +0000 (12:39 -0500)]
Revert "add API to clear a pre-existing stack"
This reverts commit
1d764ca8062b0b73704df7acbd4ec8e7e70cab91 .
not needed
Arran Cudbard-Bell [Thu, 12 Dec 2019 17:37:52 +0000 (00:37 +0700)]
Add the pointer to the handle, not the handle
Alan T. DeKok [Thu, 12 Dec 2019 17:12:34 +0000 (12:12 -0500)]
typo. Use the correct variable
Alan T. DeKok [Thu, 12 Dec 2019 16:51:39 +0000 (11:51 -0500)]
snprintf() is expensive.
Using our own itoa() routine saves 200ms on a 15s run.
Alan T. DeKok [Thu, 12 Dec 2019 16:32:49 +0000 (11:32 -0500)]
remove bad code
Arran Cudbard-Bell [Thu, 12 Dec 2019 16:28:56 +0000 (23:28 +0700)]
PCRE_ERROR_UNSET not available everywhere
Alan T. DeKok [Thu, 12 Dec 2019 16:21:53 +0000 (11:21 -0500)]
move code to where it's used
Alan T. DeKok [Thu, 12 Dec 2019 15:50:51 +0000 (10:50 -0500)]
add local free list for MD5 contexts
which saves 1/2s to 1s on the performance tests.
Because we don't control the content of OpenSSL's structures,
we can't use a dlist. Instead, we just have a fixed-size local
array. With provisions for all array entries being used.
In general, the code should allocate an MD5 context, use it,
and immediately free it. i.e. *without* doing any IO while
holding the MD5 context.
Since the code does this already, it's OK.
Alan T. DeKok [Thu, 12 Dec 2019 15:49:25 +0000 (10:49 -0500)]
don't call snprintf() in the hot path.
If we don't have debugging symbols enabled, then performance
is likely more important than debugging. If debugging symbols
are enabled, then small performance hits aren't much of an issue.
Arran Cudbard-Bell [Thu, 12 Dec 2019 13:14:41 +0000 (20:14 +0700)]
Initialise is_closed to the correct value
Arran Cudbard-Bell [Thu, 12 Dec 2019 12:19:05 +0000 (19:19 +0700)]
Add basic I/O throughput test
Arran Cudbard-Bell [Thu, 12 Dec 2019 12:18:41 +0000 (19:18 +0700)]
Make trunk more permissive regarding what callbacks need to be provided
Arran Cudbard-Bell [Thu, 12 Dec 2019 10:27:46 +0000 (17:27 +0700)]
Typos
Arran Cudbard-Bell [Thu, 12 Dec 2019 10:20:03 +0000 (17:20 +0700)]
Add redis pipeline code
Untested... So probably doesn't work yet.
Arran Cudbard-Bell [Thu, 12 Dec 2019 10:19:07 +0000 (17:19 +0700)]
Pass around connection callbacks and configurations in structs
Makes it much easier to add new parameters later
Arran Cudbard-Bell [Thu, 12 Dec 2019 08:05:51 +0000 (15:05 +0700)]
Add a 'ignore a response' mini-API to the Redis I/O code
When a request is signalled to be freed we can now tell the redis pipeline code to ignore the response.
Unfortunately there's no way to explicitly cancel a command, but they're not usually very long running anyway.
Arran Cudbard-Bell [Thu, 12 Dec 2019 08:04:05 +0000 (15:04 +0700)]
Change how we deal with freeing connections
We now use the on_halt watcher as an indication the conn is ready to be freed, and that the tconn should also be freed.
This allows us to signal that the connection should be shutdown, and allows that process to complete before we attempt to free the conn or tconn.
The previous code just failed spectacularly... this is almost sane.
Arran Cudbard-Bell [Thu, 12 Dec 2019 08:02:04 +0000 (15:02 +0700)]
Allow request states to be signalled from outside of the demuxer
The demuxer isn't always needed or useful.
Arran Cudbard-Bell [Thu, 12 Dec 2019 08:01:27 +0000 (15:01 +0700)]
memcpy the trunk config
It's just easier, and there are fewer pointer derefs.
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:57:21 +0000 (14:57 +0700)]
Enqueue return codes should be public...
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:56:38 +0000 (14:56 +0700)]
Allow watchers to be removed by handlers without causing catastrophic failure
When a watcher is freed, the watcher call loop is now fully aware that this has happened, and will not attempt to call freed watchers.
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:55:05 +0000 (14:55 +0700)]
Docs
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:54:50 +0000 (14:54 +0700)]
Everything else uses entry...
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:54:29 +0000 (14:54 +0700)]
Shift come code around
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:53:37 +0000 (14:53 +0700)]
Add a deferred signal handling system to the connection API
It was a nightmare trying to reason about how signals would be delivered to the connections from within the handlers, so prevent that from happening, EVER.
Now the connection state machine completes whatever work it needs to, then at the end, checks to see if the handlers signalled it, and THEN, AND ONLY THEN does it process the signals.
The signals run through the public signalling interface, which should mean the connection is never allowed to make an invalid transition. Signals that are invalid for the connections current state are just ignored.
Alan T. DeKok [Wed, 11 Dec 2019 21:12:01 +0000 (16:12 -0500)]
reuse more memory
Arran Cudbard-Bell [Wed, 11 Dec 2019 13:53:14 +0000 (20:53 +0700)]
Make JIT stack size configurable, and keep the stack sizes consistent between library versions
Arran Cudbard-Bell [Wed, 11 Dec 2019 13:47:18 +0000 (20:47 +0700)]
Add missing errors, increase JIT stack size
Alan T. DeKok [Wed, 11 Dec 2019 13:51:58 +0000 (08:51 -0500)]
increase size of output buffer
Alan T. DeKok [Wed, 11 Dec 2019 12:53:25 +0000 (07:53 -0500)]
Revert "use PCRE function to get error string"
This reverts commit
278ba5cdf353739bfdef5a9b20836430c5affd3e .
Nope.
Alan T. DeKok [Wed, 11 Dec 2019 12:35:38 +0000 (07:35 -0500)]
use PCRE function to get error string
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:49:28 +0000 (09:49 +0700)]
Better tracking for stacked handlers in connection.c
They don't really do much here, but it allows us to prevent certain signalling functions being used in handlers in future.
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:38:44 +0000 (09:38 +0700)]
Move to macros for all request list changes
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:32:56 +0000 (09:32 +0700)]
Typo
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:27:47 +0000 (09:27 +0700)]
Everywhere else uses entry as the dlist fields
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:16:57 +0000 (09:16 +0700)]
Add shutdown callback to the redis handle
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:14:45 +0000 (09:14 +0700)]
Deal with return codes from the shutdown callback
Arran Cudbard-Bell [Wed, 11 Dec 2019 01:54:39 +0000 (08:54 +0700)]
Used
Arran Cudbard-Bell [Wed, 11 Dec 2019 01:17:20 +0000 (08:17 +0700)]
Fix LDAP connection callback
Arran Cudbard-Bell [Wed, 11 Dec 2019 00:54:56 +0000 (07:54 +0700)]
Add support for shutting down connections gracefully
Jorge Pereira [Tue, 10 Dec 2019 14:48:48 +0000 (11:48 -0300)]
Update Pica8 dictionary
Arran Cudbard-Bell [Tue, 10 Dec 2019 13:38:45 +0000 (20:38 +0700)]
Start of Redis Async I/O tests
Arran Cudbard-Bell [Tue, 10 Dec 2019 13:38:29 +0000 (20:38 +0700)]
Get basic Redis async I/O functional
Arran Cudbard-Bell [Tue, 10 Dec 2019 13:38:06 +0000 (20:38 +0700)]
Only two packets
Arran Cudbard-Bell [Tue, 10 Dec 2019 13:37:54 +0000 (20:37 +0700)]
Remove duplicate message
Arran Cudbard-Bell [Tue, 10 Dec 2019 09:54:51 +0000 (16:54 +0700)]
Typo
Arran Cudbard-Bell [Tue, 10 Dec 2019 09:38:10 +0000 (16:38 +0700)]
Always need to add the linking context
Arran Cudbard-Bell [Tue, 10 Dec 2019 08:16:44 +0000 (15:16 +0700)]
Add function to check if a list is initialised
Arran Cudbard-Bell [Tue, 10 Dec 2019 08:16:26 +0000 (15:16 +0700)]
Add notes on heap allocations
Arran Cudbard-Bell [Tue, 10 Dec 2019 07:44:01 +0000 (14:44 +0700)]
Fix linker args
Arran Cudbard-Bell [Tue, 10 Dec 2019 06:45:51 +0000 (13:45 +0700)]
Fix test command output for the EAP tests
Arran Cudbard-Bell [Tue, 10 Dec 2019 06:45:40 +0000 (13:45 +0700)]
Implement self-contained way of managing the request slab allocator
There's no real reason to use specific free lists. We want all requests in a particular thread to be allocated in the same list, and passing around free list heads just makes things more complicated.
This seems to deal ok with child requests too.
Arran Cudbard-Bell [Tue, 10 Dec 2019 05:36:21 +0000 (12:36 +0700)]
Revert "alloc / free requests into worker-specific list"
This reverts commit
dd4dcaeccfe4334e0d45f08549b070ae98dad314 .
Revert "add APIs to mark a request as unused, or to re-use a request"
This reverts commit
de712c55940c3b2aa8bec49ae93b1c4aa62ffb14 .
Arran Cudbard-Bell [Tue, 10 Dec 2019 03:32:08 +0000 (10:32 +0700)]
s/rad_request/fr_request_s/
Alan T. DeKok [Tue, 10 Dec 2019 02:29:25 +0000 (21:29 -0500)]
point to "track" and not "entry"
Alan T. DeKok [Mon, 9 Dec 2019 23:24:34 +0000 (18:24 -0500)]
alloc / free requests into worker-specific list
Alan T. DeKok [Mon, 9 Dec 2019 23:16:21 +0000 (18:16 -0500)]
use new API for fr_dict_enum_by_value()
Alan T. DeKok [Mon, 9 Dec 2019 23:15:21 +0000 (18:15 -0500)]
use new API for fr_dict_enum_by_value()
Alan T. DeKok [Mon, 9 Dec 2019 23:14:38 +0000 (18:14 -0500)]
add duplicate of fr_dict_enum_by_value(), which takes dict
that saves rather surprising amounts of time.
Alan T. DeKok [Mon, 9 Dec 2019 22:07:27 +0000 (17:07 -0500)]
add APIs to mark a request as unused, or to re-use a request
this avoids the malloc / free loop when dealing with large
volumes of requests
Alan T. DeKok [Mon, 9 Dec 2019 22:00:09 +0000 (17:00 -0500)]
add API to clear request_data
Alan T. DeKok [Mon, 9 Dec 2019 21:59:20 +0000 (16:59 -0500)]
add API to clear a pre-existing stack
Alan T. DeKok [Mon, 9 Dec 2019 18:41:04 +0000 (13:41 -0500)]
test result of write()
Alan T. DeKok [Mon, 9 Dec 2019 18:14:32 +0000 (13:14 -0500)]
need this, too
Alan T. DeKok [Mon, 9 Dec 2019 16:53:15 +0000 (11:53 -0500)]
remove test which no longer works
Alan T. DeKok [Mon, 9 Dec 2019 16:21:58 +0000 (11:21 -0500)]
call event timer delete instead of const_free
which lets us re-use the timer event
Alan T. DeKok [Mon, 9 Dec 2019 15:48:13 +0000 (10:48 -0500)]
slab allocator && re-use for tracking structures
which saves ~1/2s on a ~20s run.
Alan T. DeKok [Mon, 9 Dec 2019 14:19:57 +0000 (09:19 -0500)]
initialize variable to quiet stupid scanner
Arran Cudbard-Bell [Mon, 9 Dec 2019 13:52:54 +0000 (20:52 +0700)]
All todos done...
Arran Cudbard-Bell [Mon, 9 Dec 2019 13:36:15 +0000 (20:36 +0700)]
Unused arg
Alan T. DeKok [Mon, 9 Dec 2019 13:29:29 +0000 (08:29 -0500)]
move control API to pipes instead of poking kevent.
it's a LOT faster to signal via pipes & kevent than to add / delete
individual kevents
Alan T. DeKok [Mon, 9 Dec 2019 02:06:29 +0000 (21:06 -0500)]
check for debug BEFORE calling debug function
map_list_mod_debug() does a lot of unconditional allocations.
So don't call it unless we know it's debugging
Alan T. DeKok [Mon, 9 Dec 2019 01:49:32 +0000 (20:49 -0500)]
call fr_worker_verify only when WITH_VERIFY_PTR is set
Arran Cudbard-Bell [Mon, 9 Dec 2019 13:22:19 +0000 (20:22 +0700)]
Typo
Arran Cudbard-Bell [Mon, 9 Dec 2019 13:21:26 +0000 (20:21 +0700)]
Add dumb script to run the google profiler against a binary
Arran Cudbard-Bell [Mon, 9 Dec 2019 12:47:39 +0000 (19:47 +0700)]
Support connection lifetime
Arran Cudbard-Bell [Mon, 9 Dec 2019 11:55:33 +0000 (18:55 +0700)]
Test high/low edges for connection spawning
Arran Cudbard-Bell [Mon, 9 Dec 2019 09:28:28 +0000 (16:28 +0700)]
Check the callbacks were actually called in the I/O tests
Set start time to 1, so we don't trigger asserts
Arran Cudbard-Bell [Mon, 9 Dec 2019 06:20:56 +0000 (13:20 +0700)]
Typo
Arran Cudbard-Bell [Mon, 9 Dec 2019 04:00:45 +0000 (11:00 +0700)]
Notes on what we're doing in trunk_requests_per_connection
Arran Cudbard-Bell [Mon, 9 Dec 2019 03:52:20 +0000 (10:52 +0700)]
Increase debug priority of trunk connection state changes
We should only see these printed once a steady state has been reached if something genuinely interesting happens, like a load spike or network disruption
Arran Cudbard-Bell [Mon, 9 Dec 2019 03:48:50 +0000 (10:48 +0700)]
Add draining_to_free state to simplify max_uses and lifetime
Connections in the draining-to-free state cannot be reactivated, and will be freed once there are no more requests associated with them.
Connections in the draining state can be reactivated if we get a load spike
Arran Cudbard-Bell [Mon, 9 Dec 2019 03:16:13 +0000 (10:16 +0700)]
Fix issues with freeing requests
Implement max_uses
Add configuration parser
Alan T. DeKok [Sun, 8 Dec 2019 21:34:20 +0000 (16:34 -0500)]
add simple profiling make file
so that mere mortals can run the profiling tools
Alan T. DeKok [Sat, 7 Dec 2019 20:14:16 +0000 (15:14 -0500)]
make sure that each packet has it's own unique time
Arran Cudbard-Bell [Sun, 8 Dec 2019 11:49:51 +0000 (18:49 +0700)]
Fix redefinition
Arran Cudbard-Bell [Sun, 8 Dec 2019 10:01:58 +0000 (17:01 +0700)]
Formatting
Arran Cudbard-Bell [Sun, 8 Dec 2019 09:09:19 +0000 (16:09 +0700)]
Always include autoconf.h in talloc.h
When doing standalone builds it's easy to miss the include for autoconf.h and it leads to stupid things
Arran Cudbard-Bell [Sun, 8 Dec 2019 07:54:01 +0000 (14:54 +0700)]
Insert freed requests into an unassigned list, ready to be used again
This gives us significant performance improvements (as you'd expect)
Arran Cudbard-Bell [Sat, 7 Dec 2019 14:16:24 +0000 (21:16 +0700)]
Space to tabs
Alan T. DeKok [Sat, 7 Dec 2019 15:04:07 +0000 (10:04 -0500)]
stupid integer overflow
Alan T. DeKok [Sat, 7 Dec 2019 15:03:57 +0000 (10:03 -0500)]
add todo note
Alan T. DeKok [Fri, 6 Dec 2019 19:49:42 +0000 (14:49 -0500)]
limit to max backlog
Arran Cudbard-Bell [Sat, 7 Dec 2019 13:52:59 +0000 (20:52 +0700)]
Unused
Arran Cudbard-Bell [Sat, 7 Dec 2019 13:47:37 +0000 (20:47 +0700)]
Remove and rename fields
Arran Cudbard-Bell [Sat, 7 Dec 2019 12:58:41 +0000 (19:58 +0700)]
Fix opening connection in the connection manager
Arran Cudbard-Bell [Sat, 7 Dec 2019 11:31:25 +0000 (18:31 +0700)]
Rebalance the backlogs of connections when a new connection becomes active