Re: # CONFIG_PREEMPT is not set
james@total-carnage.org schrieb:
Is Realtime-lsm the same thing? I'm assuming no, as I have realtime-lsm on a 2.6.11 custom-built kernel for using a recording studio with...
No, there is a mixup of name meanings here.
Realtime priorities under Linux are priorities that are higher than that
of any other user process. Linux offers 99 levels of those. If a process
is elevated to such a high priority it will not have to compete for the
CPU with other, non-realtime processes, and is therefore mostly safe
from having to long pauses in playing back an audio file or recording one.
LSM are the Linux Security Modules. This is a framework for fine-grained
security models (beyond the user-or-root model). Because elevating a
process to a RT prio needs root or acquiring a "capability" to increase
a process' prio (only root usually can do that), there is this patch to
allow standard programs to elevate themselves without being run by root.
BTW: This is useful for playing and recording audio, e.g., but
introduces a security risk by allowing normal processes to hog the CPU
and starve the system from resources. But normally that's not a problem
for you, except you have an 0wn3d user account (got "hacked" by some
script kiddies) or have a very stupid application.
"Real" realtime support like introduced with the preempt patches is not
simply changing priorities. That stays the same. It enables you to
switch between processes faster if a more important process becomes
runnable. Usually all other processes must wait while one process
executes a system call like read() on a device or open() on a file or
whatever. With preempt the more important process only needs to wait if
the process is in a very critical section of the kernel code where it is
explicitly forbidden to be preempted. The preempt patch therefore lowers
the "average latency" (the time you have to wait for the most important
process to execute) and allows smoother multimedia.
Any questions left? Hope I didn't overwhelm you - it's a bit hard to
explain.
With kind regards,
Oliver Korpilla
Reply to: