Seastar
High performance C++ framework for concurrent servers
List of all members
seastar::smp_service_group Class Reference

Detailed Description

A resource controller for cross-shard calls.

An smp_service_group allows you to limit the concurrency of smp::submit_to() and similar calls. While it's easy to limit the caller's concurrency (for example, by using a semaphore), the concurrency at the remote end can be multiplied by a factor of smp::count-1, which can be large.

The class is called a service group because it can be used to group similar calls that share resource usage characteristics, need not be isolated from each other, but do need to be isolated from other groups. Calls in a group should not nest; doing so can result in ABA deadlocks.

Nested submit_to() calls must form a directed acyclic graph when considering their smp_service_groups as nodes. For example, if a call using ssg1 then invokes another call using ssg2, the internal call may not call again via either ssg1 or ssg2, or it may form a cycle (and risking an ABBA deadlock). Create a new smp_service_group_instead.

#include <seastar/core/smp.hh>


The documentation for this class was generated from the following file: