[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1236373266.6326.804.camel@laptop>
Date: Fri, 06 Mar 2009 22:01:06 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Darren Hart <dvhltc@...ibm.com>
Cc: Ingo Molnar <mingo@...e.hu>, "lkml," <linux-kernel@...r.kernel.org>
Subject: Re: Dynamically determine if kernel includes CFS Scheduler
On Fri, 2009-03-06 at 12:44 -0800, Darren Hart wrote:
> 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?
The question is why? Relying on scheduler specifics outside of whatever
POSIX mandates is an application bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists