Re: fork: out of memory

Jan Echternach (jec@DInet.de)
Sun, 30 Nov 1997 10:09:20 +0100


On 29 November 1997, Rogier Wolff <R.E.Wolff@BitWizard.nl> wrote:
> Keep in mind that a 60k memcpy will take about 1ms. (My Pentium Pro
> has a 80Mb/sec memory bandwidth). A "normally working" 115k2
> non-buffered serial line will have recieved 10 chars in that time. With
> a recieve interrupt threshold of 8 chars even a buffered 16550 will
> get an overrun..... Not good.

Hmm. Then either limit the chunk size that may be allocated with
GFP_ATOMIC (there shouldn't be any large allocations in an interrupt
handler), or look for a place where only a few pages have to be moved.
I think it's best to either don't do any memcpy for GFP_ATOMIC, or to
require that GFP_ATOMIC allocations are small.

The problems that I had so far were always with large buffers allocated
at device initialisation or open. It shouldn't matter what happens with
GFP_ATOMIC allocations. This means that a (more simple?) swap out of
pages is enough, no need for memcpy trickery.

-- 
Jan Echternach

Delta Internet http://www.DInet.de/ Tel. +49 2932 91 6 161 Zeit UmZuDenken! Fax. +49 2932 91 6 230