page->pte_head, Was:[URGENT ASSISTANCE REQUESTED] production machines dying

Dr. Werner Fink (werner@suse.de)
Tue, 25 Nov 1997 13:38:21 +0100


> > > Linux has some problems with memory fragmentation, and using
> > > the CONFIG_IP_ALWAYS_DEFRAG option might get the kernel
> > > hanging in some network-memory-allocation loop...
> >
> > No. Its an atomic allocation. It'll fail. Always defrag is however
> > an unusual option
>
> Linux 2.1.[456]x have been known to hang when the slab
> system tries to allocate an 8kb piece of memory when
> the memory is so badly fragmented that there are only
> 1-page pieces available...
>
> With Zlatko's patch integrated in my patch the fragmentation
> is combatted, instead it now leads to swapping frenzy :(
> Better than crashing, but still bad... We need a general
> memory defragmenter, but for that we'll need a way to find
> the pte of a physical page... Some kind of phys_to_virt without
> knowing the PID ??

One way would be to add a link to the page table entry in the page struct.
Only remaining problem: the link have to be uptodate.

A few mounths ago in summer Ben (Benjamin C R LaHaise) has written a working
estimate for an other reason (anonymous aging of physical task pages).

... combining the two approaches (defragmentation and preemptive anonymous
page ageing) would be a win.

Werner