Re: [patch] my latest oom stuff

Kurt Garloff (garloff@kg1.ping.de)
Mon, 26 Oct 1998 23:26:57 +0100


On Mon, Oct 26, 1998 at 01:40:49PM +1100, Richard Gooch wrote:
> > unsigned long start = jiffies;
> >
> > do {
> > .. swapout ..
> > } while (jiffies == start);
> >
> > which essentially throttles kswapd to run at most one jiffy (and that in
> > turn pretty much guarantees that kswapd at MOST can ever run 50% of the
> > time, which is pretty close to the kind of guarantee we want).
>
> I don't understand how you get the 50% number. If the above snippet is
> in a function, the first time I call the function it runs for one
> jiffie. Next time I call it (a fraction of a jiffie later), it runs
> for almost one jiffie. Is there some other subtlety I'm missing?

current->state = TASK_INTERRUPTIBLE;
schedule();

Is this explaining the thing?

-- 
Kurt Garloff <K.Garloff@ping.de>  (Dortmund, FRG)
PGP key on http://student.physik.uni-dortmund.de/homepages/garloff
Unix IS user friendly - it's just selective about who its friends are!

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