how to check kernel is configured with preemption or not
Greg KH
greg at kroah.com
Mon Oct 24 00:38:09 EDT 2011
On Sun, Oct 23, 2011 at 11:20:03PM -0400, Greg Freemyer wrote:
> On Sun, Oct 23, 2011 at 1:34 PM, sri <bskmohan at gmail.com> wrote:
> > No, uname did not show anything.
> > Is there any way to get the kernel preemption mode, programatically?
> >
> > Thanks,
> > --Sri
> >
> > On Fri, Oct 21, 2011 at 6:41 PM, Daniel Baluta <daniel.baluta at gmail.com>
> > wrote:
> >>
> >> On Fri, Oct 21, 2011 at 2:28 PM, sri <bskmohan at gmail.com> wrote:
> >> > Hi,
> >> >
> >> > Am using kernel 2.6.18-195(centos 5.5).
> >> > My kernel configs have CONFIG_PREEMPT_NONE=7 and
> >> > "CONFIG_PREEMPT_VOLUNTERY
> >> > is not set".
> >> > How to check that preemption is really in place?
> >> > Is there any way to check my kernel is configured with what preemption
> >> > levels?
> >>
> >> Hmm, uname -a?
> I'm sure its in /sys somewhere.
I do not think so.
> Remember /sys is part of the official ABI.
As documented in Documentation/ABI/, so perhaps you can read there.
> Also, you see what your config look like for sure by looking at
> /proc/config.gz (that file is virtual, but shows the contents of how
> your config file was at compile time for the running kernel.
Not all distros enable this :(
I think the question needs to really be stated, why, from userspace,
does it matter if preempt is enabled or not? This should never be
something that userspace cares about at all.
greg k-h
More information about the Kernelnewbies
mailing list