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

(really closes: #534422, we hope)

svn path=/dists/sid/linux-2.6/; revision=15994
This commit is contained in:
Ben Hutchings 2010-07-18 20:46:53 +00:00
parent 2f4dbd6221
commit a8bf6028b5
3 changed files with 55 additions and 0 deletions

2
debian/changelog vendored
View File

@ -11,6 +11,8 @@ linux-2.6 (2.6.32-18) UNRELEASED; urgency=low
* rt3090sta: Replace with rt2860sta (Closes: #588863)
* [i386/686] Remove AMD K6 from the list of supported processors; it
does not implement the CMOV instruction
* drm/i915: Add 'reclaimable' to i915 self-reclaimable page allocations
(really closes: #534422, we hope)
[ Martin Michlmayr ]
* Add some patches from the Orion tree, including support for Marvell's

View File

@ -0,0 +1,52 @@
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sun, 18 Jul 2010 09:44:37 -0700
Subject: [PATCH] drm/i915: add 'reclaimable' to i915 self-reclaimable page allocations
commit cd9f040df6ce46573760a507cb88192d05d27d86 upstream.
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@superonline.com>
Cc: Dave Airlie <airlied@gmail.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
drivers/gpu/drm/i915/i915_gem.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
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;
--
1.7.1

View File

@ -61,3 +61,4 @@ X features/all/rt28x0/remove-rt3090-driver.commands
+ features/all/rt28x0/0040-Staging-rt-2860-2870-sta-Use-request_firmware-to-loa.patch
+ features/all/rt28x0/0041-Staging-rt2860-correct-onstack-wait_queue_head-decla.patch
+ features/all/rt28x0/0042-Staging-rt2860-add-Belkin-F5D8055-Wireless-N-USB-Don.patch
+ bugfix/x86/drm-i915-add-reclaimable-to-i915-self-reclaimable-pa.patch