# Preempted Kernel

## MaximeG

Hi,

I was wandering around, trying to find some kind of "howto" to have my gentoo using a preempted kernel.

When configuring my kernel I can see some "preempting" options. I've also read about patches to add to kernel to make it preempted.

Well, basically my question is : when can I name my kernel "preempted", what options / patches do I need to have one ?

Thanks,

Maxime

----------

## ttuegel

You can call your kernel "preempted" if either of the options "PREEMPT" or "PREEMPT_VOLUNTARY" is set in your config, and the option "PREEMPT_NONE" is not set.  Actually, you should only have one of these three set at a time.  You don't need any patches, these options have been in the mainline kernel for a long time.  If you "make menuconfig" you can find them under "Processor type and features ---> Preemption Model (___) --->" which will let you pick one of the three.  (It may be somewhere else if you're not on x86/amd64.)

----------

## MaximeG

Thanks !

But is it the only one option that matters ?

I've seen the latency of kernel might be changed as well, and some people are talking about "other preempting settings".

I know my questions aren't accurate and I apologize for that. But the trick is, if I knew what I'm looking for with accuracy, I'd probably able to find the answers by myself.

Thanks for your answers guys,

Maxime

----------

## i92guboj

If you can't be more specific, try to describe what you are trying to achieve, or what's the purpose you will be using the kernel for.

A preemptible kernel is just a regular kernel with preemption turned on. Maybe you are looking for one of the real-time patches that can be found around, however, as the kernel gets updated and the jacks sound infrastructure gets better, those are less and less important each day that passes by.

----------

## pappy_mcfae

Real time kernels are rather problematic. I have had very little luck with them. My 64 bit system won't even boot with the .25 fully preemptible kernel.

Using the stock preemption settings is more than enough for a modern system. I set my kernel for:

```
(*) Preemptible Kernel (Low-Latency Desktop)
```

This works well enough for me to record using ardour on two out of three machines.

Blessed be!

Pappy

----------

## Mad Merlin

I've used full preemption (and preemption before there was a distinction between full preemption and voluntary preemption) on all of my desktop/laptop systems (a mix of 32 and 64-bit) since 2.6 first came out, and I've never had a problem with it... Also, real time kernels are a different beast than kernels with preemption enabled. Real time kernels have to provide guarantees for how fast they can respond to events (usually quite quickly) at all times, kernels with preemption just tend to feel faster most of the time.

So... maybe you're just really unlucky, or perhaps your problem lies elsewhere.

----------

## pappy_mcfae

What problem? 

The only thing that demands full preemption is audio work, because of it's real time nature. But when one owns computers that are two years old, or less, there is no reason to use full preemption. My systems work just fine. Even if I untweaked my kernel, my Core2 will still work as a recording machine. This machine works just fine as well.

Blessed be!

Pappy

----------

## Mad Merlin

 *pappy_mcfae wrote:*   

> What problem?

 

This one:

 *pappy_mcfae wrote:*   

> Real time kernels are rather problematic. I have had very little luck with them. My 64 bit system won't even boot with the .25 fully preemptible kernel.

 

----------

## MaximeG

Hi,

Well, I've installed ET : QuakeWars (3D modern game) and during the installation, it recommanded to enable preemption, low-latency and "other preemptive options".

Well, I've been looking around for what might be these "other preemptive options"but couldn't find anything really accurate an answer and that's why I'm here  :Smile: 

Thanks,

Maxime

----------

## depontius

I have an Athlon64 machine, installed as x86, being used as a Myth machine with a bttv capture card.

That machine has been rather flakey with CONFIG_PREEMPT, and I've backed off to CONFIG_PREEMPT_VOLUNTARY with much more stable results.

----------

## NeddySeagoon

MaximeG,

go into make menuconfig, press / and type preempt.

That will show you all the preemption settings your kernel supports.

----------

