Skip to content

Commit dc44584

Browse files
committed
kernel: Synchronize with kernel tools/sched_ext
1 parent 54edd25 commit dc44584

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

scheds/c/scx_qmap.bpf.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -776,21 +776,21 @@ static int monitor_timerfn(void *map, int *key, struct bpf_timer *timer)
776776

777777
__COMPAT_scx_bpf_events(&events, sizeof(events));
778778

779-
bpf_printk("%35s: %llu", "SCX_EV_SELECT_CPU_FALLBACK",
779+
bpf_printk("%35s: %lld", "SCX_EV_SELECT_CPU_FALLBACK",
780780
scx_read_event(&events, SCX_EV_SELECT_CPU_FALLBACK));
781-
bpf_printk("%35s: %llu", "SCX_EV_DISPATCH_LOCAL_DSQ_OFFLINE",
781+
bpf_printk("%35s: %lld", "SCX_EV_DISPATCH_LOCAL_DSQ_OFFLINE",
782782
scx_read_event(&events, SCX_EV_DISPATCH_LOCAL_DSQ_OFFLINE));
783-
bpf_printk("%35s: %llu", "SCX_EV_DISPATCH_KEEP_LAST",
783+
bpf_printk("%35s: %lld", "SCX_EV_DISPATCH_KEEP_LAST",
784784
scx_read_event(&events, SCX_EV_DISPATCH_KEEP_LAST));
785-
bpf_printk("%35s: %llu", "SCX_EV_ENQ_SKIP_EXITING",
785+
bpf_printk("%35s: %lld", "SCX_EV_ENQ_SKIP_EXITING",
786786
scx_read_event(&events, SCX_EV_ENQ_SKIP_EXITING));
787-
bpf_printk("%35s: %llu", "SCX_EV_ENQ_SLICE_DFL",
787+
bpf_printk("%35s: %lld", "SCX_EV_ENQ_SLICE_DFL",
788788
scx_read_event(&events, SCX_EV_ENQ_SLICE_DFL));
789-
bpf_printk("%35s: %llu", "SCX_EV_BYPASS_DURATION",
789+
bpf_printk("%35s: %lld", "SCX_EV_BYPASS_DURATION",
790790
scx_read_event(&events, SCX_EV_BYPASS_DURATION));
791-
bpf_printk("%35s: %llu", "SCX_EV_BYPASS_DISPATCH",
791+
bpf_printk("%35s: %lld", "SCX_EV_BYPASS_DISPATCH",
792792
scx_read_event(&events, SCX_EV_BYPASS_DISPATCH));
793-
bpf_printk("%35s: %llu", "SCX_EV_BYPASS_ACTIVATE",
793+
bpf_printk("%35s: %lld", "SCX_EV_BYPASS_ACTIVATE",
794794
scx_read_event(&events, SCX_EV_BYPASS_ACTIVATE));
795795

796796
bpf_timer_start(timer, ONE_SEC_IN_NS, 0);

scheds/include/scx/common.bpf.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,16 @@ void bpf_obj_drop_impl(void *kptr, void *meta) __ksym;
288288
#define bpf_obj_new(type) ((type *)bpf_obj_new_impl(bpf_core_type_id_local(type), NULL))
289289
#define bpf_obj_drop(kptr) bpf_obj_drop_impl(kptr, NULL)
290290

291-
void bpf_list_push_front(struct bpf_list_head *head, struct bpf_list_node *node) __ksym;
292-
void bpf_list_push_back(struct bpf_list_head *head, struct bpf_list_node *node) __ksym;
291+
int bpf_list_push_front_impl(struct bpf_list_head *head,
292+
struct bpf_list_node *node,
293+
void *meta, __u64 off) __ksym;
294+
#define bpf_list_push_front(head, node) bpf_list_push_front_impl(head, node, NULL, 0)
295+
296+
int bpf_list_push_back_impl(struct bpf_list_head *head,
297+
struct bpf_list_node *node,
298+
void *meta, __u64 off) __ksym;
299+
#define bpf_list_push_back(head, node) bpf_list_push_back_impl(head, node, NULL, 0)
300+
293301
struct bpf_list_node *bpf_list_pop_front(struct bpf_list_head *head) __ksym;
294302
struct bpf_list_node *bpf_list_pop_back(struct bpf_list_head *head) __ksym;
295303
struct bpf_rb_node *bpf_rbtree_remove(struct bpf_rb_root *root,
@@ -586,7 +594,6 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
586594
* is not type-compatible with 'signed char', and we define a separate case.
587595
*
588596
* This is copied verbatim from kernel's include/linux/compiler_types.h, but
589-
*
590597
* with default expression (for pointers) changed from (x) to (typeof(x)0).
591598
*
592599
* This is because LLVM has a bug where for lvalue (x), it does not get rid of

0 commit comments

Comments
 (0)