rpms/kernel/FC-4 linux-2.6-vm-clear-unreclaimable.patch, NONE, 1.1 kernel-2.6.spec, 1.1532, 1.1533

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Sat Dec 10 06:51:28 UTC 2005


Author: davej

Update of /cvs/dist/rpms/kernel/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv20011

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-vm-clear-unreclaimable.patch 
Log Message:
fix some possible oom kill problems.


linux-2.6-vm-clear-unreclaimable.patch:
 filemap.c    |    7 +++++++
 page_alloc.c |    6 ++++++
 2 files changed, 13 insertions(+)

--- NEW FILE linux-2.6-vm-clear-unreclaimable.patch ---
--- linux-2.6.14/mm/filemap.c~	2005-12-10 01:47:15.000000000 -0500
+++ linux-2.6.14/mm/filemap.c	2005-12-10 01:47:46.000000000 -0500
@@ -471,11 +471,18 @@ EXPORT_SYMBOL(unlock_page);
  */
 void end_page_writeback(struct page *page)
 {
+	struct zone *zone = page_zone(page);
 	if (!TestClearPageReclaim(page) || rotate_reclaimable_page(page)) {
 		if (!test_clear_page_writeback(page))
 			BUG();
 	}
 	smp_mb__after_clear_bit();
+	if (zone->all_unreclaimable) {
+		spin_lock(&zone->lock);
+		zone->all_unreclaimable = 0;
+		zone->pages_scanned = 0;
+		spin_unlock(&zone->lock);
+	}
 	wake_up_page(page, PG_writeback);
 }
 EXPORT_SYMBOL(end_page_writeback);
--- linux-2.6.14/mm/page_alloc.c~	2005-12-10 01:47:51.000000000 -0500
+++ linux-2.6.14/mm/page_alloc.c	2005-12-10 01:48:25.000000000 -0500
@@ -657,6 +657,12 @@ static void fastcall free_hot_cold_page(
 	pcp->count++;
 	if (pcp->count >= pcp->high)
 		pcp->count -= free_pages_bulk(zone, pcp->batch, &pcp->list, 0);
+	else if (zone->all_unreclaimable) {
+		spin_lock(&zone->lock);
+		zone->all_unreclaimable = 0;
+		zone->pages_scanned = 0;
+		spin_unlock(&zone->lock);
+	}
 	local_irq_restore(flags);
 	put_cpu();
 }


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/kernel-2.6.spec,v
retrieving revision 1.1532
retrieving revision 1.1533
diff -u -r1.1532 -r1.1533
--- kernel-2.6.spec	10 Dec 2005 06:03:23 -0000	1.1532
+++ kernel-2.6.spec	10 Dec 2005 06:51:26 -0000	1.1533
@@ -371,6 +371,7 @@
 Patch2000: linux-2.6-vm-oomkiller-debugging.patch
 Patch2001: linux-2.6-vm-silence-atomic-alloc-failures.patch
 Patch2002: linux-2.6-vm-invalidate_inode_pages2-DoS.patch
+Patch2003: linux-2.6-vm-clear-unreclaimable.patch
 
 
 #
@@ -835,6 +836,8 @@
 %patch2001 -p1
 # Fix 32bit integer overflow in invalidate_inode_pages2()
 %patch2002 -p1
+# prevent OOM kills and page allocation failures under load.
+%patch2003 -p1
 
 #
 # Patches 5000 to 6000 are reserved for new drivers that are about to
@@ -1280,6 +1283,7 @@
 
 %changelog
 * Sat Dec 10 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1649_FC4]
+- Fix some possible problems with unnecessary OOM kills.
 - Fix compile error in parport_pc when debugging on. (#175340)
 - Disable voluntary preemption temporarily to diagnose some
   strange bugs.




More information about the fedora-cvs-commits mailing list