mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
rate_limiter: add RateLimiterGroup
Add a 'rate_limiter/group' module that defines the RateLimiterGroup and a RateLimiterGroupHandle types. The RateLimiterGroupHandle can be used in place of a RateLimiter to limit the aggregate bandwidth and/or ops of multiple virtio-blk or virtio-net queues. Each RateLimiterGroup has an associated worker thread that broadcasts an event to each RateLimiterGroupHandle when a RateLimiter is unblocked. Signed-off-by: Thomas Barrett <tbarrett@crusoeenergy.com>
This commit is contained in:
@@ -53,6 +53,9 @@ use std::sync::Mutex;
|
||||
use std::time::{Duration, Instant};
|
||||
use vmm_sys_util::timerfd::TimerFd;
|
||||
|
||||
/// Module for group rate limiting.
|
||||
pub mod group;
|
||||
|
||||
#[derive(Debug)]
|
||||
/// Describes the errors that may occur while handling rate limiter events.
|
||||
pub enum Error {
|
||||
|
||||
Reference in New Issue
Block a user