]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Sep 2020 11:57:24 +0000 (13:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Sep 2020 11:57:24 +0000 (13:57 +0200)
added patches:
mm-page_alloc-remove-unnecessary-variable-from-free_pcppages_bulk.patch

queue-4.4/mm-page_alloc-remove-unnecessary-variable-from-free_pcppages_bulk.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/mm-page_alloc-remove-unnecessary-variable-from-free_pcppages_bulk.patch b/queue-4.4/mm-page_alloc-remove-unnecessary-variable-from-free_pcppages_bulk.patch
new file mode 100644 (file)
index 0000000..d9393af
--- /dev/null
@@ -0,0 +1,61 @@
+From e5b31ac2ca2cd0cf6bf2fcbb708ed01466c89aaa Mon Sep 17 00:00:00 2001
+From: Mel Gorman <mgorman@techsingularity.net>
+Date: Thu, 19 May 2016 17:14:24 -0700
+Subject: mm, page_alloc: remove unnecessary variable from free_pcppages_bulk
+
+From: Mel Gorman <mgorman@techsingularity.net>
+
+commit e5b31ac2ca2cd0cf6bf2fcbb708ed01466c89aaa upstream.
+
+The original count is never reused so it can be removed.
+
+Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
+Acked-by: Vlastimil Babka <vbabka@suse.cz>
+Cc: Jesper Dangaard Brouer <brouer@redhat.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+[dwagner: update context]
+Signed-off-by: Daniel Wagner <dwagner@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ mm/page_alloc.c |    7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+--- a/mm/page_alloc.c
++++ b/mm/page_alloc.c
+@@ -835,7 +835,6 @@ static void free_pcppages_bulk(struct zo
+ {
+       int migratetype = 0;
+       int batch_free = 0;
+-      int to_free = count;
+       unsigned long nr_scanned;
+       spin_lock(&zone->lock);
+@@ -848,7 +847,7 @@ static void free_pcppages_bulk(struct zo
+        * below while (list_empty(list)) loop.
+        */
+       count = min(pcp->count, count);
+-      while (to_free) {
++      while (count) {
+               struct page *page;
+               struct list_head *list;
+@@ -868,7 +867,7 @@ static void free_pcppages_bulk(struct zo
+               /* This is the only non-empty list. Free them all. */
+               if (batch_free == MIGRATE_PCPTYPES)
+-                      batch_free = to_free;
++                      batch_free = count;
+               do {
+                       int mt; /* migratetype of the to-be-freed page */
+@@ -886,7 +885,7 @@ static void free_pcppages_bulk(struct zo
+                       __free_one_page(page, page_to_pfn(page), zone, 0, mt);
+                       trace_mm_page_pcpu_drain(page, 0, mt);
+-              } while (--to_free && --batch_free && !list_empty(list));
++              } while (--count && --batch_free && !list_empty(list));
+       }
+       spin_unlock(&zone->lock);
+ }
index 079a4e651654d9e65b32fc4631e86e1312577dae..026c903bf434427134b3c481f99d8f4ea26a9420 100644 (file)
@@ -1,3 +1,4 @@
 hid-core-correctly-handle-reportsize-being-zero.patch
 hid-core-sanitize-event-code-and-type-when-mapping-input.patch
 perf-record-stat-explicitly-call-out-event-modifiers-in-the-documentation.patch
+mm-page_alloc-remove-unnecessary-variable-from-free_pcppages_bulk.patch