Skip to content

Commit e745487

Browse files
authored
feat: remove shares and max_usage from cgroups (#622)
Signed-off-by: Gaius <gaius.qi@gmail.com>
1 parent ee932a0 commit e745487

File tree

8 files changed

+358
-417
lines changed

8 files changed

+358
-417
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "dragonfly-api"
3-
version = "2.2.15"
3+
version = "2.2.16"
44
authors = ["Gaius <gaius.qi@gmail.com>"]
55
edition = "2021"
66
license = "Apache-2.0"

pkg/apis/common/v2/common.pb.go

Lines changed: 350 additions & 382 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/common/v2/common.pb.validate.go

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/common/v2/common.proto

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -473,12 +473,10 @@ message CPU {
473473

474474
// Cgroup CPU Stat.
475475
message CgroupCPU {
476-
// CFS shares.
477-
uint64 shares = 1;
478476
// CFS period in microseconds.
479-
uint64 period = 2;
477+
uint64 period = 1;
480478
// CFS quota in microseconds.
481-
int64 quota = 3;
479+
int64 quota = 2;
482480
}
483481

484482
// CPUTimes contains the amounts of time the CPU has spent performing different
@@ -536,10 +534,6 @@ message CgroupMemory {
536534
int64 limit = 1;
537535
// Usage is the current memory usage in bytes.
538536
uint64 usage = 2;
539-
// MaxUsage is the maximum memory usage recorded in bytes.
540-
uint64 max_usage = 3;
541-
// Failcnt is the number of times memory allocation failed.
542-
uint64 failcnt = 4;
543537
}
544538

545539
// Network Stat.

proto/common.proto

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -440,12 +440,10 @@ message CPU {
440440

441441
// Cgroup CPU Stat.
442442
message CgroupCPU {
443-
// CFS shares.
444-
uint64 shares = 1;
445443
// CFS period in microseconds.
446-
uint64 period = 2;
444+
uint64 period = 1;
447445
// CFS quota in microseconds.
448-
int64 quota = 3;
446+
int64 quota = 2;
449447
}
450448

451449
// CPUTimes contains the amounts of time the CPU has spent performing different
@@ -497,10 +495,6 @@ message CgroupMemory {
497495
int64 limit = 1;
498496
// Usage is the current memory usage in bytes.
499497
uint64 usage = 2;
500-
// MaxUsage is the maximum memory usage recorded in bytes.
501-
uint64 max_usage = 3;
502-
// Failcnt is the number of times memory allocation failed.
503-
uint64 failcnt = 4;
504498
}
505499

506500
// Network Stat.

src/common.v2.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -480,14 +480,11 @@ pub struct Cpu {
480480
#[allow(clippy::derive_partial_eq_without_eq)]
481481
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
482482
pub struct CgroupCpu {
483-
/// CFS shares.
484-
#[prost(uint64, tag = "1")]
485-
pub shares: u64,
486483
/// CFS period in microseconds.
487-
#[prost(uint64, tag = "2")]
484+
#[prost(uint64, tag = "1")]
488485
pub period: u64,
489486
/// CFS quota in microseconds.
490-
#[prost(int64, tag = "3")]
487+
#[prost(int64, tag = "2")]
491488
pub quota: i64,
492489
}
493490
/// CPUTimes contains the amounts of time the CPU has spent performing different
@@ -565,12 +562,6 @@ pub struct CgroupMemory {
565562
/// Usage is the current memory usage in bytes.
566563
#[prost(uint64, tag = "2")]
567564
pub usage: u64,
568-
/// MaxUsage is the maximum memory usage recorded in bytes.
569-
#[prost(uint64, tag = "3")]
570-
pub max_usage: u64,
571-
/// Failcnt is the number of times memory allocation failed.
572-
#[prost(uint64, tag = "4")]
573-
pub failcnt: u64,
574565
}
575566
/// Network Stat.
576567
#[derive(serde::Serialize, serde::Deserialize)]

src/descriptor.bin

-390 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)