diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-07-09 00:37:07 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-07-09 00:37:07 -0700 |
commit | 14ca8419bc482ff643942bc379d912ead40ce058 (patch) | |
tree | 38f12d5ab1b79f54b8562ab2605ccd77a78e1054 | |
parent | c2831f9fea86dc7b2d47c3f5354f4b2db6fd4e82 (diff) | |
download | stable-queue-14ca8419bc482ff643942bc379d912ead40ce058.tar.gz |
.39 patches
7 files changed, 344 insertions, 0 deletions
diff --git a/queue-2.6.39/drm-radeon-kms-fix-typo-in-evergreen-disp-int-status.patch b/queue-2.6.39/drm-radeon-kms-fix-typo-in-evergreen-disp-int-status.patch new file mode 100644 index 0000000000..2787c3af67 --- /dev/null +++ b/queue-2.6.39/drm-radeon-kms-fix-typo-in-evergreen-disp-int-status.patch @@ -0,0 +1,29 @@ +From 37cba6c6f4687e694ac6e3adcf2c2b2974aa3aae Mon Sep 17 00:00:00 2001 +From: Alex Deucher <alexdeucher@gmail.com> +Date: Wed, 6 Jul 2011 19:37:47 +0000 +Subject: drm/radeon/kms: fix typo in evergreen disp int status + register + +From: Alex Deucher <alexdeucher@gmail.com> + +commit 37cba6c6f4687e694ac6e3adcf2c2b2974aa3aae upstream. + +Signed-off-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/evergreend.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/radeon/evergreend.h ++++ b/drivers/gpu/drm/radeon/evergreend.h +@@ -541,7 +541,7 @@ + # define LB_D5_VBLANK_INTERRUPT (1 << 3) + # define DC_HPD5_INTERRUPT (1 << 17) + # define DC_HPD5_RX_INTERRUPT (1 << 18) +-#define DISP_INTERRUPT_STATUS_CONTINUE5 0x6050 ++#define DISP_INTERRUPT_STATUS_CONTINUE5 0x6150 + # define LB_D6_VLINE_INTERRUPT (1 << 2) + # define LB_D6_VBLANK_INTERRUPT (1 << 3) + # define DC_HPD6_INTERRUPT (1 << 17) diff --git a/queue-2.6.39/drm-radeon-kms-fix-typo-in-ih_cntl-swap-bitfield.patch b/queue-2.6.39/drm-radeon-kms-fix-typo-in-ih_cntl-swap-bitfield.patch new file mode 100644 index 0000000000..ca4d5b0e14 --- /dev/null +++ b/queue-2.6.39/drm-radeon-kms-fix-typo-in-ih_cntl-swap-bitfield.patch @@ -0,0 +1,42 @@ +From fcb857abc4c0d512e99a08ba0415be9a6d65b4c0 Mon Sep 17 00:00:00 2001 +From: Alex Deucher <alexdeucher@gmail.com> +Date: Wed, 6 Jul 2011 19:52:27 +0000 +Subject: drm/radeon/kms: fix typo in IH_CNTL swap bitfield + +From: Alex Deucher <alexdeucher@gmail.com> + +commit fcb857abc4c0d512e99a08ba0415be9a6d65b4c0 upstream. + +Only affects BE systems. + +Signed-off-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/evergreend.h | 2 +- + drivers/gpu/drm/radeon/r600d.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/radeon/evergreend.h ++++ b/drivers/gpu/drm/radeon/evergreend.h +@@ -460,7 +460,7 @@ + #define IH_RB_WPTR_ADDR_LO 0x3e14 + #define IH_CNTL 0x3e18 + # define ENABLE_INTR (1 << 0) +-# define IH_MC_SWAP(x) ((x) << 2) ++# define IH_MC_SWAP(x) ((x) << 1) + # define IH_MC_SWAP_NONE 0 + # define IH_MC_SWAP_16BIT 1 + # define IH_MC_SWAP_32BIT 2 +--- a/drivers/gpu/drm/radeon/r600d.h ++++ b/drivers/gpu/drm/radeon/r600d.h +@@ -536,7 +536,7 @@ + #define IH_RB_WPTR_ADDR_LO 0x3e14 + #define IH_CNTL 0x3e18 + # define ENABLE_INTR (1 << 0) +-# define IH_MC_SWAP(x) ((x) << 2) ++# define IH_MC_SWAP(x) ((x) << 1) + # define IH_MC_SWAP_NONE 0 + # define IH_MC_SWAP_16BIT 1 + # define IH_MC_SWAP_32BIT 2 diff --git a/queue-2.6.39/drm-radeon-kms-free-ib-pool-on-module-unloading.patch b/queue-2.6.39/drm-radeon-kms-free-ib-pool-on-module-unloading.patch new file mode 100644 index 0000000000..c33e151455 --- /dev/null +++ b/queue-2.6.39/drm-radeon-kms-free-ib-pool-on-module-unloading.patch @@ -0,0 +1,65 @@ +From ccd6895d401efad0c0e41d0e93fba4ef3085e268 Mon Sep 17 00:00:00 2001 +From: Jerome Glisse <jglisse@redhat.com> +Date: Wed, 6 Jul 2011 18:30:09 +0000 +Subject: drm/radeon/kms: free ib pool on module unloading + +From: Jerome Glisse <jglisse@redhat.com> + +commit ccd6895d401efad0c0e41d0e93fba4ef3085e268 upstream. + +ib pool weren't free for various newer asic on module unload. +This doesn't cause much arm but still could be candidate for +stable. + +Signed-off-by: Jerome Glisse <jglisse@redhat.com> +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/evergreen.c | 1 + + drivers/gpu/drm/radeon/ni.c | 1 + + drivers/gpu/drm/radeon/r600.c | 1 + + drivers/gpu/drm/radeon/rv770.c | 1 + + 4 files changed, 4 insertions(+) + +--- a/drivers/gpu/drm/radeon/evergreen.c ++++ b/drivers/gpu/drm/radeon/evergreen.c +@@ -3150,6 +3150,7 @@ void evergreen_fini(struct radeon_device + r700_cp_fini(rdev); + r600_irq_fini(rdev); + radeon_wb_fini(rdev); ++ radeon_ib_pool_fini(rdev); + radeon_irq_kms_fini(rdev); + evergreen_pcie_gart_fini(rdev); + radeon_gem_fini(rdev); +--- a/drivers/gpu/drm/radeon/ni.c ++++ b/drivers/gpu/drm/radeon/ni.c +@@ -1584,6 +1584,7 @@ void cayman_fini(struct radeon_device *r + cayman_cp_fini(rdev); + r600_irq_fini(rdev); + radeon_wb_fini(rdev); ++ radeon_ib_pool_fini(rdev); + radeon_irq_kms_fini(rdev); + cayman_pcie_gart_fini(rdev); + radeon_gem_fini(rdev); +--- a/drivers/gpu/drm/radeon/r600.c ++++ b/drivers/gpu/drm/radeon/r600.c +@@ -2613,6 +2613,7 @@ void r600_fini(struct radeon_device *rde + r600_cp_fini(rdev); + r600_irq_fini(rdev); + radeon_wb_fini(rdev); ++ radeon_ib_pool_fini(rdev); + radeon_irq_kms_fini(rdev); + r600_pcie_gart_fini(rdev); + radeon_agp_fini(rdev); +--- a/drivers/gpu/drm/radeon/rv770.c ++++ b/drivers/gpu/drm/radeon/rv770.c +@@ -1365,6 +1365,7 @@ void rv770_fini(struct radeon_device *rd + r700_cp_fini(rdev); + r600_irq_fini(rdev); + radeon_wb_fini(rdev); ++ radeon_ib_pool_fini(rdev); + radeon_irq_kms_fini(rdev); + rv770_pcie_gart_fini(rdev); + rv770_vram_scratch_fini(rdev); diff --git a/queue-2.6.39/mm-nommu.c-fix-remap_pfn_range.patch b/queue-2.6.39/mm-nommu.c-fix-remap_pfn_range.patch new file mode 100644 index 0000000000..9ff48fe34e --- /dev/null +++ b/queue-2.6.39/mm-nommu.c-fix-remap_pfn_range.patch @@ -0,0 +1,53 @@ +From 8f3b1327aa454bc8283e96bca7669c3c88b83f79 Mon Sep 17 00:00:00 2001 +From: Bob Liu <lliubbo@gmail.com> +Date: Fri, 8 Jul 2011 15:39:46 -0700 +Subject: mm/nommu.c: fix remap_pfn_range() + +From: Bob Liu <lliubbo@gmail.com> + +commit 8f3b1327aa454bc8283e96bca7669c3c88b83f79 upstream. + +remap_pfn_range() means map physical address pfn<<PAGE_SHIFT to user addr. + +For nommu arch it's implemented by vma->vm_start = pfn << PAGE_SHIFT which +is wrong acroding the original meaning of this function. And some driver +developer using remap_pfn_range() with correct parameter will get +unexpected result because vm_start is changed. It should be implementd +like addr = pfn << PAGE_SHIFT but which is meanless on nommu arch, this +patch just make it simply return. + +Parameter name and setting of vma->vm_flags also be fixed. + +Signed-off-by: Bob Liu <lliubbo@gmail.com> +Cc: Geert Uytterhoeven <geert@linux-m68k.org> +Cc: David Howells <dhowells@redhat.com> +Acked-by: Greg Ungerer <gerg@uclinux.org> +Cc: Mike Frysinger <vapier@gentoo.org> +Cc: Bob Liu <lliubbo@gmail.com> +Signed-off-by: Andrew Morton <akpm@linux-foundation.org> +Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + mm/nommu.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +--- a/mm/nommu.c ++++ b/mm/nommu.c +@@ -1819,10 +1819,13 @@ struct page *follow_page(struct vm_area_ + return NULL; + } + +-int remap_pfn_range(struct vm_area_struct *vma, unsigned long from, +- unsigned long to, unsigned long size, pgprot_t prot) ++int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr, ++ unsigned long pfn, unsigned long size, pgprot_t prot) + { +- vma->vm_start = vma->vm_pgoff << PAGE_SHIFT; ++ if (addr != (pfn << PAGE_SHIFT)) ++ return -EINVAL; ++ ++ vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP; + return 0; + } + EXPORT_SYMBOL(remap_pfn_range); diff --git a/queue-2.6.39/mm-vmscan-correct-check-for-kswapd-sleeping-in.patch b/queue-2.6.39/mm-vmscan-correct-check-for-kswapd-sleeping-in.patch new file mode 100644 index 0000000000..ad6230fd01 --- /dev/null +++ b/queue-2.6.39/mm-vmscan-correct-check-for-kswapd-sleeping-in.patch @@ -0,0 +1,101 @@ +From 08951e545918c1594434d000d88a7793e2452a9b Mon Sep 17 00:00:00 2001 +From: Mel Gorman <mgorman@suse.de> +Date: Fri, 8 Jul 2011 15:39:36 -0700 +Subject: mm: vmscan: correct check for kswapd sleeping in + sleeping_prematurely +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Mel Gorman <mgorman@suse.de> + +commit 08951e545918c1594434d000d88a7793e2452a9b upstream. + +During allocator-intensive workloads, kswapd will be woken frequently +causing free memory to oscillate between the high and min watermark. This +is expected behaviour. Unfortunately, if the highest zone is small, a +problem occurs. + +This seems to happen most with recent sandybridge laptops but it's +probably a co-incidence as some of these laptops just happen to have a +small Normal zone. The reproduction case is almost always during copying +large files that kswapd pegs at 100% CPU until the file is deleted or +cache is dropped. + +The problem is mostly down to sleeping_prematurely() keeping kswapd awake +when the highest zone is small and unreclaimable and compounded by the +fact we shrink slabs even when not shrinking zones causing a lot of time +to be spent in shrinkers and a lot of memory to be reclaimed. + +Patch 1 corrects sleeping_prematurely to check the zones matching + the classzone_idx instead of all zones. + +Patch 2 avoids shrinking slab when we are not shrinking a zone. + +Patch 3 notes that sleeping_prematurely is checking lower zones against + a high classzone which is not what allocators or balance_pgdat() + is doing leading to an artifical belief that kswapd should be + still awake. + +Patch 4 notes that when balance_pgdat() gives up on a high zone that the + decision is not communicated to sleeping_prematurely() + +This problem affects 2.6.38.8 for certain and is expected to affect 2.6.39 +and 3.0-rc4 as well. If accepted, they need to go to -stable to be picked +up by distros and this series is against 3.0-rc4. I've cc'd people that +reported similar problems recently to see if they still suffer from the +problem and if this fixes it. + +This patch: correct the check for kswapd sleeping in sleeping_prematurely() + +During allocator-intensive workloads, kswapd will be woken frequently +causing free memory to oscillate between the high and min watermark. This +is expected behaviour. + +A problem occurs if the highest zone is small. balance_pgdat() only +considers unreclaimable zones when priority is DEF_PRIORITY but +sleeping_prematurely considers all zones. It's possible for this sequence +to occur + + 1. kswapd wakes up and enters balance_pgdat() + 2. At DEF_PRIORITY, marks highest zone unreclaimable + 3. At DEF_PRIORITY-1, ignores highest zone setting end_zone + 4. At DEF_PRIORITY-1, calls shrink_slab freeing memory from + highest zone, clearing all_unreclaimable. Highest zone + is still unbalanced + 5. kswapd returns and calls sleeping_prematurely + 6. sleeping_prematurely looks at *all* zones, not just the ones + being considered by balance_pgdat. The highest small zone + has all_unreclaimable cleared but the zone is not + balanced. all_zones_ok is false so kswapd stays awake + +This patch corrects the behaviour of sleeping_prematurely to check the +zones balance_pgdat() checked. + +Signed-off-by: Mel Gorman <mgorman@suse.de> +Reported-by: Pádraig Brady <P@draigBrady.com> +Tested-by: Pádraig Brady <P@draigBrady.com> +Tested-by: Andrew Lutomirski <luto@mit.edu> +Acked-by: Rik van Riel <riel@redhat.com> +Reviewed-by: Minchan Kim <minchan.kim@gmail.com> +Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> +Cc: Johannes Weiner <hannes@cmpxchg.org> +Signed-off-by: Andrew Morton <akpm@linux-foundation.org> +Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + mm/vmscan.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/mm/vmscan.c ++++ b/mm/vmscan.c +@@ -2261,7 +2261,7 @@ static bool sleeping_prematurely(pg_data + return true; + + /* Check the watermark levels */ +- for (i = 0; i < pgdat->nr_zones; i++) { ++ for (i = 0; i <= classzone_idx; i++) { + struct zone *zone = pgdat->node_zones + i; + + if (!populated_zone(zone)) diff --git a/queue-2.6.39/mm-vmscan-evaluate-the-watermarks-against-the-correct.patch b/queue-2.6.39/mm-vmscan-evaluate-the-watermarks-against-the-correct.patch new file mode 100644 index 0000000000..5410e291d6 --- /dev/null +++ b/queue-2.6.39/mm-vmscan-evaluate-the-watermarks-against-the-correct.patch @@ -0,0 +1,48 @@ +From da175d06b437093f93109ba9e5efbe44dfdf9409 Mon Sep 17 00:00:00 2001 +From: Mel Gorman <mgorman@suse.de> +Date: Fri, 8 Jul 2011 15:39:39 -0700 +Subject: mm: vmscan: evaluate the watermarks against the correct + classzone +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Mel Gorman <mgorman@suse.de> + +commit da175d06b437093f93109ba9e5efbe44dfdf9409 upstream. + +When deciding if kswapd is sleeping prematurely, the classzone is taken +into account but this is different to what balance_pgdat() and the +allocator are doing. Specifically, the DMA zone will be checked based on +the classzone used when waking kswapd which could be for a GFP_KERNEL or +GFP_HIGHMEM request. The lowmem reserve limit kicks in, the watermark is +not met and kswapd thinks it's sleeping prematurely keeping kswapd awake in +error. + +Signed-off-by: Mel Gorman <mgorman@suse.de> +Reported-by: Pádraig Brady <P@draigBrady.com> +Tested-by: Pádraig Brady <P@draigBrady.com> +Tested-by: Andrew Lutomirski <luto@mit.edu> +Acked-by: Rik van Riel <riel@redhat.com> +Reviewed-by: Minchan Kim <minchan.kim@gmail.com> +Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> +Cc: Johannes Weiner <hannes@cmpxchg.org> +Signed-off-by: Andrew Morton <akpm@linux-foundation.org> +Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + mm/vmscan.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/mm/vmscan.c ++++ b/mm/vmscan.c +@@ -2279,7 +2279,7 @@ static bool sleeping_prematurely(pg_data + } + + if (!zone_watermark_ok_safe(zone, order, high_wmark_pages(zone), +- classzone_idx, 0)) ++ i, 0)) + all_zones_ok = false; + else + balanced += zone->present_pages; diff --git a/queue-2.6.39/series b/queue-2.6.39/series new file mode 100644 index 0000000000..af1360cff3 --- /dev/null +++ b/queue-2.6.39/series @@ -0,0 +1,6 @@ +drm-radeon-kms-free-ib-pool-on-module-unloading.patch +drm-radeon-kms-fix-typo-in-evergreen-disp-int-status.patch +drm-radeon-kms-fix-typo-in-ih_cntl-swap-bitfield.patch +mm-vmscan-correct-check-for-kswapd-sleeping-in.patch +mm-nommu.c-fix-remap_pfn_range.patch +mm-vmscan-evaluate-the-watermarks-against-the-correct.patch |