re-sync more patches
This commit is contained in:
parent
f9204b5a27
commit
7918b0cd6c
@ -1,44 +0,0 @@
|
||||
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
|
||||
index f737960..b1f8164 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_drv.c
|
||||
+++ b/drivers/gpu/drm/i915/i915_drv.c
|
||||
@@ -509,6 +509,8 @@ i915_pci_remove(struct pci_dev *pdev)
|
||||
{
|
||||
struct drm_device *dev = pci_get_drvdata(pdev);
|
||||
|
||||
+ pci_disable_device(pdev); /* core did previous enable */
|
||||
+
|
||||
drm_put_dev(dev);
|
||||
}
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
|
||||
index 300f64b..2e3db37 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_dp.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_dp.c
|
||||
@@ -795,7 +795,8 @@ static bool ironlake_edp_panel_on (struct intel_dp *intel_dp)
|
||||
{
|
||||
struct drm_device *dev = intel_dp->base.base.dev;
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
- u32 pp, idle_on_mask = PP_ON | PP_SEQUENCE_STATE_ON_IDLE;
|
||||
+ u32 pp, idle_on = PP_ON | PP_SEQUENCE_STATE_ON_IDLE;
|
||||
+ u32 idle_on_mask = PP_ON | PP_SEQUENCE_STATE_MASK;
|
||||
|
||||
if (I915_READ(PCH_PP_STATUS) & PP_ON)
|
||||
return true;
|
||||
@@ -816,7 +817,7 @@ static bool ironlake_edp_panel_on (struct intel_dp *intel_dp)
|
||||
*/
|
||||
msleep(300);
|
||||
|
||||
- if (wait_for((I915_READ(PCH_PP_STATUS) & idle_on_mask) == idle_on_mask,
|
||||
+ if (wait_for((I915_READ(PCH_PP_STATUS) & idle_on_mask) == idle_on,
|
||||
5000))
|
||||
DRM_ERROR("panel on wait timed out: 0x%08x\n",
|
||||
I915_READ(PCH_PP_STATUS));
|
||||
@@ -922,6 +923,7 @@ static void intel_dp_prepare(struct drm_encoder *encoder)
|
||||
|
||||
if (is_edp(intel_dp)) {
|
||||
ironlake_edp_backlight_off(dev);
|
||||
+ ironlake_edp_panel_off(dev);
|
||||
ironlake_edp_panel_on(intel_dp);
|
||||
if (!is_pch_edp(intel_dp))
|
||||
ironlake_edp_pll_on(encoder);
|
28
kernel.spec
28
kernel.spec
@ -646,8 +646,6 @@ Patch470: die-floppy-die.patch
|
||||
|
||||
Patch510: linux-2.6-silence-noise.patch
|
||||
Patch530: linux-2.6-silence-fbcon-logo.patch
|
||||
Patch570: linux-2.6-selinux-mprotect-checks.patch
|
||||
Patch580: linux-2.6-sparc-selinux-mprotect-checks.patch
|
||||
|
||||
Patch610: hda_intel-prealloc-4mb-dmabuffer.patch
|
||||
|
||||
@ -668,7 +666,6 @@ Patch1810: drm-nouveau-updates.patch
|
||||
Patch1824: drm-intel-next.patch
|
||||
# make sure the lvds comes back on lid open
|
||||
Patch1825: drm-intel-make-lvds-work.patch
|
||||
Patch1826: drm-intel-edp-fixes.patch
|
||||
Patch1827: drm-i915-gen4-has-non-power-of-two-strides.patch
|
||||
|
||||
Patch1900: linux-2.6-intel-iommu-igfx.patch
|
||||
@ -688,9 +685,6 @@ Patch2901: linux-2.6-v4l-dvb-experimental.patch
|
||||
Patch2902: linux-2.6-v4l-dvb-uvcvideo-update.patch
|
||||
|
||||
Patch2910: linux-2.6-v4l-dvb-add-lgdt3304-support.patch
|
||||
Patch2912: linux-2.6-v4l-dvb-ir-core-update.patch
|
||||
|
||||
#Patch2916: lirc-staging-2.6.36-fixes.patch
|
||||
|
||||
# fs fixes
|
||||
|
||||
@ -710,10 +704,6 @@ Patch12205: runtime_pm_fixups.patch
|
||||
|
||||
Patch12303: dmar-disable-when-ricoh-multifunction.patch
|
||||
|
||||
Patch12401: mm-slub-do-not-wake-kswapd-for-slubs-speculative-high-order-allocations.patch
|
||||
Patch12402: mm-slub-do-not-take-expensive-steps-for-slubs-speculative-high-order-allocations.patch
|
||||
Patch12403: mm-vmscan-if-kswapd-has-been-running-too-long-allow-it-to-sleep.patch
|
||||
|
||||
%endif
|
||||
|
||||
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
|
||||
@ -1242,12 +1232,6 @@ ApplyPatch linux-2.6-silence-noise.patch
|
||||
# Make fbcon not show the penguins with 'quiet'
|
||||
ApplyPatch linux-2.6-silence-fbcon-logo.patch
|
||||
|
||||
# Fix the SELinux mprotect checks on executable mappings
|
||||
#ApplyPatch linux-2.6-selinux-mprotect-checks.patch
|
||||
# Fix SELinux for sparc
|
||||
# FIXME: Can we drop this now? See updated linux-2.6-selinux-mprotect-checks.patch
|
||||
#ApplyPatch linux-2.6-sparc-selinux-mprotect-checks.patch
|
||||
|
||||
# Changes to upstream defaults.
|
||||
|
||||
|
||||
@ -1271,7 +1255,6 @@ ApplyOptionalPatch drm-nouveau-updates.patch
|
||||
ApplyOptionalPatch drm-intel-next.patch
|
||||
ApplyPatch drm-intel-make-lvds-work.patch
|
||||
ApplyPatch linux-2.6-intel-iommu-igfx.patch
|
||||
#ApplyPatch drm-intel-edp-fixes.patch
|
||||
# rhbz#681285 (i965: crash in brw_wm_surface_state.c::prepare_wm_surfaces()
|
||||
# where intelObj->mt == NULL)
|
||||
#ApplyPatch drm-i915-gen4-has-non-power-of-two-strides.patch
|
||||
@ -1289,13 +1272,9 @@ ApplyOptionalPatch linux-2.6-v4l-dvb-fixes.patch
|
||||
ApplyOptionalPatch linux-2.6-v4l-dvb-update.patch
|
||||
ApplyOptionalPatch linux-2.6-v4l-dvb-experimental.patch
|
||||
#ApplyPatch linux-2.6-v4l-dvb-uvcvideo-update.patch
|
||||
#ApplyPatch linux-2.6-v4l-dvb-ir-core-update.patch
|
||||
|
||||
###FIX###ApplyPatch linux-2.6-v4l-dvb-add-lgdt3304-support.patch
|
||||
|
||||
# http://www.lirc.org/
|
||||
#ApplyOptionalPatch lirc-staging-2.6.36-fixes.patch
|
||||
|
||||
# Patches headed upstream
|
||||
ApplyPatch disable-i8042-check-on-apple-mac.patch
|
||||
|
||||
@ -1312,11 +1291,6 @@ ApplyPatch neuter_intel_microcode_load.patch
|
||||
# rhbz#605888
|
||||
ApplyPatch dmar-disable-when-ricoh-multifunction.patch
|
||||
|
||||
### disable, riel reports they aggravate a VM_BUG_ON
|
||||
#ApplyPatch mm-slub-do-not-wake-kswapd-for-slubs-speculative-high-order-allocations.patch
|
||||
#ApplyPatch mm-slub-do-not-take-expensive-steps-for-slubs-speculative-high-order-allocations.patch
|
||||
#ApplyPatch mm-vmscan-if-kswapd-has-been-running-too-long-allow-it-to-sleep.patch
|
||||
|
||||
# END OF PATCH APPLICATIONS
|
||||
|
||||
%endif
|
||||
@ -1929,6 +1903,8 @@ fi
|
||||
- linux-2.6-defaults-pci_no_msi.patch: drop, haven't toggled the default
|
||||
in many moons.
|
||||
- linux-2.6-defaults-pci_use_crs.patch: ditto.
|
||||
- linux-2.6-selinux-mprotect-checks.patch: upstream a while ago.
|
||||
- drop some more unapplied crud.
|
||||
|
||||
* Fri Jun 17 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc3.git5.1
|
||||
- Try updating to a git snapshot for the first time in 3.0-rc,
|
||||
|
@ -1,124 +0,0 @@
|
||||
This needs a fixed toolchain, and a userspace rebuild to work.
|
||||
For these reasons, it's had difficulty getting upstream.
|
||||
|
||||
ie, Fedora has a new enough toolchain, and has been rebuilt, so we don't need
|
||||
the ifdefs. Other distros don't/haven't, and this patch would break them
|
||||
if pushed upstream.
|
||||
|
||||
|
||||
Subject: [Fwd: Re: [PATCH] Disable execmem for sparc]
|
||||
From: Stephen Smalley <sds@tycho.nsa.gov>
|
||||
To: Dave Jones <davej@redhat.com>
|
||||
Date: Wed, 28 Apr 2010 16:04:56 -0400
|
||||
Message-Id: <1272485096.6013.326.camel@moss-pluto.epoch.ncsc.mil>
|
||||
|
||||
-------- Forwarded Message --------
|
||||
From: Stephen Smalley <sds@tycho.nsa.gov>
|
||||
To: David Miller <davem@davemloft.net>
|
||||
Cc: tcallawa@redhat.com, dennis@ausil.us, sparclinux@vger.kernel.org, dgilmore@redhat.com, jmorris@namei.org, eparis@parisplace.org
|
||||
Subject: Re: [PATCH] Disable execmem for sparc
|
||||
Date: Wed, 28 Apr 2010 15:57:57 -0400
|
||||
|
||||
On Tue, 2010-04-27 at 11:47 -0700, David Miller wrote:
|
||||
> From: "Tom \"spot\" Callaway" <tcallawa@redhat.com>
|
||||
> Date: Tue, 27 Apr 2010 14:20:21 -0400
|
||||
>
|
||||
> > [root@apollo ~]$ cat /proc/2174/maps
|
||||
> > 00010000-00014000 r-xp 00000000 fd:00 15466577
|
||||
> > /sbin/mingetty
|
||||
> > 00022000-00024000 rwxp 00002000 fd:00 15466577
|
||||
> > /sbin/mingetty
|
||||
> > 00024000-00046000 rwxp 00000000 00:00 0
|
||||
> > [heap]
|
||||
>
|
||||
> SELINUX probably barfs on the executable heap, the PLT is in the HEAP
|
||||
> just like powerpc32 and that's why VM_DATA_DEFAULT_FLAGS has to set
|
||||
> both executable and writable.
|
||||
>
|
||||
> You also can't remove the CONFIG_PPC32 ifdefs in selinux, since
|
||||
> because of the VM_DATA_DEFAULT_FLAGS setting used still in that arch,
|
||||
> the heap will always have executable permission, just like sparc does.
|
||||
> You have to support those binaries forever, whether you like it or not.
|
||||
>
|
||||
> Let's just replace the CONFIG_PPC32 ifdef in SELINUX with CONFIG_PPC32
|
||||
> || CONFIG_SPARC as in Tom's original patch and let's be done with
|
||||
> this.
|
||||
>
|
||||
> In fact I would go through all the arch/ header files and check the
|
||||
> VM_DATA_DEFAULT_FLAGS settings and add the necessary new ifdefs to the
|
||||
> SELINUX code so that other platforms don't have the pain of having to
|
||||
> go through this process too.
|
||||
|
||||
To avoid maintaining per-arch ifdefs, it seems that we could just
|
||||
directly use (VM_DATA_DEFAULT_FLAGS & VM_EXEC) as the basis for deciding
|
||||
whether to enable or disable these checks. VM_DATA_DEFAULT_FLAGS isn't
|
||||
constant on some architectures but instead depends on
|
||||
current->personality, but we want this applied uniformly. So we'll just
|
||||
use the initial task state to determine whether or not to enable these
|
||||
checks.
|
||||
|
||||
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
|
||||
|
||||
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
|
||||
index ebee467..a03fd74 100644
|
||||
--- a/security/selinux/hooks.c
|
||||
+++ b/security/selinux/hooks.c
|
||||
@@ -2999,13 +2999,15 @@ static int selinux_file_ioctl(struct file *file, unsigned int cmd,
|
||||
return file_has_perm(cred, file, av);
|
||||
}
|
||||
|
||||
+static int default_noexec;
|
||||
+
|
||||
static int file_map_prot_check(struct file *file, unsigned long prot, int shared)
|
||||
{
|
||||
const struct cred *cred = current_cred();
|
||||
int rc = 0;
|
||||
|
||||
-#ifndef CONFIG_PPC32
|
||||
- if ((prot & PROT_EXEC) && (!file || (!shared && (prot & PROT_WRITE)))) {
|
||||
+ if (default_noexec &&
|
||||
+ (prot & PROT_EXEC) && (!file || (!shared && (prot & PROT_WRITE)))) {
|
||||
/*
|
||||
* We are making executable an anonymous mapping or a
|
||||
* private file mapping that will also be writable.
|
||||
@@ -3015,7 +3017,6 @@ static int file_map_prot_check(struct file *file, unsigned long prot, int shared
|
||||
if (rc)
|
||||
goto error;
|
||||
}
|
||||
-#endif
|
||||
|
||||
if (file) {
|
||||
/* read access is always possible with a mapping */
|
||||
@@ -3076,8 +3077,8 @@ static int selinux_file_mprotect(struct vm_area_struct *vma,
|
||||
if (selinux_checkreqprot)
|
||||
prot = reqprot;
|
||||
|
||||
-#ifndef CONFIG_PPC32
|
||||
- if ((prot & PROT_EXEC) && !(vma->vm_flags & VM_EXEC)) {
|
||||
+ if (default_noexec &&
|
||||
+ (prot & PROT_EXEC) && !(vma->vm_flags & VM_EXEC)) {
|
||||
int rc = 0;
|
||||
if (vma->vm_start >= vma->vm_mm->start_brk &&
|
||||
vma->vm_end <= vma->vm_mm->brk) {
|
||||
@@ -3099,7 +3100,6 @@ static int selinux_file_mprotect(struct vm_area_struct *vma,
|
||||
if (rc)
|
||||
return rc;
|
||||
}
|
||||
-#endif
|
||||
|
||||
return file_map_prot_check(vma->vm_file, prot, vma->vm_flags&VM_SHARED);
|
||||
}
|
||||
@@ -5662,6 +5662,8 @@ static __init int selinux_init(void)
|
||||
/* Set the security state for the initial task. */
|
||||
cred_init_security();
|
||||
|
||||
+ default_noexec = !(VM_DATA_DEFAULT_FLAGS & VM_EXEC);
|
||||
+
|
||||
sel_inode_cache = kmem_cache_create("selinux_inode_security",
|
||||
sizeof(struct inode_security_struct),
|
||||
0, SLAB_PANIC, NULL);
|
||||
|
||||
--
|
||||
Stephen Smalley
|
||||
National Security Agency
|
||||
|
@ -1,35 +0,0 @@
|
||||
diff -up linux-2.6.24.sparc64/security/selinux/hooks.c.BAD linux-2.6.24.sparc64/security/selinux/hooks.c
|
||||
--- linux-2.6.24.sparc64/security/selinux/hooks.c.BAD 2008-03-21 14:28:06.000000000 -0400
|
||||
+++ linux-2.6.24.sparc64/security/selinux/hooks.c 2008-03-21 14:29:10.000000000 -0400
|
||||
@@ -3018,6 +3018,7 @@ static int file_map_prot_check(struct fi
|
||||
const struct cred *cred = current_cred();
|
||||
int rc = 0;
|
||||
|
||||
+#ifndef CONFIG_SPARC
|
||||
if ((prot & PROT_EXEC) && (!file || (!shared && (prot & PROT_WRITE)))) {
|
||||
/*
|
||||
* We are making executable an anonymous mapping or a
|
||||
@@ -3028,6 +3029,7 @@ static int file_map_prot_check(struct fi
|
||||
if (rc)
|
||||
goto error;
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (file) {
|
||||
/* read access is always possible with a mapping */
|
||||
@@ -3081,6 +3081,7 @@ static int selinux_file_mprotect(struct
|
||||
if (selinux_checkreqprot)
|
||||
prot = reqprot;
|
||||
|
||||
+#ifndef CONFIG_SPARC
|
||||
if ((prot & PROT_EXEC) && !(vma->vm_flags & VM_EXEC)) {
|
||||
rc = 0;
|
||||
if (vma->vm_start >= vma->vm_mm->start_brk &&
|
||||
@@ -3103,6 +3103,7 @@ static int selinux_file_mprotect(struct
|
||||
if (rc)
|
||||
return rc;
|
||||
}
|
||||
+#endif
|
||||
|
||||
return file_map_prot_check(vma->vm_file, prot, vma->vm_flags&VM_SHARED);
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,78 +0,0 @@
|
||||
From linux-fsdevel-owner@vger.kernel.org Fri May 13 10:04:18 2011
|
||||
From: Mel Gorman <mgorman@suse.de>
|
||||
To: Andrew Morton <akpm@linux-foundation.org>
|
||||
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
|
||||
Colin King <colin.king@canonical.com>,
|
||||
Raghavendra D Prabhu <raghu.prabhu13@gmail.com>,
|
||||
Jan Kara <jack@suse.cz>, Chris Mason <chris.mason@oracle.com>,
|
||||
Christoph Lameter <cl@linux.com>,
|
||||
Pekka Enberg <penberg@kernel.org>,
|
||||
Rik van Riel <riel@redhat.com>,
|
||||
Johannes Weiner <hannes@cmpxchg.org>,
|
||||
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
|
||||
linux-mm <linux-mm@kvack.org>,
|
||||
linux-kernel <linux-kernel@vger.kernel.org>,
|
||||
linux-ext4 <linux-ext4@vger.kernel.org>,
|
||||
Mel Gorman <mgorman@suse.de>
|
||||
Subject: [PATCH 3/4] mm: slub: Do not take expensive steps for SLUBs speculative high-order allocations
|
||||
Date: Fri, 13 May 2011 15:03:23 +0100
|
||||
Message-Id: <1305295404-12129-4-git-send-email-mgorman@suse.de>
|
||||
X-Mailing-List: linux-fsdevel@vger.kernel.org
|
||||
|
||||
To avoid locking and per-cpu overhead, SLUB optimisically uses
|
||||
high-order allocations and falls back to lower allocations if they
|
||||
fail. However, by simply trying to allocate, the caller can enter
|
||||
compaction or reclaim - both of which are likely to cost more than the
|
||||
benefit of using high-order pages in SLUB. On a desktop system, two
|
||||
users report that the system is getting stalled with kswapd using large
|
||||
amounts of CPU.
|
||||
|
||||
This patch prevents SLUB taking any expensive steps when trying to use
|
||||
high-order allocations. Instead, it is expected to fall back to smaller
|
||||
orders more aggressively. Testing was somewhat inconclusive on how much
|
||||
this helped but it makes sense that falling back to order-0 allocations
|
||||
is faster than entering compaction or direct reclaim.
|
||||
|
||||
Signed-off-by: Mel Gorman <mgorman@suse.de>
|
||||
---
|
||||
mm/page_alloc.c | 3 ++-
|
||||
mm/slub.c | 3 ++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
|
||||
index 9f8a97b..057f1e2 100644
|
||||
--- a/mm/page_alloc.c
|
||||
+++ b/mm/page_alloc.c
|
||||
@@ -1972,6 +1972,7 @@ gfp_to_alloc_flags(gfp_t gfp_mask)
|
||||
{
|
||||
int alloc_flags = ALLOC_WMARK_MIN | ALLOC_CPUSET;
|
||||
const gfp_t wait = gfp_mask & __GFP_WAIT;
|
||||
+ const gfp_t can_wake_kswapd = !(gfp_mask & __GFP_NO_KSWAPD);
|
||||
|
||||
/* __GFP_HIGH is assumed to be the same as ALLOC_HIGH to save a branch. */
|
||||
BUILD_BUG_ON(__GFP_HIGH != (__force gfp_t) ALLOC_HIGH);
|
||||
@@ -1984,7 +1985,7 @@ gfp_to_alloc_flags(gfp_t gfp_mask)
|
||||
*/
|
||||
alloc_flags |= (__force int) (gfp_mask & __GFP_HIGH);
|
||||
|
||||
- if (!wait) {
|
||||
+ if (!wait && can_wake_kswapd) {
|
||||
/*
|
||||
* Not worth trying to allocate harder for
|
||||
* __GFP_NOMEMALLOC even if it can't schedule.
|
||||
diff --git a/mm/slub.c b/mm/slub.c
|
||||
index 98c358d..c5797ab 100644
|
||||
--- a/mm/slub.c
|
||||
+++ b/mm/slub.c
|
||||
@@ -1170,7 +1170,8 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)
|
||||
* Let the initial higher-order allocation fail under memory pressure
|
||||
* so we fall-back to the minimum order allocation.
|
||||
*/
|
||||
- alloc_gfp = (flags | __GFP_NOWARN | __GFP_NORETRY | __GFP_NO_KSWAPD) & ~__GFP_NOFAIL;
|
||||
+ alloc_gfp = (flags | __GFP_NOWARN | __GFP_NO_KSWAPD) &
|
||||
+ ~(__GFP_NOFAIL | __GFP_WAIT | __GFP_REPEAT);
|
||||
|
||||
page = alloc_slab_page(alloc_gfp, node, oo);
|
||||
if (unlikely(!page)) {
|
||||
--
|
||||
1.7.3.4
|
@ -1,52 +0,0 @@
|
||||
From linux-fsdevel-owner@vger.kernel.org Fri May 13 10:04:00 2011
|
||||
From: Mel Gorman <mgorman@suse.de>
|
||||
To: Andrew Morton <akpm@linux-foundation.org>
|
||||
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
|
||||
Colin King <colin.king@canonical.com>,
|
||||
Raghavendra D Prabhu <raghu.prabhu13@gmail.com>,
|
||||
Jan Kara <jack@suse.cz>, Chris Mason <chris.mason@oracle.com>,
|
||||
Christoph Lameter <cl@linux.com>,
|
||||
Pekka Enberg <penberg@kernel.org>,
|
||||
Rik van Riel <riel@redhat.com>,
|
||||
Johannes Weiner <hannes@cmpxchg.org>,
|
||||
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
|
||||
linux-mm <linux-mm@kvack.org>,
|
||||
linux-kernel <linux-kernel@vger.kernel.org>,
|
||||
linux-ext4 <linux-ext4@vger.kernel.org>,
|
||||
Mel Gorman <mgorman@suse.de>
|
||||
Subject: [PATCH 2/4] mm: slub: Do not wake kswapd for SLUBs speculative high-order allocations
|
||||
Date: Fri, 13 May 2011 15:03:22 +0100
|
||||
Message-Id: <1305295404-12129-3-git-send-email-mgorman@suse.de>
|
||||
X-Mailing-List: linux-fsdevel@vger.kernel.org
|
||||
|
||||
To avoid locking and per-cpu overhead, SLUB optimisically uses
|
||||
high-order allocations and falls back to lower allocations if they
|
||||
fail. However, by simply trying to allocate, kswapd is woken up to
|
||||
start reclaiming at that order. On a desktop system, two users report
|
||||
that the system is getting locked up with kswapd using large amounts
|
||||
of CPU. Using SLAB instead of SLUB made this problem go away.
|
||||
|
||||
This patch prevents kswapd being woken up for high-order allocations.
|
||||
Testing indicated that with this patch applied, the system was much
|
||||
harder to hang and even when it did, it eventually recovered.
|
||||
|
||||
Signed-off-by: Mel Gorman <mgorman@suse.de>
|
||||
---
|
||||
mm/slub.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/mm/slub.c b/mm/slub.c
|
||||
index 9d2e5e4..98c358d 100644
|
||||
--- a/mm/slub.c
|
||||
+++ b/mm/slub.c
|
||||
@@ -1170,7 +1170,7 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)
|
||||
* Let the initial higher-order allocation fail under memory pressure
|
||||
* so we fall-back to the minimum order allocation.
|
||||
*/
|
||||
- alloc_gfp = (flags | __GFP_NOWARN | __GFP_NORETRY) & ~__GFP_NOFAIL;
|
||||
+ alloc_gfp = (flags | __GFP_NOWARN | __GFP_NORETRY | __GFP_NO_KSWAPD) & ~__GFP_NOFAIL;
|
||||
|
||||
page = alloc_slab_page(alloc_gfp, node, oo);
|
||||
if (unlikely(!page)) {
|
||||
--
|
||||
1.7.3.4
|
@ -1,47 +0,0 @@
|
||||
From linux-fsdevel-owner@vger.kernel.org Fri May 13 10:03:52 2011
|
||||
From: Mel Gorman <mgorman@suse.de>
|
||||
To: Andrew Morton <akpm@linux-foundation.org>
|
||||
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
|
||||
Colin King <colin.king@canonical.com>,
|
||||
Raghavendra D Prabhu <raghu.prabhu13@gmail.com>,
|
||||
Jan Kara <jack@suse.cz>, Chris Mason <chris.mason@oracle.com>,
|
||||
Christoph Lameter <cl@linux.com>,
|
||||
Pekka Enberg <penberg@kernel.org>,
|
||||
Rik van Riel <riel@redhat.com>,
|
||||
Johannes Weiner <hannes@cmpxchg.org>,
|
||||
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
|
||||
linux-mm <linux-mm@kvack.org>,
|
||||
linux-kernel <linux-kernel@vger.kernel.org>,
|
||||
linux-ext4 <linux-ext4@vger.kernel.org>,
|
||||
Mel Gorman <mgorman@suse.de>
|
||||
Subject: [PATCH 4/4] mm: vmscan: If kswapd has been running too long, allow it to sleep
|
||||
Date: Fri, 13 May 2011 15:03:24 +0100
|
||||
Message-Id: <1305295404-12129-5-git-send-email-mgorman@suse.de>
|
||||
X-Mailing-List: linux-fsdevel@vger.kernel.org
|
||||
|
||||
Under constant allocation pressure, kswapd can be in the situation where
|
||||
sleeping_prematurely() will always return true even if kswapd has been
|
||||
running a long time. Check if kswapd needs to be scheduled.
|
||||
|
||||
Signed-off-by: Mel Gorman <mgorman@suse.de>
|
||||
---
|
||||
mm/vmscan.c | 4 ++++
|
||||
1 files changed, 4 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/mm/vmscan.c b/mm/vmscan.c
|
||||
index af24d1e..4d24828 100644
|
||||
--- a/mm/vmscan.c
|
||||
+++ b/mm/vmscan.c
|
||||
@@ -2251,6 +2251,10 @@ static bool sleeping_prematurely(pg_data_t *pgdat, int order, long remaining,
|
||||
unsigned long balanced = 0;
|
||||
bool all_zones_ok = true;
|
||||
|
||||
+ /* If kswapd has been running too long, just sleep */
|
||||
+ if (need_resched())
|
||||
+ return false;
|
||||
+
|
||||
/* If a direct reclaimer woke kswapd within HZ/10, it's premature */
|
||||
if (remaining)
|
||||
return true;
|
||||
--
|
||||
1.7.3.4
|
Loading…
Reference in New Issue
Block a user