rpms/kernel/F-13 drm-i915-add-reclaimable-to-page-allocations.patch, NONE, 1.1 kernel.spec, 1.2102, 1.2103

Chuck Ebbert cebbert at fedoraproject.org
Mon Jul 19 13:07:38 UTC 2010


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv527

Modified Files:
	kernel.spec 
Added Files:
	drm-i915-add-reclaimable-to-page-allocations.patch 
Log Message:
drm-i915-add-reclaimable-to-page-allocations.patch:
  Additional fix for hibernation memory corruption bugs.

drm-i915-add-reclaimable-to-page-allocations.patch:
 i915_gem.c |    1 +
 1 file changed, 1 insertion(+)

--- NEW FILE drm-i915-add-reclaimable-to-page-allocations.patch ---
From: Linus Torvalds <torvalds at linux-foundation.org>
Date: Sun, 18 Jul 2010 16:44:37 +0000 (-0700)
Subject: drm/i915: add 'reclaimable' to i915 self-reclaimable page allocations
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=cd9f040df6ce46573760a507cb88192d05d27d86

drm/i915: add 'reclaimable' to i915 self-reclaimable page allocations

The hibernate issues that got fixed in commit 985b823b9192 ("drm/i915:
fix hibernation since i915 self-reclaim fixes") turn out to have been
incomplete.  Vefa Bicakci tested lots of hibernate cycles, and without
the __GFP_RECLAIMABLE flag the system eventually fails to resume.

With the flag added, Vefa can apparently hibernate forever (or until he
gets bored running his automated scripts, whichever comes first).

The reclaimable flag was there originally, and was one of the flags that
were dropped (unintentionally) by commit 4bdadb978569 ("drm/i915:
Selectively enable self-reclaim") that introduced all these problems,
but I didn't want to just blindly add back all the flags in commit
985b823b9192, and it looked like __GFP_RECLAIM wasn't necessary.  It
clearly was.

I still suspect that there is some subtle reason we're missing that
causes the problems, but __GFP_RECLAIMABLE is certainly not wrong to use
in this context, and is what the code historically used.  And we have no
idea what the causes the corruption without it.

Reported-and-tested-by: M. Vefa Bicakci <bicave at superonline.com>
Cc: Dave Airlie <airlied at gmail.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: KOSAKI Motohiro <kosaki.motohiro at jp.fujitsu.com>
Cc: Hugh Dickins <hugh.dickins at tiscali.co.uk>
Cc: stable at kernel.org
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 0743858..8757ecf 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2241,6 +2241,7 @@ i915_gem_object_get_pages(struct drm_gem_object *obj,
 		page = read_cache_page_gfp(mapping, i,
 					   GFP_HIGHUSER |
 					   __GFP_COLD |
+					   __GFP_RECLAIMABLE |
 					   gfpmask);
 		if (IS_ERR(page))
 			goto err_pages;


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-13/kernel.spec,v
retrieving revision 1.2102
retrieving revision 1.2103
diff -u -p -r1.2102 -r1.2103
--- kernel.spec	18 Jul 2010 15:04:28 -0000	1.2102
+++ kernel.spec	19 Jul 2010 13:07:38 -0000	1.2103
@@ -701,6 +701,7 @@ Patch1824: drm-intel-next.patch
 # make sure the lvds comes back on lid open
 Patch1825: drm-intel-make-lvds-work.patch
 Patch1830: drm-i915-fix-hibernate-memory-corruption.patch
+Patch1831: drm-i915-add-reclaimable-to-page-allocations.patch
 Patch1835: drm-i915-make-G4X-style-PLL-search-more-permissive.patch
 Patch1900: linux-2.6-intel-iommu-igfx.patch
 
@@ -1339,10 +1340,15 @@ ApplyPatch drm-encoder-disable.patch
 
 # Nouveau DRM + drm fixes
 ApplyPatch drm-nouveau-updates.patch
+
 ApplyPatch drm-intel-big-hammer.patch
 ApplyOptionalPatch drm-intel-next.patch
 ApplyPatch drm-intel-make-lvds-work.patch
+
+# hibernation memory corruption fixes
 ApplyPatch drm-i915-fix-hibernate-memory-corruption.patch
+ApplyPatch drm-i915-add-reclaimable-to-page-allocations.patch
+
 ApplyPatch linux-2.6-intel-iommu-igfx.patch
 
 # linux1394 git patches
@@ -2040,6 +2046,10 @@ fi
 
 
 %changelog
+* Mon Jul 19 2010 Chuck Ebbert <cebbert at redhat.com>  2.6.34.1-19
+- drm-i915-add-reclaimable-to-page-allocations.patch:
+  Additional fix for hibernation memory corruption bugs.
+
 * Sun Jul 18 2010 Chuck Ebbert <cebbert at redhat.com>  2.6.34.1-18
 - drm-i915-make-G4X-style-PLL-search-more-permissive.patch (#572799)
 



More information about the scm-commits mailing list