From fdbb78644dbaf059d775b6d69ce5370d9a3b2ced Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 21 Sep 2012 11:37:20 -0700 Subject: [PATCH] 3.0-stable patches added patches: can-mcp251x-avoid-repeated-frame-bug.patch drivers-rtc-rtc-twl.c-ensure-all-interrupts-are-disabled-during-probe.patch hwmon-twl4030-madc-hwmon-initialize-uninitialized-structure-elements.patch md-don-t-truncate-size-at-4tb-for-raid0-and-linear.patch md-make-sure-metadata-is-updated-when-spares-are-activated-or-removed.patch memory-hotplug-fix-section-info-double-registration-bug.patch mm-ia64-fix-a-memory-block-size-bug.patch mm-page_alloc-fix-the-page-address-of-higher-page-s-buddy-calculation.patch sched-add-missing-call-to-calc_load_exit_idle.patch --- ...can-mcp251x-avoid-repeated-frame-bug.patch | 58 ++++++++++++++ ...interrupts-are-disabled-during-probe.patch | 54 +++++++++++++ ...ize-uninitialized-structure-elements.patch | 44 +++++++++++ ...ate-size-at-4tb-for-raid0-and-linear.patch | 58 ++++++++++++++ ...when-spares-are-activated-or-removed.patch | 60 +++++++++++++++ ...section-info-double-registration-bug.patch | 77 +++++++++++++++++++ .../mm-ia64-fix-a-memory-block-size-bug.patch | 63 +++++++++++++++ ...s-of-higher-page-s-buddy-calculation.patch | 46 +++++++++++ ...-missing-call-to-calc_load_exit_idle.patch | 42 ++++++++++ queue-3.0/series | 9 +++ 10 files changed, 511 insertions(+) create mode 100644 queue-3.0/can-mcp251x-avoid-repeated-frame-bug.patch create mode 100644 queue-3.0/drivers-rtc-rtc-twl.c-ensure-all-interrupts-are-disabled-during-probe.patch create mode 100644 queue-3.0/hwmon-twl4030-madc-hwmon-initialize-uninitialized-structure-elements.patch create mode 100644 queue-3.0/md-don-t-truncate-size-at-4tb-for-raid0-and-linear.patch create mode 100644 queue-3.0/md-make-sure-metadata-is-updated-when-spares-are-activated-or-removed.patch create mode 100644 queue-3.0/memory-hotplug-fix-section-info-double-registration-bug.patch create mode 100644 queue-3.0/mm-ia64-fix-a-memory-block-size-bug.patch create mode 100644 queue-3.0/mm-page_alloc-fix-the-page-address-of-higher-page-s-buddy-calculation.patch create mode 100644 queue-3.0/sched-add-missing-call-to-calc_load_exit_idle.patch diff --git a/queue-3.0/can-mcp251x-avoid-repeated-frame-bug.patch b/queue-3.0/can-mcp251x-avoid-repeated-frame-bug.patch new file mode 100644 index 00000000000..f885b69d616 --- /dev/null +++ b/queue-3.0/can-mcp251x-avoid-repeated-frame-bug.patch @@ -0,0 +1,58 @@ +From cab32f39dcc5b35db96497dc0a026b5dea76e4e7 Mon Sep 17 00:00:00 2001 +From: Benoît Locher +Date: Mon, 27 Aug 2012 15:02:45 +0200 +Subject: can: mcp251x: avoid repeated frame bug + +From: Benoît Locher + +commit cab32f39dcc5b35db96497dc0a026b5dea76e4e7 upstream. + +The MCP2515 has a silicon bug causing repeated frame transmission, see section +5 of MCP2515 Rev. B Silicon Errata Revision G (March 2007). + +Basically, setting TXBnCTRL.TXREQ in either SPI mode (00 or 11) will eventually +cause the bug. The workaround proposed by Microchip is to use mode 00 and send +a RTS command on the SPI bus to initiate the transmission. + +Signed-off-by: Benoît Locher +Signed-off-by: Marc Kleine-Budde +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/can/mcp251x.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +--- a/drivers/net/can/mcp251x.c ++++ b/drivers/net/can/mcp251x.c +@@ -83,6 +83,11 @@ + #define INSTRUCTION_LOAD_TXB(n) (0x40 + 2 * (n)) + #define INSTRUCTION_READ_RXB(n) (((n) == 0) ? 0x90 : 0x94) + #define INSTRUCTION_RESET 0xC0 ++#define RTS_TXB0 0x01 ++#define RTS_TXB1 0x02 ++#define RTS_TXB2 0x04 ++#define INSTRUCTION_RTS(n) (0x80 | ((n) & 0x07)) ++ + + /* MPC251x registers */ + #define CANSTAT 0x0e +@@ -397,6 +402,7 @@ static void mcp251x_hw_tx_frame(struct s + static void mcp251x_hw_tx(struct spi_device *spi, struct can_frame *frame, + int tx_buf_idx) + { ++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev); + u32 sid, eid, exide, rtr; + u8 buf[SPI_TRANSFER_BUF_LEN]; + +@@ -418,7 +424,10 @@ static void mcp251x_hw_tx(struct spi_dev + buf[TXBDLC_OFF] = (rtr << DLC_RTR_SHIFT) | frame->can_dlc; + memcpy(buf + TXBDAT_OFF, frame->data, frame->can_dlc); + mcp251x_hw_tx_frame(spi, buf, frame->can_dlc, tx_buf_idx); +- mcp251x_write_reg(spi, TXBCTRL(tx_buf_idx), TXBCTRL_TXREQ); ++ ++ /* use INSTRUCTION_RTS, to avoid "repeated frame problem" */ ++ priv->spi_tx_buf[0] = INSTRUCTION_RTS(1 << tx_buf_idx); ++ mcp251x_spi_trans(priv->spi, 1); + } + + static void mcp251x_hw_rx_frame(struct spi_device *spi, u8 *buf, diff --git a/queue-3.0/drivers-rtc-rtc-twl.c-ensure-all-interrupts-are-disabled-during-probe.patch b/queue-3.0/drivers-rtc-rtc-twl.c-ensure-all-interrupts-are-disabled-during-probe.patch new file mode 100644 index 00000000000..19e82787bb4 --- /dev/null +++ b/queue-3.0/drivers-rtc-rtc-twl.c-ensure-all-interrupts-are-disabled-during-probe.patch @@ -0,0 +1,54 @@ +From 8dcebaa9a0ae8a0487f4342f3d56d2cb1c980860 Mon Sep 17 00:00:00 2001 +From: Kevin Hilman +Date: Mon, 17 Sep 2012 14:09:17 -0700 +Subject: drivers/rtc/rtc-twl.c: ensure all interrupts are disabled during probe + +From: Kevin Hilman + +commit 8dcebaa9a0ae8a0487f4342f3d56d2cb1c980860 upstream. + +On some platforms, bootloaders are known to do some interesting RTC +programming. Without going into the obscurities as to why this may be +the case, suffice it to say the the driver should not make any +assumptions about the state of the RTC when the driver loads. In +particular, the driver probe should be sure that all interrupts are +disabled until otherwise programmed. + +This was discovered when finding bursty I2C traffic every second on +Overo platforms. This I2C overhead was keeping the SoC from hitting +deep power states. The cause was found to be the RTC firing every +second on the I2C-connected TWL PMIC. + +Special thanks to Felipe Balbi for suggesting to look for a rogue driver +as the source of the I2C traffic rather than the I2C driver itself. + +Special thanks to Steve Sakoman for helping track down the source of the +continuous RTC interrups on the Overo boards. + +Signed-off-by: Kevin Hilman +Cc: Felipe Balbi +Tested-by: Steve Sakoman +Cc: Alessandro Zummo +Tested-by: Shubhrajyoti Datta +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/rtc/rtc-twl.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/rtc/rtc-twl.c ++++ b/drivers/rtc/rtc-twl.c +@@ -490,6 +490,11 @@ static int __devinit twl_rtc_probe(struc + goto out2; + } + ++ /* ensure interrupts are disabled, bootloaders can be strange */ ++ ret = twl_rtc_write_u8(0, REG_RTC_INTERRUPTS_REG); ++ if (ret < 0) ++ dev_warn(&pdev->dev, "unable to disable interrupt\n"); ++ + /* init cached IRQ enable bits */ + ret = twl_rtc_read_u8(&rtc_irq_bits, REG_RTC_INTERRUPTS_REG); + if (ret < 0) diff --git a/queue-3.0/hwmon-twl4030-madc-hwmon-initialize-uninitialized-structure-elements.patch b/queue-3.0/hwmon-twl4030-madc-hwmon-initialize-uninitialized-structure-elements.patch new file mode 100644 index 00000000000..b6a5f7e1c6f --- /dev/null +++ b/queue-3.0/hwmon-twl4030-madc-hwmon-initialize-uninitialized-structure-elements.patch @@ -0,0 +1,44 @@ +From 73d7c119255615a26070f9d6cdb722a166a29015 Mon Sep 17 00:00:00 2001 +From: Guenter Roeck +Date: Tue, 19 Jun 2012 08:00:00 -0700 +Subject: hwmon: (twl4030-madc-hwmon) Initialize uninitialized structure elements + +From: Guenter Roeck + +commit 73d7c119255615a26070f9d6cdb722a166a29015 upstream. + +twl4030_madc_conversion uses do_avg and type structure elements of +twl4030_madc_request. Initialize structure to avoid random operation. + +Fix for: Coverity CID 200794 Uninitialized scalar variable. + +Cc: Keerthy +Signed-off-by: Guenter Roeck +Acked-by: Jean Delvare +Acked-by: Keerthy +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hwmon/twl4030-madc-hwmon.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +--- a/drivers/hwmon/twl4030-madc-hwmon.c ++++ b/drivers/hwmon/twl4030-madc-hwmon.c +@@ -44,12 +44,13 @@ static ssize_t madc_read(struct device * + struct device_attribute *devattr, char *buf) + { + struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); +- struct twl4030_madc_request req; ++ struct twl4030_madc_request req = { ++ .channels = 1 << attr->index, ++ .method = TWL4030_MADC_SW2, ++ .type = TWL4030_MADC_WAIT, ++ }; + long val; + +- req.channels = (1 << attr->index); +- req.method = TWL4030_MADC_SW2; +- req.func_cb = NULL; + val = twl4030_madc_conversion(&req); + if (val < 0) + return val; diff --git a/queue-3.0/md-don-t-truncate-size-at-4tb-for-raid0-and-linear.patch b/queue-3.0/md-don-t-truncate-size-at-4tb-for-raid0-and-linear.patch new file mode 100644 index 00000000000..8281f865ccd --- /dev/null +++ b/queue-3.0/md-don-t-truncate-size-at-4tb-for-raid0-and-linear.patch @@ -0,0 +1,58 @@ +From 667a5313ecd7308d79629c0738b0db588b0b0a4e Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Thu, 16 Aug 2012 16:46:12 +1000 +Subject: md: Don't truncate size at 4TB for RAID0 and Linear + +From: NeilBrown + +commit 667a5313ecd7308d79629c0738b0db588b0b0a4e upstream. + +commit 27a7b260f71439c40546b43588448faac01adb93 + md: Fix handling for devices from 2TB to 4TB in 0.90 metadata. + +changed 0.90 metadata handling to truncated size to 4TB as that is +all that 0.90 can record. +However for RAID0 and Linear, 0.90 doesn't need to record the size, so +this truncation is not needed and causes working arrays to become too small. + +So avoid the truncation for RAID0 and Linear + +This bug was introduced in 3.1 and is suitable for any stable kernels +from then onwards. +As the offending commit was tagged for 'stable', any stable kernel +that it was applied to should also get this patch. That includes +at least 2.6.32, 2.6.33 and 3.0. (Thanks to Ben Hutchings for +providing that list). + +Signed-off-by: Neil Brown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/md.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +--- a/drivers/md/md.c ++++ b/drivers/md/md.c +@@ -1096,8 +1096,11 @@ static int super_90_load(mdk_rdev_t *rde + ret = 0; + } + rdev->sectors = rdev->sb_start; +- /* Limit to 4TB as metadata cannot record more than that */ +- if (rdev->sectors >= (2ULL << 32)) ++ /* Limit to 4TB as metadata cannot record more than that. ++ * (not needed for Linear and RAID0 as metadata doesn't ++ * record this size) ++ */ ++ if (rdev->sectors >= (2ULL << 32) && sb->level >= 1) + rdev->sectors = (2ULL << 32) - 2; + + if (rdev->sectors < ((sector_t)sb->size) * 2 && sb->level >= 1) +@@ -1379,7 +1382,7 @@ super_90_rdev_size_change(mdk_rdev_t *rd + /* Limit to 4TB as metadata cannot record more than that. + * 4TB == 2^32 KB, or 2*2^32 sectors. + */ +- if (num_sectors >= (2ULL << 32)) ++ if (num_sectors >= (2ULL << 32) && rdev->mddev->level >= 1) + num_sectors = (2ULL << 32) - 2; + md_super_write(rdev->mddev, rdev, rdev->sb_start, rdev->sb_size, + rdev->sb_page); diff --git a/queue-3.0/md-make-sure-metadata-is-updated-when-spares-are-activated-or-removed.patch b/queue-3.0/md-make-sure-metadata-is-updated-when-spares-are-activated-or-removed.patch new file mode 100644 index 00000000000..da42ef428da --- /dev/null +++ b/queue-3.0/md-make-sure-metadata-is-updated-when-spares-are-activated-or-removed.patch @@ -0,0 +1,60 @@ +From 6dafab6b1383e912cd252fa809570b484eb6e0dc Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Wed, 19 Sep 2012 12:54:22 +1000 +Subject: md: make sure metadata is updated when spares are activated or removed. + +From: NeilBrown + +commit 6dafab6b1383e912cd252fa809570b484eb6e0dc upstream. + +It isn't always necessary to update the metadata when spares are +removed as the presence-or-not of a spare isn't really important to +the integrity of an array. +Also activating a spare doesn't always require updating the metadata +as the update on 'recovery-completed' is usually sufficient. + +However the introduction of 'replacement' devices have made these +transitions sometimes more important. For example the 'Replacement' +flag isn't cleared until the original device is removed, so we need +to ensure a metadata update after that 'spare' is removed. + +So set MD_CHANGE_DEVS whenever a spare is activated or removed, to +complement the current situation where it is set when a spare is added +or a device is failed (or a number of other less common situations). + +This is suitable for -stable as out-of-data metadata could lead +to data corruption. +This is only relevant for 3.3 and later 9when 'replacement' as +introduced. + +Signed-off-by: NeilBrown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/md.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/drivers/md/md.c ++++ b/drivers/md/md.c +@@ -7139,6 +7139,8 @@ static int remove_and_add_spares(mddev_t + } + } + } ++ if (removed) ++ set_bit(MD_CHANGE_DEVS, &mddev->flags); + return spares; + } + +@@ -7152,9 +7154,11 @@ static void reap_sync_thread(mddev_t *md + !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) { + /* success...*/ + /* activate any spares */ +- if (mddev->pers->spare_active(mddev)) ++ if (mddev->pers->spare_active(mddev)) { + sysfs_notify(&mddev->kobj, NULL, + "degraded"); ++ set_bit(MD_CHANGE_DEVS, &mddev->flags); ++ } + } + if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery) && + mddev->pers->finish_reshape) diff --git a/queue-3.0/memory-hotplug-fix-section-info-double-registration-bug.patch b/queue-3.0/memory-hotplug-fix-section-info-double-registration-bug.patch new file mode 100644 index 00000000000..44010377b12 --- /dev/null +++ b/queue-3.0/memory-hotplug-fix-section-info-double-registration-bug.patch @@ -0,0 +1,77 @@ +From f14851af0ebb32745c6c5a2e400aa0549f9d20df Mon Sep 17 00:00:00 2001 +From: qiuxishi +Date: Mon, 17 Sep 2012 14:09:24 -0700 +Subject: memory hotplug: fix section info double registration bug + +From: qiuxishi + +commit f14851af0ebb32745c6c5a2e400aa0549f9d20df upstream. + +There may be a bug when registering section info. For example, on my +Itanium platform, the pfn range of node0 includes the other nodes, so +other nodes' section info will be double registered, and memmap's page +count will equal to 3. + + node0: start_pfn=0x100, spanned_pfn=0x20fb00, present_pfn=0x7f8a3, => 0x000100-0x20fc00 + node1: start_pfn=0x80000, spanned_pfn=0x80000, present_pfn=0x80000, => 0x080000-0x100000 + node2: start_pfn=0x100000, spanned_pfn=0x80000, present_pfn=0x80000, => 0x100000-0x180000 + node3: start_pfn=0x180000, spanned_pfn=0x80000, present_pfn=0x80000, => 0x180000-0x200000 + + free_all_bootmem_node() + register_page_bootmem_info_node() + register_page_bootmem_info_section() + +When hot remove memory, we can't free the memmap's page because +page_count() is 2 after put_page_bootmem(). + + sparse_remove_one_section() + free_section_usemap() + free_map_bootmem() + put_page_bootmem() + +[akpm@linux-foundation.org: add code comment] +Signed-off-by: Xishi Qiu +Signed-off-by: Jiang Liu +Acked-by: Mel Gorman +Cc: "Luck, Tony" +Cc: Yasuaki Ishimatsu +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/memory_hotplug.c | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +--- a/mm/memory_hotplug.c ++++ b/mm/memory_hotplug.c +@@ -116,9 +116,6 @@ static void register_page_bootmem_info_s + struct mem_section *ms; + struct page *page, *memmap; + +- if (!pfn_valid(start_pfn)) +- return; +- + section_nr = pfn_to_section_nr(start_pfn); + ms = __nr_to_section(section_nr); + +@@ -177,9 +174,16 @@ void register_page_bootmem_info_node(str + end_pfn = pfn + pgdat->node_spanned_pages; + + /* register_section info */ +- for (; pfn < end_pfn; pfn += PAGES_PER_SECTION) +- register_page_bootmem_info_section(pfn); +- ++ for (; pfn < end_pfn; pfn += PAGES_PER_SECTION) { ++ /* ++ * Some platforms can assign the same pfn to multiple nodes - on ++ * node0 as well as nodeN. To avoid registering a pfn against ++ * multiple nodes we check that this pfn does not already ++ * reside in some other node. ++ */ ++ if (pfn_valid(pfn) && (pfn_to_nid(pfn) == node)) ++ register_page_bootmem_info_section(pfn); ++ } + } + #endif /* !CONFIG_SPARSEMEM_VMEMMAP */ + diff --git a/queue-3.0/mm-ia64-fix-a-memory-block-size-bug.patch b/queue-3.0/mm-ia64-fix-a-memory-block-size-bug.patch new file mode 100644 index 00000000000..c16d3fd5e58 --- /dev/null +++ b/queue-3.0/mm-ia64-fix-a-memory-block-size-bug.patch @@ -0,0 +1,63 @@ +From 05cf96398e1b6502f9e191291b715c7463c9d5dd Mon Sep 17 00:00:00 2001 +From: Jianguo Wu +Date: Mon, 17 Sep 2012 14:08:56 -0700 +Subject: mm/ia64: fix a memory block size bug + +From: Jianguo Wu + +commit 05cf96398e1b6502f9e191291b715c7463c9d5dd upstream. + +I found following definition in include/linux/memory.h, in my IA64 +platform, SECTION_SIZE_BITS is equal to 32, and MIN_MEMORY_BLOCK_SIZE +will be 0. + + #define MIN_MEMORY_BLOCK_SIZE (1 << SECTION_SIZE_BITS) + +Because MIN_MEMORY_BLOCK_SIZE is int type and length of 32bits, +so MIN_MEMORY_BLOCK_SIZE(1 << 32) will will equal to 0. +Actually when SECTION_SIZE_BITS >= 31, MIN_MEMORY_BLOCK_SIZE will be wrong. +This will cause wrong system memory infomation in sysfs. +I think it should be: + + #define MIN_MEMORY_BLOCK_SIZE (1UL << SECTION_SIZE_BITS) + +And "echo offline > memory0/state" will cause following call trace: + + kernel BUG at mm/memory_hotplug.c:885! + sh[6455]: bugcheck! 0 [1] + Pid: 6455, CPU 0, comm: sh + psr : 0000101008526030 ifs : 8000000000000fa4 ip : [] Not tainted (3.6.0-rc1) + ip is at offline_pages+0x210/0xee0 + Call Trace: + show_stack+0x80/0xa0 + show_regs+0x640/0x920 + die+0x190/0x2c0 + die_if_kernel+0x50/0x80 + ia64_bad_break+0x3d0/0x6e0 + ia64_native_leave_kernel+0x0/0x270 + offline_pages+0x210/0xee0 + alloc_pages_current+0x180/0x2a0 + +Signed-off-by: Jianguo Wu +Signed-off-by: Jiang Liu +Cc: "Luck, Tony" +Reviewed-by: Michal Hocko +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/memory.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/include/linux/memory.h ++++ b/include/linux/memory.h +@@ -20,7 +20,7 @@ + #include + #include + +-#define MIN_MEMORY_BLOCK_SIZE (1 << SECTION_SIZE_BITS) ++#define MIN_MEMORY_BLOCK_SIZE (1UL << SECTION_SIZE_BITS) + + struct memory_block { + unsigned long start_section_nr; diff --git a/queue-3.0/mm-page_alloc-fix-the-page-address-of-higher-page-s-buddy-calculation.patch b/queue-3.0/mm-page_alloc-fix-the-page-address-of-higher-page-s-buddy-calculation.patch new file mode 100644 index 00000000000..693b2efe71d --- /dev/null +++ b/queue-3.0/mm-page_alloc-fix-the-page-address-of-higher-page-s-buddy-calculation.patch @@ -0,0 +1,46 @@ +From 0ba8f2d59304dfe69b59c034de723ad80f7ab9ac Mon Sep 17 00:00:00 2001 +From: Li Haifeng +Date: Mon, 17 Sep 2012 14:09:21 -0700 +Subject: mm/page_alloc: fix the page address of higher page's buddy calculation + +From: Li Haifeng + +commit 0ba8f2d59304dfe69b59c034de723ad80f7ab9ac upstream. + +The heuristic method for buddy has been introduced since commit +43506fad21ca ("mm/page_alloc.c: simplify calculation of combined index +of adjacent buddy lists"). But the page address of higher page's buddy +was wrongly calculated, which will lead page_is_buddy to fail for ever. +IOW, the heuristic method would be disabled with the wrong page address +of higher page's buddy. + +Calculating the page address of higher page's buddy should be based +higher_page with the offset between index of higher page and index of +higher page's buddy. + +Signed-off-by: Haifeng Li +Signed-off-by: Gavin Shan +Reviewed-by: Michal Hocko +Cc: KyongHo Cho +Cc: Mel Gorman +Cc: Minchan Kim +Cc: Johannes Weiner +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/page_alloc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/mm/page_alloc.c ++++ b/mm/page_alloc.c +@@ -540,7 +540,7 @@ static inline void __free_one_page(struc + combined_idx = buddy_idx & page_idx; + higher_page = page + (combined_idx - page_idx); + buddy_idx = __find_buddy_index(combined_idx, order + 1); +- higher_buddy = page + (buddy_idx - combined_idx); ++ higher_buddy = higher_page + (buddy_idx - combined_idx); + if (page_is_buddy(higher_page, higher_buddy, order + 1)) { + list_add_tail(&page->lru, + &zone->free_area[order].free_list[migratetype]); diff --git a/queue-3.0/sched-add-missing-call-to-calc_load_exit_idle.patch b/queue-3.0/sched-add-missing-call-to-calc_load_exit_idle.patch new file mode 100644 index 00000000000..3864c980945 --- /dev/null +++ b/queue-3.0/sched-add-missing-call-to-calc_load_exit_idle.patch @@ -0,0 +1,42 @@ +From 749c8814f08f12baa4a9c2812a7c6ede7d69507d Mon Sep 17 00:00:00 2001 +From: Charles Wang +Date: Mon, 20 Aug 2012 16:02:33 +0800 +Subject: sched: Add missing call to calc_load_exit_idle() + +From: Charles Wang + +commit 749c8814f08f12baa4a9c2812a7c6ede7d69507d upstream. + +Azat Khuzhin reported high loadavg in Linux v3.6 + +After checking the upstream scheduler code, I found Peter's commit: + + 5167e8d5417b sched/nohz: Rewrite and fix load-avg computation -- again + +not fully applied, missing the call to calc_load_exit_idle(). + +After that idle exit in sampling window will always be calculated +to non-idle, and the load will be higher than normal. + +This patch adds the missing call to calc_load_exit_idle(). + +Signed-off-by: Charles Wang +Signed-off-by: Peter Zijlstra +Link: http://lkml.kernel.org/r/1345449754-27130-1-git-send-email-muming.wq@gmail.com +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/time/tick-sched.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/kernel/time/tick-sched.c ++++ b/kernel/time/tick-sched.c +@@ -540,6 +540,7 @@ void tick_nohz_restart_sched_tick(void) + account_idle_ticks(ticks); + #endif + ++ calc_load_exit_idle(); + touch_softlockup_watchdog(); + /* + * Cancel the scheduled timer and restore the tick diff --git a/queue-3.0/series b/queue-3.0/series index 61c2bd11eb8..f6b49c4484e 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -42,3 +42,12 @@ mmc-sdhci-esdhc-break-out-early-if-clock-is-0.patch ahci-add-alternate-identifier-for-the-88se9172.patch kobject-fix-oops-with-input0-bad-kobj_uevent_env-content-in-show_uevent.patch redefine-atomic_init-and-atomic64_init-to-drop-the-casts.patch +md-don-t-truncate-size-at-4tb-for-raid0-and-linear.patch +md-make-sure-metadata-is-updated-when-spares-are-activated-or-removed.patch +mm-page_alloc-fix-the-page-address-of-higher-page-s-buddy-calculation.patch +drivers-rtc-rtc-twl.c-ensure-all-interrupts-are-disabled-during-probe.patch +hwmon-twl4030-madc-hwmon-initialize-uninitialized-structure-elements.patch +sched-add-missing-call-to-calc_load_exit_idle.patch +can-mcp251x-avoid-repeated-frame-bug.patch +mm-ia64-fix-a-memory-block-size-bug.patch +memory-hotplug-fix-section-info-double-registration-bug.patch -- 2.47.3