From 5fe91796d51cd69ffa9c4afaa1b6ae3f3856a06a Mon Sep 17 00:00:00 2001 From: Pat Somaru Date: Tue, 28 Jan 2025 10:49:51 -0500 Subject: [PATCH] regenerate bindgens (cherry picked from commit 316dd5761f84950e1a9c76cfc67a453ef22b1f60) --- scheds/rust/scx_layered/src/bpf_intf.rs | 80 ++++++++++++++----------- 1 file changed, 44 insertions(+), 36 deletions(-) diff --git a/scheds/rust/scx_layered/src/bpf_intf.rs b/scheds/rust/scx_layered/src/bpf_intf.rs index 36f1896c1..db57efa76 100644 --- a/scheds/rust/scx_layered/src/bpf_intf.rs +++ b/scheds/rust/scx_layered/src/bpf_intf.rs @@ -1,5 +1,4 @@ /* automatically generated by rust-bindgen 0.71.1 */ -/* automatically generated by rust-bindgen 0.70.1 */ #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] @@ -55,6 +54,7 @@ pub const consts_SCXCMD_OP_JOIN: consts = 1; pub const consts_SCXCMD_OP_LEAVE: consts = 2; pub const consts_SCXCMD_PREFIX: consts = 23568; pub const consts_SCXCMD_COMLEN: consts = 13; +pub const consts_MAX_GPU_PIDS: consts = 100000; pub type consts = ::std::os::raw::c_uint; pub const layer_kind_LAYER_KIND_OPEN: layer_kind = 0; pub const layer_kind_LAYER_KIND_GROUPED: layer_kind = 1; @@ -321,7 +321,9 @@ pub const layer_match_kind_MATCH_NSPID_EQUALS: layer_match_kind = 11; pub const layer_match_kind_MATCH_NS_EQUALS: layer_match_kind = 12; pub const layer_match_kind_MATCH_SCXCMD_JOIN: layer_match_kind = 13; pub const layer_match_kind_MATCH_IS_GROUP_LEADER: layer_match_kind = 14; -pub const layer_match_kind_NR_LAYER_MATCH_KINDS: layer_match_kind = 15; +pub const layer_match_kind_MATCH_USING_GPU: layer_match_kind = 15; +pub const layer_match_kind_MATCH_USED_GPU: layer_match_kind = 16; +pub const layer_match_kind_NR_LAYER_MATCH_KINDS: layer_match_kind = 17; pub type layer_match_kind = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -338,6 +340,8 @@ pub struct layer_match { pub tgid: u32_, pub nsid: u64_, pub is_group_leader: bool, + pub using_gpu: bool, + pub used_gpu: bool, } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { @@ -361,21 +365,25 @@ const _: () = { ["Offset of field: layer_match::nsid"][::std::mem::offset_of!(layer_match, nsid) - 4160usize]; ["Offset of field: layer_match::is_group_leader"] [::std::mem::offset_of!(layer_match, is_group_leader) - 4168usize]; + ["Offset of field: layer_match::using_gpu"] + [::std::mem::offset_of!(layer_match, using_gpu) - 4169usize]; + ["Offset of field: layer_match::used_gpu"] + [::std::mem::offset_of!(layer_match, used_gpu) - 4170usize]; }; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct layer_match_ands { - pub matches: [layer_match; 15usize], + pub matches: [layer_match; 17usize], pub nr_match_ands: ::std::os::raw::c_int, } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of layer_match_ands"][::std::mem::size_of::() - 62648usize]; + ["Size of layer_match_ands"][::std::mem::size_of::() - 71000usize]; ["Alignment of layer_match_ands"][::std::mem::align_of::() - 8usize]; ["Offset of field: layer_match_ands::matches"] [::std::mem::offset_of!(layer_match_ands, matches) - 0usize]; ["Offset of field: layer_match_ands::nr_match_ands"] - [::std::mem::offset_of!(layer_match_ands, nr_match_ands) - 62640usize]; + [::std::mem::offset_of!(layer_match_ands, nr_match_ands) - 70992usize]; }; pub const layer_growth_algo_GROWTH_ALGO_STICKY: layer_growth_algo = 0; pub const layer_growth_algo_GROWTH_ALGO_LINEAR: layer_growth_algo = 1; @@ -424,54 +432,54 @@ pub struct layer { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of layer"][::std::mem::size_of::() - 2005280usize]; + ["Size of layer"][::std::mem::size_of::() - 2272544usize]; ["Alignment of layer"][::std::mem::align_of::() - 8usize]; ["Offset of field: layer::matches"][::std::mem::offset_of!(layer, matches) - 0usize]; ["Offset of field: layer::nr_match_ors"] - [::std::mem::offset_of!(layer, nr_match_ors) - 2004736usize]; - ["Offset of field: layer::id"][::std::mem::offset_of!(layer, id) - 2004740usize]; + [::std::mem::offset_of!(layer, nr_match_ors) - 2272000usize]; + ["Offset of field: layer::id"][::std::mem::offset_of!(layer, id) - 2272004usize]; ["Offset of field: layer::min_exec_ns"] - [::std::mem::offset_of!(layer, min_exec_ns) - 2004744usize]; + [::std::mem::offset_of!(layer, min_exec_ns) - 2272008usize]; ["Offset of field: layer::max_exec_ns"] - [::std::mem::offset_of!(layer, max_exec_ns) - 2004752usize]; + [::std::mem::offset_of!(layer, max_exec_ns) - 2272016usize]; ["Offset of field: layer::yield_step_ns"] - [::std::mem::offset_of!(layer, yield_step_ns) - 2004760usize]; - ["Offset of field: layer::slice_ns"][::std::mem::offset_of!(layer, slice_ns) - 2004768usize]; - ["Offset of field: layer::fifo"][::std::mem::offset_of!(layer, fifo) - 2004776usize]; - ["Offset of field: layer::weight"][::std::mem::offset_of!(layer, weight) - 2004780usize]; + [::std::mem::offset_of!(layer, yield_step_ns) - 2272024usize]; + ["Offset of field: layer::slice_ns"][::std::mem::offset_of!(layer, slice_ns) - 2272032usize]; + ["Offset of field: layer::fifo"][::std::mem::offset_of!(layer, fifo) - 2272040usize]; + ["Offset of field: layer::weight"][::std::mem::offset_of!(layer, weight) - 2272044usize]; ["Offset of field: layer::disallow_open_after_ns"] - [::std::mem::offset_of!(layer, disallow_open_after_ns) - 2004784usize]; + [::std::mem::offset_of!(layer, disallow_open_after_ns) - 2272048usize]; ["Offset of field: layer::disallow_preempt_after_ns"] - [::std::mem::offset_of!(layer, disallow_preempt_after_ns) - 2004792usize]; + [::std::mem::offset_of!(layer, disallow_preempt_after_ns) - 2272056usize]; ["Offset of field: layer::xllc_mig_min_ns"] - [::std::mem::offset_of!(layer, xllc_mig_min_ns) - 2004800usize]; - ["Offset of field: layer::kind"][::std::mem::offset_of!(layer, kind) - 2004808usize]; - ["Offset of field: layer::preempt"][::std::mem::offset_of!(layer, preempt) - 2004812usize]; + [::std::mem::offset_of!(layer, xllc_mig_min_ns) - 2272064usize]; + ["Offset of field: layer::kind"][::std::mem::offset_of!(layer, kind) - 2272072usize]; + ["Offset of field: layer::preempt"][::std::mem::offset_of!(layer, preempt) - 2272076usize]; ["Offset of field: layer::preempt_first"] - [::std::mem::offset_of!(layer, preempt_first) - 2004813usize]; - ["Offset of field: layer::exclusive"][::std::mem::offset_of!(layer, exclusive) - 2004814usize]; + [::std::mem::offset_of!(layer, preempt_first) - 2272077usize]; + ["Offset of field: layer::exclusive"][::std::mem::offset_of!(layer, exclusive) - 2272078usize]; ["Offset of field: layer::allow_node_aligned"] - [::std::mem::offset_of!(layer, allow_node_aligned) - 2004815usize]; + [::std::mem::offset_of!(layer, allow_node_aligned) - 2272079usize]; ["Offset of field: layer::growth_algo"] - [::std::mem::offset_of!(layer, growth_algo) - 2004816usize]; - ["Offset of field: layer::nr_tasks"][::std::mem::offset_of!(layer, nr_tasks) - 2004824usize]; - ["Offset of field: layer::cpus_seq"][::std::mem::offset_of!(layer, cpus_seq) - 2004832usize]; - ["Offset of field: layer::node_mask"][::std::mem::offset_of!(layer, node_mask) - 2004840usize]; - ["Offset of field: layer::llc_mask"][::std::mem::offset_of!(layer, llc_mask) - 2004848usize]; + [::std::mem::offset_of!(layer, growth_algo) - 2272080usize]; + ["Offset of field: layer::nr_tasks"][::std::mem::offset_of!(layer, nr_tasks) - 2272088usize]; + ["Offset of field: layer::cpus_seq"][::std::mem::offset_of!(layer, cpus_seq) - 2272096usize]; + ["Offset of field: layer::node_mask"][::std::mem::offset_of!(layer, node_mask) - 2272104usize]; + ["Offset of field: layer::llc_mask"][::std::mem::offset_of!(layer, llc_mask) - 2272112usize]; ["Offset of field: layer::check_no_idle"] - [::std::mem::offset_of!(layer, check_no_idle) - 2004856usize]; - ["Offset of field: layer::perf"][::std::mem::offset_of!(layer, perf) - 2004860usize]; + [::std::mem::offset_of!(layer, check_no_idle) - 2272120usize]; + ["Offset of field: layer::perf"][::std::mem::offset_of!(layer, perf) - 2272124usize]; ["Offset of field: layer::refresh_cpus"] - [::std::mem::offset_of!(layer, refresh_cpus) - 2004864usize]; - ["Offset of field: layer::cpus"][::std::mem::offset_of!(layer, cpus) - 2004872usize]; - ["Offset of field: layer::nr_cpus"][::std::mem::offset_of!(layer, nr_cpus) - 2004936usize]; + [::std::mem::offset_of!(layer, refresh_cpus) - 2272128usize]; + ["Offset of field: layer::cpus"][::std::mem::offset_of!(layer, cpus) - 2272136usize]; + ["Offset of field: layer::nr_cpus"][::std::mem::offset_of!(layer, nr_cpus) - 2272200usize]; ["Offset of field: layer::nr_llc_cpus"] - [::std::mem::offset_of!(layer, nr_llc_cpus) - 2004940usize]; + [::std::mem::offset_of!(layer, nr_llc_cpus) - 2272204usize]; ["Offset of field: layer::llcs_to_drain"] - [::std::mem::offset_of!(layer, llcs_to_drain) - 2005200usize]; + [::std::mem::offset_of!(layer, llcs_to_drain) - 2272464usize]; ["Offset of field: layer::llc_drain_cnt"] - [::std::mem::offset_of!(layer, llc_drain_cnt) - 2005208usize]; - ["Offset of field: layer::name"][::std::mem::offset_of!(layer, name) - 2005212usize]; + [::std::mem::offset_of!(layer, llc_drain_cnt) - 2272472usize]; + ["Offset of field: layer::name"][::std::mem::offset_of!(layer, name) - 2272476usize]; }; #[repr(C, packed)] #[derive(Debug, Copy, Clone)]