1

I am testing a ARM based embedded target running with customized embedded linux version 3.14.

Is there any way that I can find out which scheduling policy my linux is using at runtime?

I see some /proc/sys entries like these on target. But I am not sure whether it is CFS:

 sched_child_runs_first
 sched_domain/
 sched_latency_ns
 sched_migration_cost_ns
 sched_min_granularity_ns
 sched_nr_migrate
 sched_rr_timeslice_ms
 sched_rt_period_us
 sched_rt_runtime_us
 sched_shares_window_ns
 sched_time_avg_ms
 sched_tunable_scaling
 sched_wakeup_granularity_ns

Can anyone help?

  • Not sure about the answer, Hence commenting. but you can check the cpu scheduling policy for any runnnig application (or you can set it's policy before execution) by a command schedtool – SHW Aug 29 '16 at 8:04
  • @SHW : Thanks for the additional help. schedtool seems to be useful as well. – sunisiha Aug 29 '16 at 8:56
1

I assume you want to find out if your system is using the CFS CPU scheduler. The scheduling policy is the policy the CFS or some other scheduler uses. On my Ubuntu 16.04 box I have /proc/sched_debug. Maybe you can get a hint out of:

cat /proc/sched_debug

If your system is using the CFS scheduler the output should contain something like:

cfs_rq[CORE_NUMBER]: ...
  • Thanks for the help. I got the similar output when I checked the proc entry on my linux: cat /proc/sched_debug | grep -i cfs cfs_rq[0]: cfs_rq[1]: This seems ok, because there 2 cores runninng, also scheduling policy is CFS. Thanks again. – sunisiha Aug 29 '16 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.