lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <46DF3545.4050604@redhat.com>
Date:	Wed, 05 Sep 2007 19:01:25 -0400
From:	Rik van Riel <riel@...hat.com>
To:	Linux kernel Mailing List <linux-kernel@...r.kernel.org>
CC:	linux-mm@...ck.org, akpm@...ux-foundation.org,
	safari-kernel@...ari.iki.fi
Subject: [PATCH] prevent kswapd from freeing excessive amounts of lowmem

The current VM can get itself into trouble fairly easily on systems
with a small ZONE_HIGHMEM, which is common on i686 computers with
1GB of memory.

On one side, page_alloc() will allocate down to zone->pages_low,
while on the other side, kswapd() and balance_pgdat() will try
to free memory from every zone, until every zone has more free
pages than zone->pages_high.

Highmem can be filled up to zone->pages_low with page tables,
ramfs, vmalloc allocations and other unswappable things quite
easily and without many bad side effects, since we still have
a huge ZONE_NORMAL to do future allocations from.

However, as long as the number of free pages in the highmem
zone is below zone->pages_high, kswapd will continue swapping
things out from ZONE_NORMAL, too!

Sami Farin managed to get his system into a stage where kswapd
had freed about 700MB of low memory and was still "going strong".

The attached patch will make kswapd stop paging out data from
zones when there is more than enough memory free.  We do go above
zone->pages_high in order to keep pressure between zones equal
in normal circumstances, but the patch should prevent the kind
of excesses that made Sami's computer totally unusable.

Please merge this into -mm.

Signed-off-by: Rik van Riel <riel@...hat.com>

View attachment "linux-2.6-excessive-pageout.patch" of type "text/x-patch" (715 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