Linux 2.6.38.8

Revert radeon patches we already have:
 drm/radeon/kms: add wait idle ioctl for eg->cayman
 drm/radeon/evergreen/btc/fusion: setup hdp to invalidate and flush when asked
Drop individual patches we have:
 ips-use-interruptible-waits-in-ips-monitor.patch
 drm-vblank-events-fix-hangs.patch
 mm-vmscan-correct-use-of-pgdat_balanced-in-sleeping_prematurely.patch
 mm-vmscan-correctly-check-if-reclaimer-should-schedule-during-shrink_slab.patch
This commit is contained in:
Chuck Ebbert 2011-06-04 10:57:43 -04:00
parent f91329b1ad
commit 18dd18f538
8 changed files with 119 additions and 378 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ patch-*.bz2
clog
*.rpm
kernel-2.6.*/
kernel-3.*/

View File

@ -1,60 +0,0 @@
From 498548ec69c6897fe4376b2ca90758762fa0b817 Mon Sep 17 00:00:00 2001
From: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date: Wed, 27 Apr 2011 16:10:57 +1000
Subject: [PATCH 3/4] drm: Send pending vblank events before disabling vblank.
This is the least-bad behaviour. It means that we signal the
vblank event before it actually happens, but since we're disabling
vblanks there's no guarantee that it will *ever* happen otherwise.
This prevents GL applications which use WaitMSC from hanging
indefinitely.
Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/drm_irq.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 741457b..a1f12cb 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -932,11 +932,34 @@ EXPORT_SYMBOL(drm_vblank_put);
void drm_vblank_off(struct drm_device *dev, int crtc)
{
+ struct drm_pending_vblank_event *e, *t;
+ struct timeval now;
unsigned long irqflags;
+ unsigned int seq;
spin_lock_irqsave(&dev->vbl_lock, irqflags);
vblank_disable_and_save(dev, crtc);
DRM_WAKEUP(&dev->vbl_queue[crtc]);
+
+ /* Send any queued vblank events, lest the natives grow disquiet */
+ seq = drm_vblank_count_and_time(dev, crtc, &now);
+ list_for_each_entry_safe(e, t, &dev->vblank_event_list, base.link) {
+ if (e->pipe != crtc)
+ continue;
+ DRM_DEBUG("Sending premature vblank event on disable: \
+ wanted %d, current %d\n",
+ e->event.sequence, seq);
+
+ e->event.sequence = seq;
+ e->event.tv_sec = now.tv_sec;
+ e->event.tv_usec = now.tv_usec;
+ drm_vblank_put(dev, e->pipe);
+ list_move_tail(&e->base.link, &e->base.file_priv->event_list);
+ wake_up_interruptible(&e->base.file_priv->event_wait);
+ trace_drm_vblank_event_delivered(e->base.pid, e->pipe,
+ e->event.sequence);
+ }
+
spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
}
EXPORT_SYMBOL(drm_vblank_off);
--
1.7.1

View File

@ -1,30 +0,0 @@
From: Jesse Barnes <jbarnes@virtuousgeek.org>
Date: Mon, 28 Mar 2011 10:36:30 +0000 (-0400)
Subject: ips: use interruptible waits in ips-monitor
X-Git-Tag: v2.6.39-rc1~20^2^2~1
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=a3424216e4935221fdaa5ca3c26e024f11297164
ips: use interruptible waits in ips-monitor
This is what I intended to do since:
1) the driver handles variable waits just fine, and
2) interruptible waits aren't reported as load in the load avg.
Reported-and-tested-by: Andreas Hartmann <andihartmann@freenet.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
diff --git a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel_ips.c
index 1294a39..85c8ad4 100644
--- a/drivers/platform/x86/intel_ips.c
+++ b/drivers/platform/x86/intel_ips.c
@@ -1111,7 +1111,7 @@ static int ips_monitor(void *data)
last_msecs = jiffies_to_msecs(jiffies);
expire = jiffies + msecs_to_jiffies(IPS_SAMPLE_PERIOD);
- __set_current_state(TASK_UNINTERRUPTIBLE);
+ __set_current_state(TASK_INTERRUPTIBLE);
mod_timer(&timer, expire);
schedule();

View File

