All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Darren Hart <dvhltc@us.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>, "lkml," <linux-kernel@vger.kernel.org>
Subject: Re: Dynamically determine if kernel includes CFS Scheduler
Date: Fri, 06 Mar 2009 22:01:06 +0100	[thread overview]
Message-ID: <1236373266.6326.804.camel@laptop> (raw)
In-Reply-To: <49B18B2E.606@us.ibm.com>

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.


  reply	other threads:[~2009-03-06 21:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-06 20:44 Dynamically determine if kernel includes CFS Scheduler Darren Hart
2009-03-06 21:01 ` Peter Zijlstra [this message]
2009-03-06 22:53 ` Sitsofe Wheeler
2009-03-06 23:01   ` Darren Hart
2009-03-06 23:08     ` Sitsofe Wheeler
2009-03-07  0:17       ` Darren Hart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1236373266.6326.804.camel@laptop \
    --to=peterz@infradead.org \
    --cc=dvhltc@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.