Help on tuning the Linux kernel for soft real-time requirements

Eugene Surovegin ebs at
Tue Oct 19 08:00:55 EST 2004

On Mon, Oct 18, 2004 at 04:30:54PM -0500, Zajac Adam-AAZ004 wrote:
> I'm seeking any help on tuning the Linux kernel running in an embedded
> environment to meet some of the soft real-time requirements that we have for
> our platform.
> Our custom board is based on PPC MPC8540 processor and it runs kernel 2.4.20
> with the low-latency patch and kernel preemption enabled. The applications
> running on that board keep experiencing a "task starvation" scenario, which
> leads to missing soft real-time deadline requirements.
> We've tried to prioritize the applications that needed to meet these soft
> real-time deadlines above other "background" tasks performing unarchiving
> operations (gzip + tar) through the means of adjusting dynamic as well as
> static priorities. Dynamic priorities were assigned through "nice()"
> function and static priorities were assigned for the round robin policy of
> the scheduler through "sched_setscheduler()". We've pretty much exhausted
> all combinations of the priority assignments without finding the right
> configuration that would satisfy both soft real-time deadlines and overall
> system performance requirements.
> Soft real-time deadlines are being missed during unarchiving procedures. 
> Any hints and ideas would be greatly appreciated. 

Could you elaborate a little on what those soft-realtime requirements 
are? Are they sub-millisecond, milliseconds ...?

FWIW, I use 2.4.21 kernel + preempt patch (MV one, _NOT_ from rml 
patches), low-lat, O(1) scheduler and HZ = 1000.

Thread with real-time priority (any, all other threads run with 
SCHED_OTHER) and FIFO scheduler doing 10ms sleep runs pretty robust on 
440 hardware. During worst case scenario - heavy disk (SCSI) 
activity, I'm seeing rare sleeps up to 18-20ms.


More information about the Linuxppc-embedded mailing list