lkml.org 
[lkml]   [2003]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[CODE RFC] redefining sched_setscheduler using LD_PRELOAD
Date
Hi,

(Jack O'Quin got me thinking about rt_monitor again - thanks!)

This is an alternative to capabilities / SCHED_SOFTRR...

I use my old rt_monitor
* protects the system on RT overload
* performs the actual setting of scheduler type
* it does not even have to be visible for lusers!

My old testprogram RT has been converted to
a library fit for preloading.

It works like this.

As root start
# rt_monitor

As normal user start latencytest
$ ./rts path/to/latencytest none 2 128 10

rts has two options
-i do not raise the priority.
-v be more verbose.
* It does also limit the effective min/max range.

Do also try (don't try this as root unless rt_monitor is running)
$ ./rts path/to/latencytest none 2 1024 99
* In this case rt_monitor captures the process and renices it.
(SCHED_OTHER + nice)

BUGS:
* better build and installation system
* could ignore RT processes already running when rt_monitor starts
* rt_monitor functionallity has not been reverified...
* it can't lock memory :-( No PIDs in calls.
* code that checks uid before using the redefined functions won't work
(I have an modified latencytest)
* client get stuck if there is no monitor running.

/RogerL

--
Roger Larsson
Skellefteå
Sweden




[unhandled content-type:application/x-zip]
\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.310 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site