Re: [SHED] Questions.

From: Ian Kumlien (pomac_at_vapor.com)
Date: 08/31/03

  • Next message: Robert Love: "Re: [SHED] Questions."
    To: Robert Love <rml@tech9.net>
    Date:	Sun, 31 Aug 2003 21:31:25 +0200
    
    
    

    On Sun, 2003-08-31 at 20:53, Robert Love wrote:
    > On Sun, 2003-08-31 at 06:07, Ian Kumlien wrote:
    >
    > > Why not use small quantum values for high pri processes and long for low
    > > pri since the high pri processes will preempt the low pri processes
    > > anyways. And for a server working under load with only a few processes
    > > (assuming they are all low pri) would lessen the context switches.
    >
    > The rationale behind giving high priority processes a large timeslice is
    > two-fold:
    >
    > (1) if they are interactive, then they won't actually use it all (this
    > is the point you are making). But,
    >
    > (2) Having a large timeslice ensures that they have a high probability
    > of having available timeslice when they _do_ need it.

    Since they would have a high pri still, and preempt is there... it
    should be back on the cpu pretty quick.

    > So, yes, interactive processes can get by with a small timeslice,
    > because that is by-definition all they need. But they do need to run
    > often (i.e., as I think you have mentioned in your last email,
    > interactive processes are "run often for short periods"), so the large
    > timeslice ensures that they are never expired.

    But, it also creates problems for when a interactive process becomes a
    cpu hog. Like this the detection should be faster, but should be slowed
    down somewhat.

    > A counterargument might be that the large timeslice is a detriment to
    > other high priority processes. But the thinking is that, by definition,
    > interactive processes won't use all of the timeslice. And thus will not
    > hog the CPU. If they do, the interactivity estimator will quickly bring
    > them down.

    But, hogs would instead cause a context switch hell and lessen the
    throughput on server loads...

    > That is the rationale in the current scheduler, anyhow. Nick's current
    > work is interesting, and a bit different.

    Yes, saner imho =)

    > > And a system with "interactive load" as well would, as i said, preempt
    > > the lower pris. But this could also cause a problem... Imho there should
    > > be a "min quantum value" so that processes can't preempt a process that
    > > was just scheduled (i dunno if this is implemented already though).
    >
    > I don't think this is a good idea. I see your intention, but we have
    > priorities for a reason.

    I don't see how priorities would be questioned... Since, all i say is
    that a task that gets preempted should have a guaranteed time on the cpu
    so that we don't waste cycles doing context switches all the time.

    I can see that Ingos current scheduler is good from a desktop
    standpoint, but having it that way is not warranted when preempt comes
    in to the picture (if i correctly understand it's workings)...
    With preempt i actually see no reason for the priority inversion.. And
    to answer someone who mailed about this before: "Yes, it does seem to be
    slower than my Amigas, esp the ones that use Executive...".
    (That feedback scheduler rocks =))

    -- 
    Ian Kumlien <pomac@vapor.com>
    
    

    -
    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: Robert Love: "Re: [SHED] Questions."