Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scx: Remove unused variables, imports and functions #484

Merged
merged 2 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions scheds/rust/scx_bpfland/src/bpf/main.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,6 @@ static inline bool vtime_before(u64 a, u64 b)
*/
static inline u64 task_vtime(struct task_struct *p)
{
u64 vtime = p->scx.dsq_vtime;

/*
* Limit the vruntime to (vtime_now - slice_ns_lag) to avoid
* excessively penalizing tasks.
Expand Down
8 changes: 0 additions & 8 deletions scheds/rust/scx_rustland/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ pub mod bpf_intf;
mod bpf;
use bpf::*;

use scx_utils::Topology;
use scx_utils::TopologyMap;
use scx_utils::UserExitInfo;

use std::thread;
Expand All @@ -25,7 +23,6 @@ use std::time::SystemTime;

use std::fs::File;
use std::io::{self, Read};
use std::path::Path;

use anyhow::Context;
use anyhow::Result;
Expand Down Expand Up @@ -264,7 +261,6 @@ impl TaskTree {
// Main scheduler object
struct Scheduler<'a> {
bpf: BpfScheduler<'a>, // BPF connector
topo_map: TopologyMap, // Host topology
task_pool: TaskTree, // tasks ordered by vruntime
task_map: TaskInfoMap, // map pids to the corresponding task information
proc_stats: HashMap<i32, u64>, // Task statistics from procfs
Expand All @@ -280,9 +276,6 @@ impl<'a> Scheduler<'a> {
opts: &Opts,
open_object: &'a mut MaybeUninit<OpenObject>,
) -> Result<Self> {
// Initialize core mapping topology.
let topo = Topology::new().expect("Failed to build host topology");
let topo_map = TopologyMap::new(&topo).expect("Failed to generate topology map");

// Low-level BPF connector.
let bpf = BpfScheduler::init(
Expand All @@ -300,7 +293,6 @@ impl<'a> Scheduler<'a> {
// Return scheduler object.
Ok(Self {
bpf,
topo_map,
task_pool: TaskTree::new(),
task_map: TaskInfoMap::new(),
proc_stats: HashMap::new(),
Expand Down