Re: how to check kernel is configured with preemption or not

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In your linux kernel code base say "make menuconfig"

goto "processor types and feature" in that you will find "preemption
model" option.
If you go to that option, you will find 3 traditional preemption
models, but if you have
preempt-rt patch is applied, then preempt-rt option will be given.
>From that you can know
whether your code base was applied with rt patch. And if it is
selected then, your bzImage is
rt linux.

If you want to test in real time, because you only have image, then
you can write normal
linux user space program using posix threads. From that you can
confirm whether it is
rt linux.

But you must get information whether this is rt linux by "uname -a",
it shows rt in the display of patch.

Thanks,
Sri.


On Mon, Oct 24, 2011 at 12:38 AM, Greg KH <greg@xxxxxxxxx> wrote:
> On Sun, Oct 23, 2011 at 11:20:03PM -0400, Greg Freemyer wrote:
>> On Sun, Oct 23, 2011 at 1:34 PM, sri <bskmohan@xxxxxxxxx> 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@xxxxxxxxx>
>> > wrote:
>> >>
>> >> On Fri, Oct 21, 2011 at 2:28 PM, sri <bskmohan@xxxxxxxxx> 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
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@xxxxxxxxxxxxxxxxx
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
Regards,
Sri.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux