Re: Networking & atomic allocations in kernel [patch] -- helps!

Eugene Crosser (crosser@average.org)
26 Oct 1997 09:41:47 GMT


[I am sending this again as it was first sent right when there where
the problems with the mailing list. Sorry if you got it twice...]

A while ago, I posted two messages on this list, describing my system
randomly freezing, so that only SysRq-K recovers it. My investigation
revealed that when `frozen', the system spends all the time in
unsuccessful attempts to allocate TCP buffers, and while it cycles
there, no other processes are dispatched.

Now, a few days ago, a patch has been posted on the list:

In article <87u3e88tkj.fsf@atlas.infra.carnet.hr>,
Zlatko Calusic <Zlatko.Calusic@CARNet.hr> writes:

> Kswapd should check if memory is badly fragmented, and if there is not
> enough free pages in free_area lists of order >= 2, it should swap out
> pages until it frees few chunks. Under some circumstances (with
> 100Mb/s ethernet, few TCP connections) it was easy to have 6MB or even
> more of free memory, with not one 16kB contiguous free area in
> memory!!! Since kswapd has a tough job with this fragmentation,
> occasionaly I still get "Insufficient memory..." messages, but now my
> system doesn't lock any more. And networking is faster! In the patch
> I'm using 'min_free_pages / 2' as a minimal number of pages I want to
> have in at least 16kb (4 pages) chunks. I got to this after thorough
> testing and experimenting , and it seems like it's a good idea. Patch
> is well tested and should not make you any trouble.

I found the symptoms described in that posting very similar to mine
(although not exactly same), and immediately tried the patch. And it
seems to help! At least I had my system running for almost three days,
which was impossible before the fix. Oh, there are a few other
troubles, but they are tolerable as they do not cause system lockup.

It would be great if this patch or some other, of the same effect, is
included in the mainstream source base.

-- 
Eugene Crosser; 2:5020/230@fidonet; http://www.average.org/~crosser/