@ -51,7 +51,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be prepended with "0.", so
# for example a 3 here will become 0.3
#
%global baserelease 30
%global baserelease 31
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@ -63,7 +63,7 @@ Summary: The Linux kernel
%if 0%{?released_kernel}
# Do we have a -stable update to apply?
%define stable_update 7
%define stable_update 8
# Is it a -stable RC?
%define stable_rc 0
# Set rpm version accordingly
@ -668,7 +668,6 @@ Patch800: linux-2.6-crash-driver.patch
Patch1555: fix_xen_guest_on_old_EC2.patch
# DRM
Patch1800: drm-vblank-events-fix-hangs.patch
# nouveau + drm fixes
Patch1809: drm-nouveau-fixes.patch
@ -743,19 +742,11 @@ Patch12403: x86-dumpstack-correct-stack-dump-info-when-frame-pointer-is-availabl
# Fix breakage of PCI network adapter names on older Dell systems
Patch12404: x86-pci-preserve-existing-pci-bfsort-whitelist-for-dell-systems.patch
# intel_ips driver bug (#703511) causes cooling fan to run
Patch12406: ips-use-interruptible-waits-in-ips-monitor.patch
Patch12407: scsi_dh_hp_sw-fix-deadlock-in-start_stop_endio.patch
# temporary fix for Sempron machines stalling (#704059)
Patch12408: x86-amd-arat-bug-on-sempron-workaround.patch
# Eliminate hangs when using frequent high-order allocations V4
# (will be in 2.6.38.8)
Patch12410: mm-vmscan-correct-use-of-pgdat_balanced-in-sleeping_prematurely.patch
Patch12411: mm-vmscan-correctly-check-if-reclaimer-should-schedule-during-shrink_slab.patch
Patch12415: hid-multitouch-add-support-for-elo-touchsystems.patch
Patch12416: bluetooth-device-ids-for-ath3k-on-pegatron-lucid-tablets.patch
@ -1326,7 +1317,6 @@ ApplyPatch linux-2.6-e1000-ich9-montevina.patch
ApplyPatch fix_xen_guest_on_old_EC2.patch
# DRM core
ApplyPatch drm-vblank-events-fix-hangs.patch
# Nouveau DRM
ApplyPatch drm-ttm-move-notify.patch
@ -1395,19 +1385,11 @@ ApplyPatch linux-2.6-netconsole-deadlock.patch
# CVE-2011-1581
ApplyPatch bonding-incorrect-tx-queue-offset.patch
# intel_ips driver bug (#703511) causes cooling fan to run
ApplyPatch ips-use-interruptible-waits-in-ips-monitor.patch
ApplyPatch scsi_dh_hp_sw-fix-deadlock-in-start_stop_endio.patch
# temporary fix for Sempron machines stalling (#704059)
ApplyPatch x86-amd-arat-bug-on-sempron-workaround.patch
# Eliminate hangs when using frequent high-order allocations V4
# (will be in 2.6.38.8)
ApplyPatch mm-vmscan-correct-use-of-pgdat_balanced-in-sleeping_prematurely.patch
ApplyPatch mm-vmscan-correctly-check-if-reclaimer-should-schedule-during-shrink_slab.patch
ApplyPatch hid-multitouch-add-support-for-elo-touchsystems.patch
ApplyPatch bluetooth-device-ids-for-ath3k-on-pegatron-lucid-tablets.patch
@ -2019,6 +2001,17 @@ fi
# and build.
%changelog
* Sat Jun 04 2011 Chuck Ebbert <cebbert@redhat.com> 2.6.38.8-31
- Linux 2.6.38.8
- Revert radeon patches we already have:
drm/radeon/kms: add wait idle ioctl for eg->cayman
drm/radeon/evergreen/btc/fusion: setup hdp to invalidate and flush when asked
- Drop individual patches we have:
ips-use-interruptible-waits-in-ips-monitor.patch
drm-vblank-events-fix-hangs.patch
mm-vmscan-correct-use-of-pgdat_balanced-in-sleeping_prematurely.patch
mm-vmscan-correctly-check-if-reclaimer-should-schedule-during-shrink_slab.patch
* Sun May 29 2011 Dave Airlie <airlied@redhat.com>
- fix oops on pageflipping sometimes (#680651)

View File

@ -1,3 +1,107 @@
From 97bfd0acd32e9639c9136e03955d574655d5cc2b Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Thu, 19 May 2011 14:14:43 +1000
Subject: drm/radeon/kms: add wait idle ioctl for eg->cayman
From: Dave Airlie <airlied@redhat.com>
commit 97bfd0acd32e9639c9136e03955d574655d5cc2b upstream.
None of the latest GPUs had this hooked up, this is necessary for
correct operation in a lot of cases, however we should test this on a few
GPUs in these families as we've had problems in this area before.
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/radeon/radeon_asic.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/gpu/drm/radeon/radeon_asic.c
+++ b/drivers/gpu/drm/radeon/radeon_asic.c
@@ -782,6 +782,7 @@ static struct radeon_asic evergreen_asic
.hpd_fini = &evergreen_hpd_fini,
.hpd_sense = &evergreen_hpd_sense,
.hpd_set_polarity = &evergreen_hpd_set_polarity,
+ .ioctl_wait_idle = r600_ioctl_wait_idle,
.gui_idle = &r600_gui_idle,
.pm_misc = &evergreen_pm_misc,
.pm_prepare = &evergreen_pm_prepare,
@@ -828,6 +829,7 @@ static struct radeon_asic sumo_asic = {
.hpd_fini = &evergreen_hpd_fini,
.hpd_sense = &evergreen_hpd_sense,
.hpd_set_polarity = &evergreen_hpd_set_polarity,
+ .ioctl_wait_idle = r600_ioctl_wait_idle,
.gui_idle = &r600_gui_idle,
.pm_misc = &evergreen_pm_misc,
.pm_prepare = &evergreen_pm_prepare,
@@ -874,6 +876,8 @@ static struct radeon_asic btc_asic = {
.hpd_fini = &evergreen_hpd_fini,
.hpd_sense = &evergreen_hpd_sense,
.hpd_set_polarity = &evergreen_hpd_set_polarity,
+ .ioctl_wait_idle = r600_ioctl_wait_idle,
+ .ioctl_wait_idle = r600_ioctl_wait_idle,
.gui_idle = &r600_gui_idle,
.pm_misc = &evergreen_pm_misc,
.pm_prepare = &evergreen_pm_prepare,
From f25a5c63bfa017498c9adecb24d649ae96ba5c68 Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexdeucher@gmail.com>
Date: Thu, 19 May 2011 11:07:57 -0400
Subject: drm/radeon/evergreen/btc/fusion: setup hdp to invalidate and
flush when asked
From: Alex Deucher <alexdeucher@gmail.com>
commit f25a5c63bfa017498c9adecb24d649ae96ba5c68 upstream.
This needs to be explicitly set on btc. It's set by default
on evergreen/fusion, so it fine to just unconditionally enable it for
all chips.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/radeon/evergreen.c | 6 +++++-
drivers/gpu/drm/radeon/evergreend.h | 2 ++
2 files changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -1585,7 +1585,7 @@ static void evergreen_gpu_init(struct ra
u32 sq_stack_resource_mgmt_2;
u32 sq_stack_resource_mgmt_3;
u32 vgt_cache_invalidation;
- u32 hdp_host_path_cntl;
+ u32 hdp_host_path_cntl, tmp;
int i, j, num_shader_engines, ps_thread_count;
switch (rdev->family) {
@@ -2145,6 +2145,10 @@ static void evergreen_gpu_init(struct ra
for (i = SQ_ALU_CONST_BUFFER_SIZE_HS_0; i < 0x29000; i += 4)
WREG32(i, 0);
+ tmp = RREG32(HDP_MISC_CNTL);
+ tmp |= HDP_FLUSH_INVALIDATE_CACHE;
+ WREG32(HDP_MISC_CNTL, tmp);
+
hdp_host_path_cntl = RREG32(HDP_HOST_PATH_CNTL);
WREG32(HDP_HOST_PATH_CNTL, hdp_host_path_cntl);
--- a/drivers/gpu/drm/radeon/evergreend.h
+++ b/drivers/gpu/drm/radeon/evergreend.h
@@ -64,6 +64,8 @@
#define GB_BACKEND_MAP 0x98FC
#define DMIF_ADDR_CONFIG 0xBD4
#define HDP_ADDR_CONFIG 0x2F48
+#define HDP_MISC_CNTL 0x2F4C
+#define HDP_FLUSH_INVALIDATE_CACHE (1 << 0)
#define CC_SYS_RB_BACKEND_DISABLE 0x3F88
#define GC_USER_RB_BACKEND_DISABLE 0x9B7C
From alexdeucher@gmail.com Mon May 9 16:35:34 2011
From: Alex Deucher <alexdeucher@gmail.com>
Date: Fri, 6 May 2011 14:29:55 -0400

View File

@ -1,114 +0,0 @@
Return-Path: stable-bounces@linux.kernel.org
Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
mail02.corp.redhat.com with LMTP; Mon, 23 May 2011 05:54:46 -0400 (EDT)
Received: from localhost (localhost.localdomain [127.0.0.1])
by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 3139D4E5E6
for <cebbert@redhat.com>; Mon, 23 May 2011 05:54:46 -0400 (EDT)
Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id Xko2+8bJJ7po for <cebbert@redhat.com>;
Mon, 23 May 2011 05:54:46 -0400 (EDT)
Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 1A5854D284
for <cebbert@mail.corp.redhat.com>; Mon, 23 May 2011 05:54:46 -0400 (EDT)
Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.18])
by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p4N9sjdi005829
for <cebbert@redhat.com>; Mon, 23 May 2011 05:54:45 -0400
Received: from hera.kernel.org (hera.kernel.org [140.211.167.34])
by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4N9siLf018408
for <cebbert@redhat.com>; Mon, 23 May 2011 05:54:45 -0400
Received: from hera.kernel.org (localhost [127.0.0.1])
by hera.kernel.org (8.14.4/8.14.3) with ESMTP id p4N9s7Yv010104;
Mon, 23 May 2011 09:54:09 GMT
X-Virus-Status: Clean
X-Virus-Scanned: clamav-milter 0.97 at hera.kernel.org
Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15])
by hera.kernel.org (8.14.4/8.14.3) with ESMTP id p4N9s1LC009736;
Mon, 23 May 2011 09:54:02 GMT
X-Virus-Status: Clean
X-Virus-Scanned: clamav-milter 0.97 at hera.kernel.org
Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2])
by mx2.suse.de (Postfix) with ESMTP id 98E7590072;
Mon, 23 May 2011 11:53:59 +0200 (CEST)
From: Mel Gorman <mgorman@suse.de>
To: Andrew Morton <akpm@linux-foundation.org>
Date: Mon, 23 May 2011 10:53:54 +0100
Message-Id: <1306144435-2516-2-git-send-email-mgorman@suse.de>
In-Reply-To: <1306144435-2516-1-git-send-email-mgorman@suse.de>
References: <1306144435-2516-1-git-send-email-mgorman@suse.de>
X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED
autolearn=unavailable version=3.3.2-r929478
X-Spam-Checker-Version: SpamAssassin 3.3.2-r929478 (2010-03-31) on
hera.kernel.org
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (hera.kernel.org [127.0.0.1]); Mon, 23 May 2011 09:54:12 +0000 (UTC)
X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by
milter-greylist-4.2.3 (hera.kernel.org [140.211.167.34]);
Mon, 23 May 2011 09:54:04 +0000 (UTC)
Cc: Pekka Enberg <penberg@kernel.org>, Rik van Riel <riel@redhat.com>,
Jan Kara <jack@suse.cz>, linux-kernel <linux-kernel@vger.kernel.org>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
linux-mm <linux-mm@kvack.org>, Minchan Kim <minchan.kim@gmail.com>,
Raghavendra D Prabhu <raghu.prabhu13@gmail.com>,
Johannes Weiner <hannes@cmpxchg.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Colin King <colin.king@canonical.com>,
Christoph Lameter <cl@linux.com>,
linux-ext4 <linux-ext4@vger.kernel.org>, stable <stable@kernel.org>,
Chris Mason <chris.mason@oracle.com>, Mel Gorman <mgorman@suse.de>
Subject: [stable] [PATCH 1/2] mm: vmscan: Correct use of pgdat_balanced in
sleeping_prematurely
X-BeenThere: stable@linux.kernel.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: For maintainers of the stable Linux series <stable.linux.kernel.org>
List-Unsubscribe: <http://linux.kernel.org/mailman/options/stable>,
<mailto:stable-request@linux.kernel.org?subject=unsubscribe>
List-Archive: <http://linux.kernel.org/mailman/private/stable/>
List-Post: <mailto:stable@linux.kernel.org>
List-Help: <mailto:stable-request@linux.kernel.org?subject=help>
List-Subscribe: <http://linux.kernel.org/mailman/listinfo/stable>,
<mailto:stable-request@linux.kernel.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: stable-bounces@linux.kernel.org
Errors-To: stable-bounces@linux.kernel.org
X-RedHat-Spam-Score: -2.31 (RCVD_IN_DNSWL_MED,T_RP_MATCHES_RCVD)
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
X-Scanned-By: MIMEDefang 2.68 on 10.5.110.18
From: Johannes Weiner <hannes@cmpxchg.org>
Johannes Weiner poined out that the logic in commit [1741c877: mm:
kswapd: keep kswapd awake for high-order allocations until a percentage
of the node is balanced] is backwards. Instead of allowing kswapd to go
to sleep when balancing for high order allocations, it keeps it kswapd
running uselessly.
Signed-off-by: Mel Gorman <mgorman@suse.de>
Reviewed-by: Rik van Riel <riel@redhat.com>
---
mm/vmscan.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 8bfd450..1aa262b 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2286,7 +2286,7 @@ static bool sleeping_prematurely(pg_data_t *pgdat, int order, long remaining,
* must be balanced
*/
if (order)
- return pgdat_balanced(pgdat, balanced, classzone_idx);
+ return !pgdat_balanced(pgdat, balanced, classzone_idx);
else
return !all_zones_ok;
}
--
1.7.3.4
_______________________________________________
stable mailing list
stable@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/stable

