文件最后提交记录最后更新时间
6 个月前
6 个月前
6 个月前
1 个月前
6 个月前
6 个月前
README.md

XSched Service

XClient

XCLI is a command-line tool, it is provided to users to change the policy and give scheduling hints(e.g., priorities, deadlines) to the policy in XServer.

Usage

You can run it by ./output/bin/xcli in the root directory of XSched after compiling.

The parameters it accepts are as follows:

Usage Type Description Default
-a,--addr string XSched server ipv4 address. 127.0.0.1.
-p,--port int XSched server port. 50000.

The subcommands it supports are as follows:

Subcommand Description Usage Type Range
top Show the top information of the XQueues -f,--frequency float [0,30]
list List the information of the XQueues. - - -
config Change the configuration of the XQueues. -x,--xqueue uint64_t -
-l,--level int32_t [1,3]
-t,--threshold int64_t [1,65536]
-b,--batch-size int64_t [1,65536]
policy Query or set the scheduler policy of the XSched server. -q,--query - -
-s -n,--set --name string XSCHED_POLICY
hint Give a hint to the XSched server. -x,--xqueue uint64_t -
--pid pid_t -
-p,--priority int32_t [-255,255]
-u,--utilization int32_t [0,100]
-t,--timeslice int64_t [100,100000]

Examples

# Show the top information of the XQueues
./output/bin/xcli top -f 1
# List the information of the XQueues
./output/bin/xcli list
# Change the configuration of the XQueues
./output/bin/xcli config -x xqueue_handle -l 1 -t 16 -b 8
# Query the scheduler policy of the XSched server
./output/bin/xcli policy -q
# Set the scheduler policy of the XSched server
./output/bin/xcli policy -s -n HPF
# Give a hint to the XSched server
./output/bin/xcli hint -x xqueue_handle -p 10
./output/bin/xcli hint --pid pid -u 50
./output/bin/xcli hint -t 2000

XServer

XServer consists of following parts:

  • LocalScheduler(referring to sched::scheduler) to execute processing logic.
  • Two IPC channels to receive events from SchedAgent and send operations to it.
  • A http server to comminicate with XCLI.

XServer maintains a global mirror of each process's XQueue status (ready or idle, XPU device ID, process ID, etc.) and trigger the scheduling when receives events.

Run

You can run xserver by ./output/bin/xserver in the root directory of XSched after compiling.

The default policy is HPF, default port is 50000. You can change them by parameters:

# Run XServer with default policy and port
./output/bin/xserver
# Run XServer with PUP policy and port 50001
./output/bin/xserver PUP 50001