Re: memory management and the status of

Hans Eric (hes@xinit.se)
Mon, 07 Sep 1998 16:16:36 +0200


Andrea Arcangeli wrote:

> On Mon, 7 Sep 1998, Chris Wedgwood wrote:
>
> >> want to waste cpu and disk io that could have been used better. So
> >> an idle linux box will then have a lots of non dirty pages that can
> >> be used immidiately without any disk io for swapping if the need
> >> for lots of memory suddenly comes up.
> >
> >Yes... and since many machines spend lots of time idle and many
>
> Sometimes I read on the list of proposal of things to do in the idle
> process. I think that the idle process _has_ to do _nothing_ per
> definition. If you use the idle process to do things you' ll find your
> machine to mess running a rc5 client in background all the time. If you
> need to do something of low priority run a kernel daemon reniced with low
> priority.

Well, I agree and don't think anyone really said that. But you brought the
attention to one thing. The update (bdflush) kernel deamon is probably the
right place to do t his. It already knows when there is nothing to write to
disk and if there is nothing in the run queue it can do the scan after non
modified dirty pages and write them out to swap. It should of course be
prepared to yield as soon as anything pops up in the run queue.

Im not the guru so I really should'nt speculate in how to implement things.
The goal here is to reduce the number of dirty pages in memory by writing them
to disk and marking them clean. Not to mess to much with the basic
swapping/paging algorithms. The kernel would then be in a better position to
deal with sudden demand for memory since freeing up clean pages does not
involve writing anything to disk, thats already been done.

Hans Eric

-
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/faq.html