un-rebase drm-intel-big-hammer & make-lvds-work, update would_have_oomkilled

This commit is contained in:
Kyle McMartin 2010-11-29 21:07:53 -05:00
parent ed1195f0f7
commit 311bf8c0a9
5 changed files with 57 additions and 24477 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,16 @@
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 6da2c6d..f508b86 100644 index 37427e4..08af9db 100644
--- a/drivers/gpu/drm/i915/i915_gem.c --- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3738,6 +3738,11 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, @@ -2553,6 +2553,11 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
if (ret)
goto pre_mutex_err; mutex_lock(&dev->struct_mutex);
+ /* We don't get the flushing right for these chipsets, use the + /* We don't get the flushing right for these chipsets, use the
+ * big hammer for now to avoid random crashiness. */ + * big hamer for now to avoid random crashiness. */
+ if (IS_I85X(dev) || IS_I865G(dev)) + if (IS_I85X(dev) || IS_I865G(dev))
+ wbinvd(); + wbinvd();
+ +
if (dev_priv->mm.suspended) { i915_verify_inactive(dev, __FILE__, __LINE__);
mutex_unlock(&dev->struct_mutex);
ret = -EBUSY; if (dev_priv->mm.wedged) {

View File

@ -1,20 +1,19 @@
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c diff -up linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c.orig linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c
index 0cece04..63bbb4b 100644 --- linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c.orig 2010-03-31 16:59:39.901995671 -0400
--- a/drivers/gpu/drm/i915/intel_display.c +++ linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c 2010-03-31 17:01:05.416996744 -0400
+++ b/drivers/gpu/drm/i915/intel_display.c @@ -3757,7 +3757,6 @@ struct drm_crtc *intel_get_load_detect_p
@@ -4580,7 +4580,6 @@ void intel_release_load_detect_pipe(struct intel_encoder *intel_encoder, void intel_release_load_detect_pipe(struct intel_encoder *intel_encoder, int dpms_mode)
struct drm_connector *connector, int dpms_mode)
{ {
struct drm_encoder *encoder = &intel_encoder->base; struct drm_encoder *encoder = &intel_encoder->enc;
- struct drm_device *dev = encoder->dev; - struct drm_device *dev = encoder->dev;
struct drm_crtc *crtc = encoder->crtc; struct drm_crtc *crtc = encoder->crtc;
struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private; struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private;
struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
@@ -4590,7 +4589,6 @@ void intel_release_load_detect_pipe(struct intel_encoder *intel_encoder, @@ -3767,7 +3766,6 @@ void intel_release_load_detect_pipe(stru
connector->encoder = NULL; intel_encoder->base.encoder = NULL;
intel_encoder->load_detect_temp = false; intel_encoder->load_detect_temp = false;
crtc->enabled = drm_helper_crtc_in_use(crtc); crtc->enabled = drm_helper_crtc_in_use(crtc);
- drm_helper_disable_unused_functions(dev); - drm_helper_disable_unused_functions(dev);
} }
/* Switch crtc and encoder back off if necessary */ /* Switch crtc and output back off if necessary */

View File

@ -1226,7 +1226,7 @@ ApplyPatch acpi-update-battery-information-on-notification-0x81.patch
ApplyPatch linux-2.6-debug-sizeof-structs.patch ApplyPatch linux-2.6-debug-sizeof-structs.patch
ApplyPatch linux-2.6-debug-nmi-timeout.patch ApplyPatch linux-2.6-debug-nmi-timeout.patch
ApplyPatch linux-2.6-debug-taint-vm.patch ApplyPatch linux-2.6-debug-taint-vm.patch
###FIX###ApplyPatch linux-2.6-debug-vm-would-have-oomkilled.patch ApplyPatch linux-2.6-debug-vm-would-have-oomkilled.patch
ApplyPatch linux-2.6-debug-always-inline-kzalloc.patch ApplyPatch linux-2.6-debug-always-inline-kzalloc.patch
ApplyPatch debug-tty-print-dev-name.patch ApplyPatch debug-tty-print-dev-name.patch
@ -1302,9 +1302,8 @@ ApplyPatch fix_xen_guest_on_old_EC2.patch
ApplyOptionalPatch drm-nouveau-updates.patch ApplyOptionalPatch drm-nouveau-updates.patch
# Intel DRM # Intel DRM
#ApplyPatch drm-intel-2.6.37-rc2.patch ApplyPatch drm-intel-big-hammer.patch
#ApplyPatch drm-intel-big-hammer.patch ApplyPatch drm-intel-make-lvds-work.patch
#ApplyPatch drm-intel-make-lvds-work.patch
ApplyPatch linux-2.6-intel-iommu-igfx.patch ApplyPatch linux-2.6-intel-iommu-igfx.patch
ApplyPatch radeon-mc-vram-map-needs-to-be-gt-pci-aperture.patch ApplyPatch radeon-mc-vram-map-needs-to-be-gt-pci-aperture.patch

View File

@ -1,26 +1,30 @@
From 03657519851cd180983db4bd0c38eaeed4aa2962 Mon Sep 17 00:00:00 2001 From beb764ac03e52eba1a654afb4273fab1f9de3cff Mon Sep 17 00:00:00 2001
From: Kyle McMartin <kyle@treachery.i.jkkm.org> From: Kyle McMartin <kyle@mcmartin.ca>
Date: Mon, 11 Jan 2010 08:25:12 -0500 Date: Mon, 29 Nov 2010 20:59:14 -0500
Subject: linux-2.6-debug-vm-would-have-oomkilled.patch Subject: [PATCH] linux-2.6-debug-vm-would_have_oomkilled
--- ---
kernel/sysctl.c | 8 ++++++++ include/linux/oom.h | 1 +
mm/oom_kill.c | 7 +++++++ kernel/sysctl.c | 7 +++++++
2 files changed, 15 insertions(+), 0 deletions(-) mm/oom_kill.c | 8 ++++++++
3 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/include/linux/oom.h b/include/linux/oom.h
index 5e3aa83..79a27b4 100644
--- a/include/linux/oom.h
+++ b/include/linux/oom.h
@@ -72,5 +72,6 @@ extern struct task_struct *find_lock_task_mm(struct task_struct *p);
extern int sysctl_oom_dump_tasks;
extern int sysctl_oom_kill_allocating_task;
extern int sysctl_panic_on_oom;
+extern int sysctl_would_have_oomkilled;
#endif /* __KERNEL__*/
#endif /* _INCLUDE_LINUX_OOM_H */
diff --git a/kernel/sysctl.c b/kernel/sysctl.c diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 8a68b24..72a4ff1 100644 index 5abfa15..a0fed6d 100644
--- a/kernel/sysctl.c --- a/kernel/sysctl.c
+++ b/kernel/sysctl.c +++ b/kernel/sysctl.c
@@ -71,6 +71,7 @@ extern int sysctl_overcommit_ratio; @@ -1000,6 +1000,13 @@ static struct ctl_table vm_table[] = {
extern int sysctl_panic_on_oom;
extern int sysctl_oom_kill_allocating_task;
extern int sysctl_oom_dump_tasks;
+extern int sysctl_would_have_oomkilled;
extern int max_threads;
extern int core_uses_pid;
extern int suid_dumpable;
@@ -973,6 +974,13 @@ static struct ctl_table vm_table[] = {
.proc_handler = proc_dointvec, .proc_handler = proc_dointvec,
}, },
{ {
@ -28,37 +32,38 @@ index 8a68b24..72a4ff1 100644
+ .data = &sysctl_would_have_oomkilled, + .data = &sysctl_would_have_oomkilled,
+ .maxlen = sizeof(sysctl_would_have_oomkilled), + .maxlen = sizeof(sysctl_would_have_oomkilled),
+ .mode = 0644, + .mode = 0644,
+ .proc_handler = &proc_dointvec, + .proc_handler = proc_dointvec,
+ }, + },
+ { + {
.procname = "overcommit_ratio", .procname = "overcommit_ratio",
.data = &sysctl_overcommit_ratio, .data = &sysctl_overcommit_ratio,
.maxlen = sizeof(sysctl_overcommit_ratio), .maxlen = sizeof(sysctl_overcommit_ratio),
diff --git a/mm/oom_kill.c b/mm/oom_kill.c diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index f52481b..a892f07 100644 index 7dcca55..281ac39 100644
--- a/mm/oom_kill.c --- a/mm/oom_kill.c
+++ b/mm/oom_kill.c +++ b/mm/oom_kill.c
@@ -31,6 +31,7 @@ @@ -35,6 +35,7 @@
int sysctl_panic_on_oom; int sysctl_panic_on_oom;
int sysctl_oom_kill_allocating_task; int sysctl_oom_kill_allocating_task;
int sysctl_oom_dump_tasks; int sysctl_oom_dump_tasks = 1;
+int sysctl_would_have_oomkilled; +int sysctl_would_have_oomkilled;
static DEFINE_SPINLOCK(zone_scan_lock); static DEFINE_SPINLOCK(zone_scan_lock);
/* #define DEBUG */
@@ -396,6 +397,12 @@ static void __oom_kill_task(struct task_struct *p, int verbose) #ifdef CONFIG_NUMA
return; @@ -477,6 +478,13 @@ static int oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order,
} }
+ if (sysctl_would_have_oomkilled == 1) { task_lock(p);
+ printk(KERN_ERR "Would have killed process %d (%s). But continuing instead.\n", + if (sysctl_would_have_oomkilled) {
+ task_pid_nr(p), p->comm); + printk(KERN_ERR "%s: would have killed process %d (%s), but continuing instead...\n",
+ return; + __func__, task_pid_nr(p), p->comm);
+ task_unlock(p);
+ return 0;
+ } + }
+ +
if (verbose) pr_err("%s: Kill process %d (%s) score %d or sacrifice child\n",
printk(KERN_ERR "Killed process %d (%s) " message, task_pid_nr(p), p->comm, points);
"vsz:%lukB, anon-rss:%lukB, file-rss:%lukB\n", task_unlock(p);
-- --
1.6.5.2 1.7.3.2