[CODE RFC] redefining sched_setscheduler using LD_PRELOAD

From: Roger Larsson (roger.larsson_at_norran.net)
Date: 11/14/03

  • Next message: Daniel Gryniewicz: "Re: [RFCI] How best to partition MD/raid devices in 2.6"
    To: linux-audio-dev@music.columbia.edu
    Date:	Fri, 14 Nov 2003 06:15:06 +0100
    
    
    

    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
    
    

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/



  • Next message: Daniel Gryniewicz: "Re: [RFCI] How best to partition MD/raid devices in 2.6"

    Relevant Pages

    • Re: [PATCH]
      ... the polymonials used are not even primitive, the ability for root to wipe-out ... the random pool, the ability for root to access the random seed directly, the ... all of these, uses crypto-api, uses known crypto primitives, is simpler to ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] [3/48] Suspend2 2.1.9.8 for 2.6.12: 301-proc-acpi-sleep-activate-hook.patch
      ... When the user has an initrd or initramfs, ... image, encryption keys and so on have been set up, but the root fs has ... probably will result in hard disk corruption if they echo to do_resume ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: via-rhine apparently broken in 2.4.23-pre4
      ... > VIA Rhine II chip. ... root:~# uname -a ... Now, booting back to 2.6.0-test5;) ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: unsafe printk
      ... So one day root is using grep on ... Sanitizing kernel messages would be good start, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: CD burn buffer underruns on 2.6
      ... Some time ago I compiled cdrdao 1.1.7 with support for this (iirc I ... strange people:) especially don't run them as root. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)