Re: [RFC][PATCH] O(1) Entitlement Based Scheduler

From: John Lee (johnl_at_aurema.com)
Date: 02/26/04

  • Next message: Patrick Richard: "Re: e1000 only works in 2.6.3 with UP kernel ?"
    Date:	Thu, 26 Feb 2004 14:14:34 +1100 (EST)
    To: Pavel Machek <pavel@ucw.cz>
    
    

    On Wed, 25 Feb 2004, Pavel Machek wrote:

    > > Usage rate caps are expressed as rational numbers (e.g. "1 / 2") and hard caps
    > > are signified by a "!" suffix. The rational number indicates the proportion
    > > of a single CPU's capacity that the task may use. The value of the number must
    > > be in the range 0.0 to 1.0 inclusive for soft caps. For hard caps there is an
    > > additional restriction that a value of 0.0 is not permitted. Tasks with a
    > > soft cap of 0.0 become true background tasks and only get to run when no other
    > > tasks are active.
    >
    > Why not use something like percent, parts per milion or whatever?

    Fair comment. Fine granularity with percentages would require decimal
    points and a function in the kernel to parse that value - maybe I could
    get around to doing that. But I suppose ppm could certainly be used. We
    just chose rational numbers to start with.

    > > When hard capped tasks exceed their cap they are removed from the run queues
    > > and placed in a "sinbin" for a short while until their usage rate decays to
    > > within limits.
    >
    > How do you solve this one?

    The task is removed from the runqueue and a timer is scheduled to put it
    back onto the runqueue. The delay period is the required amount of time
    for that task's usage to decay to below its cap.

    > I want to kill your system.
    >
    > I launch task A, "semaphore grabber", that does filesystem
    > operations. Those need semaphores. I run it as "true background".
    >
    > I wait for A to grab some lock, then I run B, which is while(1);
    >
    > A holds lock that can not be unlocked, and your system is dead.
    >
    > This may happen randomly, even without me on your system.

    Good point. We'll have to rethink background priorities.

    John

    -
    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: Patrick Richard: "Re: e1000 only works in 2.6.3 with UP kernel ?"

    Relevant Pages

    • [patch 1/2] sched: reduce locking in newidle balancing
      ... This will reduce frequency of expensive remote runqueue lock aquisitions ... Send instant messages to your online friends http://au.messenger.yahoo.com ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: about runqueues locking
      ... runqueue locking is done in ascending order when you want to lock multiple ... i.e. you have to lock cpu_rqbefore cpu_rq. ... unconditionally enables interrupts, something you may not always want to ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] fix wait_task_inactive race (was Re: Race condition in ptrace)
      ... The problem is that the runqueue ... dependent_sleeper dropping the runqueue lock. ... locking in schedule(), so I thought formalising it would be better. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] fix wait_task_inactive race (was Re: Race condition in ptrace)
      ... The problem is that the runqueue ... unrobustness of non-atomic scheduling on some architectures ... ... runqueue lock might notice this - and wait_task_inactivehas to take ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [PATCH] NULL pointer deref in tcp_do_twkill_work()
      ... Shouldn't the loop always restart from the beginning instead of using the ... The alternative is to not drop the lock, but I'm guessing we need to do ... Proposed patch is attached. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)