set better governor hierarchy and add cli command to change (#2519)

This commit is contained in:
Aiden McClelland
2023-11-15 12:17:10 -07:00
committed by GitHub
parent 5f3db8e567
commit a1495dd33d
6 changed files with 100 additions and 36 deletions

View File

@@ -22,6 +22,7 @@ use crate::net::utils::{get_iface_ipv4_addr, get_iface_ipv6_addr};
use crate::prelude::*;
use crate::s9pk::manifest::{Manifest, PackageId};
use crate::status::Status;
use crate::util::cpupower::{get_preferred_governor, Governor};
use crate::util::Version;
use crate::version::{Current, VersionT};
use crate::{ARCH, PLATFORM};
@@ -83,6 +84,7 @@ impl Database {
.join(":"),
ntp_synced: false,
zram: true,
governor: None,
},
package_data: AllPackageData::default(),
ui: serde_json::from_str(include_str!(concat!(
@@ -134,6 +136,7 @@ pub struct ServerInfo {
pub ntp_synced: bool,
#[serde(default)]
pub zram: bool,
pub governor: Option<Governor>,
}
#[derive(Debug, Deserialize, Serialize, HasModel)]