[folded-merged] mm-vmscan-detect-file-thrashing-at-the-reclaim-root-fix-2.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm/vmscan: fix some -Wenum-conversion warnings
has been removed from the -mm tree.  Its filename was
     mm-vmscan-detect-file-thrashing-at-the-reclaim-root-fix-2.patch

This patch was dropped because it was folded into mm-vmscan-enforce-inactive-active-ratio-at-the-reclaim-root.patch

------------------------------------------------------
From: Qian Cai <cai@xxxxxx>
Subject: mm/vmscan: fix some -Wenum-conversion warnings

The -next commit "mm: vmscan: enforce inactive:active ratio at the
reclaim root" [1] introduced some Clang -Wenum-conversion warnings,

mm/vmscan.c:2216:39: warning: implicit conversion from enumeration type
'enum lru_list' to different enumeration type 'enum node_stat_item'
[-Wenum-conversion]
        inactive = lruvec_page_state(lruvec, inactive_lru);
                   ~~~~~~~~~~~~~~~~~         ^~~~~~~~~~~~
mm/vmscan.c:2217:37: warning: implicit conversion from enumeration type
'enum lru_list' to different enumeration type 'enum node_stat_item'
[-Wenum-conversion]
        active = lruvec_page_state(lruvec, active_lru);
                 ~~~~~~~~~~~~~~~~~         ^~~~~~~~~~
mm/vmscan.c:2746:42: warning: implicit conversion from enumeration type
'enum lru_list' to different enumeration type 'enum node_stat_item'
[-Wenum-conversion]
        file = lruvec_page_state(target_lruvec, LRU_INACTIVE_FILE);
               ~~~~~~~~~~~~~~~~~                ^~~~~~~~~~~~~~~~~

Since it guarantees the relative order between the LRU items, fix it by
using NR_LRU_BASE for the translation.

[1] http://lkml.kernel.org/r/20191107205334.158354-4-hannes@xxxxxxxxxxx

Link: http://lkml.kernel.org/r/1573848697-29262-1-git-send-email-cai@xxxxxx
Signed-off-by: Qian Cai <cai@xxxxxx>
Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
Cc: Suren Baghdasaryan <surenb@xxxxxxxxxx>
Cc: Shakeel Butt <shakeelb@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/vmscan.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/mm/vmscan.c~mm-vmscan-detect-file-thrashing-at-the-reclaim-root-fix-2
+++ a/mm/vmscan.c
@@ -2213,8 +2213,8 @@ static bool inactive_is_low(struct lruve
 	unsigned long inactive_ratio;
 	unsigned long gb;
 
-	inactive = lruvec_page_state(lruvec, inactive_lru);
-	active = lruvec_page_state(lruvec, active_lru);
+	inactive = lruvec_page_state(lruvec, NR_LRU_BASE + inactive_lru);
+	active = lruvec_page_state(lruvec, NR_LRU_BASE + active_lru);
 
 	gb = (inactive + active) >> (30 - PAGE_SHIFT);
 	if (gb)
@@ -2743,7 +2743,7 @@ again:
 	 * thrashing, try to reclaim those first before touching
 	 * anonymous pages.
 	 */
-	file = lruvec_page_state(target_lruvec, LRU_INACTIVE_FILE);
+	file = lruvec_page_state(target_lruvec, NR_INACTIVE_FILE);
 	if (file >> sc->priority && !(sc->may_deactivate & DEACTIVATE_FILE))
 		sc->cache_trim_mode = 1;
 	else
_

Patches currently in -mm which might be from cai@xxxxxx are

mm-vmscan-enforce-inactive-active-ratio-at-the-reclaim-root.patch
z3fold-add-inter-page-compaction-fix.patch
hugetlb-remove-unused-hstate-in-hugetlb_fault_mutex_hash-fix-fix.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux