]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Jun 2017 01:23:01 +0000 (09:23 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Jun 2017 01:23:01 +0000 (09:23 +0800)
added patches:
mm-memory-failure.c-use-compound_head-flags-for-huge-pages.patch
swap-cond_resched-in-swap_cgroup_prepare.patch
usb-xhci-asmedia-asm1042a-chipset-need-shorts-tx-quirk.patch

queue-3.18/mm-memory-failure.c-use-compound_head-flags-for-huge-pages.patch [new file with mode: 0644]
queue-3.18/series
queue-3.18/swap-cond_resched-in-swap_cgroup_prepare.patch [new file with mode: 0644]
queue-3.18/usb-xhci-asmedia-asm1042a-chipset-need-shorts-tx-quirk.patch [new file with mode: 0644]

diff --git a/queue-3.18/mm-memory-failure.c-use-compound_head-flags-for-huge-pages.patch b/queue-3.18/mm-memory-failure.c-use-compound_head-flags-for-huge-pages.patch
new file mode 100644 (file)
index 0000000..6405e04
--- /dev/null
@@ -0,0 +1,54 @@
+From 7258ae5c5a2ce2f5969e8b18b881be40ab55433d Mon Sep 17 00:00:00 2001
+From: James Morse <james.morse@arm.com>
+Date: Fri, 16 Jun 2017 14:02:29 -0700
+Subject: mm/memory-failure.c: use compound_head() flags for huge pages
+
+From: James Morse <james.morse@arm.com>
+
+commit 7258ae5c5a2ce2f5969e8b18b881be40ab55433d upstream.
+
+memory_failure() chooses a recovery action function based on the page
+flags.  For huge pages it uses the tail page flags which don't have
+anything interesting set, resulting in:
+
+> Memory failure: 0x9be3b4: Unknown page state
+> Memory failure: 0x9be3b4: recovery action for unknown page: Failed
+
+Instead, save a copy of the head page's flags if this is a huge page,
+this means if there are no relevant flags for this tail page, we use the
+head pages flags instead.  This results in the me_huge_page() recovery
+action being called:
+
+> Memory failure: 0x9b7969: recovery action for huge page: Delayed
+
+For hugepages that have not yet been allocated, this allows the hugepage
+to be dequeued.
+
+Fixes: 524fca1e7356 ("HWPOISON: fix misjudgement of page_action() for errors on mlocked pages")
+Link: http://lkml.kernel.org/r/20170524130204.21845-1-james.morse@arm.com
+Signed-off-by: James Morse <james.morse@arm.com>
+Tested-by: Punit Agrawal <punit.agrawal@arm.com>
+Acked-by: Punit Agrawal <punit.agrawal@arm.com>
+Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.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@linuxfoundation.org>
+
+---
+ mm/memory-failure.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/mm/memory-failure.c
++++ b/mm/memory-failure.c
+@@ -1189,7 +1189,10 @@ int memory_failure(unsigned long pfn, in
+        * page_remove_rmap() in try_to_unmap_one(). So to determine page status
+        * correctly, we save a copy of the page flags at this time.
+        */
+-      page_flags = p->flags;
++      if (PageHuge(p))
++              page_flags = hpage->flags;
++      else
++              page_flags = p->flags;
+       /*
+        * unpoison always clear PG_hwpoison inside page lock
index 2043ebaa2ca0e2406e33a03d7b47d546736a4efa..829b7b3d857671654a8f19bef016e5dfa6f86405 100644 (file)
@@ -24,3 +24,6 @@ usb-gadget-dummy_hcd-fix-hub-descriptor-removable-fields.patch
 usb-r8a66597-hcd-select-a-different-endpoint-on-timeout.patch
 usb-r8a66597-hcd-decrease-timeout.patch
 drivers-misc-c2port-c2port-duramar2150.c-checking-for-null-instead-of-is_err.patch
+usb-xhci-asmedia-asm1042a-chipset-need-shorts-tx-quirk.patch
+mm-memory-failure.c-use-compound_head-flags-for-huge-pages.patch
+swap-cond_resched-in-swap_cgroup_prepare.patch
diff --git a/queue-3.18/swap-cond_resched-in-swap_cgroup_prepare.patch b/queue-3.18/swap-cond_resched-in-swap_cgroup_prepare.patch
new file mode 100644 (file)
index 0000000..18b281d
--- /dev/null
@@ -0,0 +1,40 @@
+From ef70762948dde012146926720b70e79736336764 Mon Sep 17 00:00:00 2001
+From: Yu Zhao <yuzhao@google.com>
+Date: Fri, 16 Jun 2017 14:02:31 -0700
+Subject: swap: cond_resched in swap_cgroup_prepare()
+
+From: Yu Zhao <yuzhao@google.com>
+
+commit ef70762948dde012146926720b70e79736336764 upstream.
+
+I saw need_resched() warnings when swapping on large swapfile (TBs)
+because continuously allocating many pages in swap_cgroup_prepare() took
+too long.
+
+We already cond_resched when freeing page in swap_cgroup_swapoff().  Do
+the same for the page allocation.
+
+Link: http://lkml.kernel.org/r/20170604200109.17606-1-yuzhao@google.com
+Signed-off-by: Yu Zhao <yuzhao@google.com>
+Acked-by: Michal Hocko <mhocko@suse.com>
+Acked-by: Vladimir Davydov <vdavydov.dev@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@linuxfoundation.org>
+
+---
+ mm/page_cgroup.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/mm/page_cgroup.c
++++ b/mm/page_cgroup.c
+@@ -368,6 +368,9 @@ static int swap_cgroup_prepare(int type)
+               if (!page)
+                       goto not_enough_page;
+               ctrl->map[idx] = page;
++
++              if (!(idx % SWAP_CLUSTER_MAX))
++                      cond_resched();
+       }
+       return 0;
+ not_enough_page:
diff --git a/queue-3.18/usb-xhci-asmedia-asm1042a-chipset-need-shorts-tx-quirk.patch b/queue-3.18/usb-xhci-asmedia-asm1042a-chipset-need-shorts-tx-quirk.patch
new file mode 100644 (file)
index 0000000..b28557a
--- /dev/null
@@ -0,0 +1,35 @@
+From d2f48f05cd2a2a0a708fbfa45f1a00a87660d937 Mon Sep 17 00:00:00 2001
+From: Corentin Labbe <clabbe.montjoie@gmail.com>
+Date: Fri, 9 Jun 2017 14:48:41 +0300
+Subject: usb: xhci: ASMedia ASM1042A chipset need shorts TX quirk
+
+From: Corentin Labbe <clabbe.montjoie@gmail.com>
+
+commit d2f48f05cd2a2a0a708fbfa45f1a00a87660d937 upstream.
+
+When plugging an USB webcam I see the following message:
+[106385.615559] xhci_hcd 0000:04:00.0: WARN Successful completion on short TX: needs XHCI_TRUST_TX_LENGTH quirk?
+[106390.583860] handle_tx_event: 913 callbacks suppressed
+
+With this patch applied, I get no more printing of this message.
+
+Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
+Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci-pci.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/host/xhci-pci.c
++++ b/drivers/usb/host/xhci-pci.c
+@@ -185,6 +185,9 @@ static void xhci_pci_quirks(struct devic
+       if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
+                       pdev->device == 0x1042)
+               xhci->quirks |= XHCI_BROKEN_STREAMS;
++      if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
++                      pdev->device == 0x1142)
++              xhci->quirks |= XHCI_TRUST_TX_LENGTH;
+       if (xhci->quirks & XHCI_RESET_ON_RESUME)
+               xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,