View File

@ -1,153 +0,0 @@
Return-Path: stable-bounces@linux.kernel.org
Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
mail02.corp.redhat.com with LMTP; Mon, 23 May 2011 05:54:49 -0400 (EDT)
Received: from localhost (localhost.localdomain [127.0.0.1])
by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 443AC9289D
for <cebbert@redhat.com>; Mon, 23 May 2011 05:54:49 -0400 (EDT)
Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id WTG56s2uAm8Z for <cebbert@redhat.com>;
Mon, 23 May 2011 05:54:49 -0400 (EDT)
Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 2D1D2906E4
for <cebbert@mail.corp.redhat.com>; Mon, 23 May 2011 05:54:49 -0400 (EDT)
Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com [10.5.110.16])
by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p4N9snmk002150
for <cebbert@redhat.com>; Mon, 23 May 2011 05:54:49 -0400
Received: from hera.kernel.org (hera.kernel.org [140.211.167.34])
by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4N9smZs008302
for <cebbert@redhat.com>; Mon, 23 May 2011 05:54:48 -0400
Received: from hera.kernel.org (localhost [127.0.0.1])
by hera.kernel.org (8.14.4/8.14.3) with ESMTP id p4N9sGZo010150;
Mon, 23 May 2011 09:54:16 GMT
X-Virus-Status: Clean
X-Virus-Scanned: clamav-milter 0.97 at hera.kernel.org
Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15])
by hera.kernel.org (8.14.4/8.14.3) with ESMTP id p4N9s1xm009737;
Mon, 23 May 2011 09:54:02 GMT
X-Virus-Status: Clean
X-Virus-Scanned: clamav-milter 0.97 at hera.kernel.org
Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2])
by mx2.suse.de (Postfix) with ESMTP id 2B4998FFEB;
Mon, 23 May 2011 11:54:01 +0200 (CEST)
From: Mel Gorman <mgorman@suse.de>
To: Andrew Morton <akpm@linux-foundation.org>
Date: Mon, 23 May 2011 10:53:55 +0100
Message-Id: <1306144435-2516-3-git-send-email-mgorman@suse.de>
In-Reply-To: <1306144435-2516-1-git-send-email-mgorman@suse.de>
References: <1306144435-2516-1-git-send-email-mgorman@suse.de>
X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED
autolearn=unavailable version=3.3.2-r929478
X-Spam-Checker-Version: SpamAssassin 3.3.2-r929478 (2010-03-31) on
hera.kernel.org
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (hera.kernel.org [127.0.0.1]); Mon, 23 May 2011 09:54:16 +0000 (UTC)
X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by
milter-greylist-4.2.3 (hera.kernel.org [140.211.167.34]);
Mon, 23 May 2011 09:54:03 +0000 (UTC)
Cc: Pekka Enberg <penberg@kernel.org>, Rik van Riel <riel@redhat.com>,
Jan Kara <jack@suse.cz>, linux-kernel <linux-kernel@vger.kernel.org>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
linux-mm <linux-mm@kvack.org>, Minchan Kim <minchan.kim@gmail.com>,
Raghavendra D Prabhu <raghu.prabhu13@gmail.com>,
Johannes Weiner <hannes@cmpxchg.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Colin King <colin.king@canonical.com>,
Christoph Lameter <cl@linux.com>,
linux-ext4 <linux-ext4@vger.kernel.org>, stable <stable@kernel.org>,
Chris Mason <chris.mason@oracle.com>, Mel Gorman <mgorman@suse.de>
Subject: [stable] [PATCH 2/2] mm: vmscan: Correctly check if reclaimer
should schedule during shrink_slab
X-BeenThere: stable@linux.kernel.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: For maintainers of the stable Linux series <stable.linux.kernel.org>
List-Unsubscribe: <http://linux.kernel.org/mailman/options/stable>,
<mailto:stable-request@linux.kernel.org?subject=unsubscribe>
List-Archive: <http://linux.kernel.org/mailman/private/stable/>
List-Post: <mailto:stable@linux.kernel.org>
List-Help: <mailto:stable-request@linux.kernel.org?subject=help>
List-Subscribe: <http://linux.kernel.org/mailman/listinfo/stable>,
<mailto:stable-request@linux.kernel.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: stable-bounces@linux.kernel.org
Errors-To: stable-bounces@linux.kernel.org
X-RedHat-Spam-Score: -2.31 (RCVD_IN_DNSWL_MED,T_RP_MATCHES_RCVD)
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
X-Scanned-By: MIMEDefang 2.68 on 10.5.110.16
It has been reported on some laptops that kswapd is consuming large
amounts of CPU and not being scheduled when SLUB is enabled during
large amounts of file copying. It is expected that this is due to
kswapd missing every cond_resched() point because;
shrink_page_list() calls cond_resched() if inactive pages were isolated
which in turn may not happen if all_unreclaimable is set in
shrink_zones(). If for whatver reason, all_unreclaimable is
set on all zones, we can miss calling cond_resched().
balance_pgdat() only calls cond_resched if the zones are not
balanced. For a high-order allocation that is balanced, it
checks order-0 again. During that window, order-0 might have
become unbalanced so it loops again for order-0 and returns
that it was reclaiming for order-0 to kswapd(). It can then
find that a caller has rewoken kswapd for a high-order and
re-enters balance_pgdat() without ever calling cond_resched().
shrink_slab only calls cond_resched() if we are reclaiming slab
pages. If there are a large number of direct reclaimers, the
shrinker_rwsem can be contended and prevent kswapd calling
cond_resched().
This patch modifies the shrink_slab() case. If the semaphore is
contended, the caller will still check cond_resched(). After each
successful call into a shrinker, the check for cond_resched() remains
in case one shrinker is particularly slow.
This patch replaces
mm-vmscan-if-kswapd-has-been-running-too-long-allow-it-to-sleep.patch
in -mm.
[mgorman@suse.de: Preserve call to cond_resched after each call into shrinker]
From: Minchan Kim <minchan.kim@gmail.com>
Signed-off-by: Mel Gorman <mgorman@suse.de>
---
mm/vmscan.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 1aa262b..cc1470b 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -230,8 +230,11 @@ unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask,
if (scanned == 0)
scanned = SWAP_CLUSTER_MAX;
- if (!down_read_trylock(&shrinker_rwsem))
- return 1; /* Assume we'll be able to shrink next time */
+ if (!down_read_trylock(&shrinker_rwsem)) {
+ /* Assume we'll be able to shrink next time */
+ ret = 1;
+ goto out;
+ }
list_for_each_entry(shrinker, &shrinker_list, list) {
unsigned long long delta;
@@ -282,6 +285,8 @@ unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask,
shrinker->nr += total_scan;
}
up_read(&shrinker_rwsem);
+out:
+ cond_resched();
return ret;
}
--
1.7.3.4
_______________________________________________
stable mailing list
stable@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/stable

View File

@ -1,2 +1,2 @@
7d471477bfa67546f902da62227fa976 linux-2.6.38.tar.bz2
2639b4b98a2dcfc8b7f091543f289205 patch-2.6.38.7.bz2
c0f416f6a2e916633f697287cc7cb914 patch-2.6.38.8.bz2