Repository navigation
Conversation
kernelize_one() takes each sink's lock with a trylock, and kernelize() starts over at once when one is busy. Streams that are each other's sinks hold their own lock while they try the other's, so they start over against each other. After a change of subscriptions all of them are kernelized on their next packet, at the same moment. With about eight or more such streams the restarts do not end: the threads spin with the call's master lock held, the streams' sockets are no longer read, the log fills with "Kernelizing media stream" lines, and commands for the call are not answered. A static lock around kernelize() leaves the trylock only holders outside of it; the call iterators take their list lock ahead of their trylocks in the same way. A stream with more than RTPE_MAX_FORWARD_DESTINATIONS outputs, two per sink, was pushed to the kernel anyway: the module answered EINVAL, each output ENOENT, and the stream was still marked kernelized. It now takes the no_kernel path. The limit itself is left as it is. It came with 01a10c0, where it sized the array of outputs in struct rtpengine_list_entry; that struct is gone, and until now the module's check was its only use.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
kernelize_one()takes each sink's lock with a trylock, andkernelize()starts over at once when one is busy. Streams that are each other's sinks hold their own lock while they try the other's, so they start over against each other. After a change of subscriptions all of them are kernelized on their next packet, at the same moment. With about eight or more such streams the restarts do not end: the threads spin with the call's master lock held, the streams' sockets are no longer read, the log fills with "Kernelizing media stream" lines, and commands for the call are not answered. A static lock aroundkernelize()leaves the trylock only holders outside of it; the call iterators take their list lock ahead of their trylocks in the same way.A stream with more than
RTPE_MAX_FORWARD_DESTINATIONSoutputs, two per sink, was pushed to the kernel anyway: the module answered EINVAL, each output ENOENT, and the stream was still marked kernelized. It now takes theno_kernelpath.The limit itself is left as it is. It came with 01a10c0, where it sized the array of outputs in
struct rtpengine_list_entry; that struct is gone, and until now the module's check was its only use.