Skip to content

scx_p2dp: runtime error (SCX_DSQ_LOCAL[_ON] target CPU 23 not allowed for stress-ng-cpu-s[410085]) when exercising with stress-ng --cpu-sched 0 #2879

@ColinIanKing

Description

@ColinIanKing

Hitting an issue running 6.17 kernel on Debian 13 (trixie) with latest scx_p2dp scheduler on a 24 thread Intel(R) Core(TM) Ultra 9 285K with the following:

git clone https://github.com/colinianking/stress-ng
cd stress-ng
make -j $(nproc)

then run:

./stress-ng --cpu-sched 0 -t 60

and we get:

 sudo ./target/release/scx_p2dq
14:51:39 [INFO] Running scx_p2dq (build ID: 1.0.22-g894c0015 x86_64-unknown-linux-gnu)
14:51:39 [INFO] DSQ[0] slice_ns 100000
14:51:39 [INFO] DSQ[1] slice_ns 3200000
14:51:39 [INFO] DSQ[2] slice_ns 6400000
14:51:39 [WARN] libbpf: map 'p2dq': BPF map skeleton link is uninitialized
14:51:39 [INFO] P2DQ scheduler started! Run `scx_p2dq --monitor` for metrics.
DEBUG DUMP
================================================================================
migration/0[18] triggered exit kind 1024:
  runtime error (SCX_DSQ_LOCAL[_ON] target CPU 23 not allowed for stress-ng-cpu-s[410085])
Backtrace:
  scx_exit+0x58/0x80
  task_can_run_on_remote_rq+0xcc/0x190
  dispatch_to_local_dsq+0x75/0x2e0
  process_ddsp_deferred_locals+0x9c/0x130
  deferred_irq_workfn+0x33/0x60
  irq_work_single+0x34/0x90
  irq_work_run_list+0x4c/0x70
  irq_work_run+0x20/0x50
  __sysvec_irq_work+0x4c/0x220
  sysvec_irq_work+0xa0/0xd0
  asm_sysvec_irq_work+0x1a/0x20
  finish_task_switch.isra.0+0x126/0x4d0
  __schedule+0x84c/0x1770
  schedule+0x37/0x120
  smpboot_thread_fn+0x33c/0x490
  kthread+0x1a4/0x3e0
  ret_from_fork+0x2b8/0x3a0
  ret_from_fork_asm+0x1a/0x30
CPU states
----------
CPU 0   : nr_run=6 flags=0x1 cpu_rel=1 ops_qseq=470708 pnt_seq=285208
          curr=migration/0[18] class=rt_sched_class
  R stress-ng-cpu-s[410087] +0ms
      scx_state/flags=3/0x9 dsq_flags=0x1 ops_state/qseq=0/0
      sticky/holding_cpu=-1/-1 dsq_id=0x800
      dsq_vtime=6664809417 slice=100000 weight=1
      cpus=000001
    asm_sysvec_reschedule_ipi+0x1a/0x20
  R stress-ng-cpu-s[410091] +0ms
      scx_state/flags=3/0x9 dsq_flags=0x1 ops_state/qseq=0/0
      sticky/holding_cpu=-1/-1 dsq_id=0x800
      dsq_vtime=6664981874 slice=100000 weight=1
      cpus=000001
    x64_sys_call+0x1b7d/0x41b0
    do_syscall_64+0xcf/0x5c0
    entry_SYSCALL_64_after_hwframe+0x71/0x79
  R stress-ng-cpu-s[410093] +0ms
      scx_state/flags=3/0x9 dsq_flags=0x1 ops_state/qseq=0/0
      sticky/holding_cpu=-1/-1 dsq_id=0x800
      dsq_vtime=6664948323 slice=100000 weight=1
      cpus=000001
    common_nsleep+0x3f/0x60
    __x64_sys_clock_nanosleep+0xec/0x180
    x64_sys_call+0x38af/0x41b0
    do_syscall_64+0xcf/0x5c0
    entry_SYSCALL_64_after_hwframe+0x71/0x79
  R stress-ng-cpu-s[410095] +0ms
      scx_state/flags=3/0x9 dsq_flags=0x1 ops_state/qseq=0/0
      sticky/holding_cpu=-1/-1 dsq_id=0x800
      dsq_vtime=6665464674 slice=100000 weight=1
      cpus=000001
    do_syscall_64+0x4d7/0x5c0
    entry_SYSCALL_64_after_hwframe+0x71/0x79
  R stress-ng-cpu-s[410089] +0ms
      scx_state/flags=3/0x9 dsq_flags=0x1 ops_state/qseq=0/0
      sticky/holding_cpu=-1/-1 dsq_id=0x800
      dsq_vtime=6664948323 slice=100000 weight=1
      cpus=000001
    x64_sys_call+0x1b7d/0x41b0
    do_syscall_64+0xcf/0x5c0
    entry_SYSCALL_64_after_hwframe+0x71/0x79
  R stress-ng-cpu-s[410085] +0ms
      scx_state/flags=3/0x1 dsq_flags=0x0 ops_state/qseq=0/0
      sticky/holding_cpu=-1/-1 dsq_id=0x8000000000000001
      dsq_vtime=6665159525 slice=100000 weight=1
      cpus=000001
    __set_cpus_allowed_ptr_locked+0x205/0x2d0
    __set_cpus_allowed_ptr+0x78/0x100
    __sched_setaffinity+0x14c/0x360
    sched_setaffinity+0x28d/0x360
    __x64_sys_sched_setaffinity+0xd3/0x100
    x64_sys_call+0x2737/0x41b0
    do_syscall_64+0xcf/0x5c0
    entry_SYSCALL_64_after_hwframe+0x71/0x79
CPU 8   : nr_run=1 flags=0x9 cpu_rel=0 ops_qseq=334200 pnt_seq=367711
          curr=stress-ng-cpu-s[410083] class=ext_sched_class
 *R stress-ng-cpu-s[410083] +0ms
      scx_state/flags=3/0xd dsq_flags=0x0 ops_state/qseq=0/0
      sticky/holding_cpu=-1/-1 dsq_id=(n/a)
      dsq_vtime=6656082848 slice=20000000 weight=100
      cpus=000100
Event counters
--------------
              SCX_EV_SELECT_CPU_FALLBACK:                0
       SCX_EV_DISPATCH_LOCAL_DSQ_OFFLINE:                0
               SCX_EV_DISPATCH_KEEP_LAST:             5468
                 SCX_EV_ENQ_SKIP_EXITING:                0
      SCX_EV_ENQ_SKIP_MIGRATION_DISABLED:                1
                 SCX_EV_REFILL_SLICE_DFL:             5465
                  SCX_EV_BYPASS_DURATION:         51431080
                  SCX_EV_BYPASS_DISPATCH:                0
                  SCX_EV_BYPASS_ACTIVATE:                1
================================================================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions