+ mm-vmscan-add-warn-on-inadvertently-reclaiming-mapped-page.patch added to -mm tree

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

 



The patch titled
     Subject: mm/vmscan.c: add warn on inadvertently reclaiming mapped page
has been added to the -mm tree.  Its filename is
     mm-vmscan-add-warn-on-inadvertently-reclaiming-mapped-page.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-vmscan-add-warn-on-inadvertently-reclaiming-mapped-page.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-vmscan-add-warn-on-inadvertently-reclaiming-mapped-page.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Hillf Danton <hdanton@xxxxxxxx>
Subject: mm/vmscan.c: add warn on inadvertently reclaiming mapped page

In isolate_lru_pages(), we check scan_control::may_unmap and set isolation
mode accordingly in order to not isolate from the lru list any page that
does not match the isolation mode.  For example, we should skip all sill
mapped pages if isolation mode is set to be ISOLATE_UNMAPPED.

So complain, while scanning the isolated pages, about the very unlikely
event that we hit a mapped page that we should never have isolated.  Note
no change is added in the current scanning behavior without VM debug
configured.

And cut off one line of comment that goes stale.

Link: http://lkml.kernel.org/r/20190526062353.14684-1-hdanton@xxxxxxxx
Signed-off-by: Hillf Danton <hdanton@xxxxxxxx>
Reviewed-by: Yang Shi <yang.shi@xxxxxxxxxxxxxxxxx>
Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
Cc: Minchan Kim <minchan@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

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

--- a/mm/vmscan.c~mm-vmscan-add-warn-on-inadvertently-reclaiming-mapped-page
+++ a/mm/vmscan.c
@@ -1138,8 +1138,10 @@ static unsigned long shrink_page_list(st
 		if (unlikely(!page_evictable(page)))
 			goto activate_locked;
 
-		if (!sc->may_unmap && page_mapped(page))
+		if (!sc->may_unmap && page_mapped(page)) {
+			VM_WARN_ON(true);
 			goto keep_locked;
+		}
 
 		may_enter_fs = (sc->gfp_mask & __GFP_FS) ||
 			(PageSwapCache(page) && (sc->gfp_mask & __GFP_IO));
@@ -1657,7 +1659,6 @@ static __always_inline void update_lru_s
  * @dst:	The temp list to put pages on to.
  * @nr_scanned:	The number of pages that were scanned.
  * @sc:		The scan_control struct for this reclaim session
- * @mode:	One of the LRU isolation modes
  * @lru:	LRU list id for isolating
  *
  * returns how many pages were moved onto *@dst.
_

Patches currently in -mm which might be from hdanton@xxxxxxxx are

mm-vmscan-add-warn-on-inadvertently-reclaiming-mapped-page.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