lkml.org 
[lkml]   [2009]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectDynamically determine if kernel includes CFS Scheduler
I've received an internal request for a means to determine at run-time 
if the CFS scheduler is included in the running kernel. Looking through
the git commit log and the /proc/sys/kernel filesystem, I think I see
two approaches:

1) stat("/proc/sys/kernel/sched_compat_yield")
This confirms 2.6.23-rc7 kernel or later which definitely has the CFS
scheduler and this functionality is of interest anyway.
2) Test if the kernel version is >= 2.6.22 which is where I believe CFS
landed.

Any guesses as to how robust/future-proof approach #1 would be?

--
Darren Hart
IBM Linux Technology Center
Real-Time Linux Team


\
 
 \ /
  Last update: 2009-03-06 21:47    [W:0.243 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site