Linux MM tree latest commits
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: huang.ying.caritas@gmail.com, ddstreet@ieee.org,
	kirill.shutemov@linux.intel.com, mhocko@kernel.org,
	minchan@kernel.org, sergey.senozhatsky.work@gmail.com,
	sjenning@redhat.com, stable@vger.kerenl.org, vbabka@suse.cz,
	mm-commits@vger.kernel.org
Subject: + fontswap-thp-fix.patch added to -mm tree
Date: Mon, 05 Feb 2018 16:24:45 -0800	[thread overview]
Message-ID: <5a78f5cd.ECDEASpRYnvw7dGH%akpm@linux-foundation.org> (raw)


The patch titled
     Subject: mm: fontswap: thp fix
has been added to the -mm tree.  Its filename is
     fontswap-thp-fix.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/fontswap-thp-fix.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/fontswap-thp-fix.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/SubmitChecklist when testing your code ***

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

------------------------------------------------------
From: Huang Ying <huang.ying.caritas@gmail.com>
Subject: mm: fontswap: thp fix


Link: http://lkml.kernel.org/r/87d11j4pdy.fsf@yhuang-dev.intel.com
Fixes: bd4c82c22c367e068 ("mm, THP, swap: delay splitting THP after swapped out")
Reported-by: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Seth Jennings <sjenning@redhat.com>
Cc: Dan Streetman <ddstreet@ieee.org>
Cc: "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>
Cc: <stable@vger.kerenl.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/page_io.c |    2 +-
 mm/vmscan.c  |   16 +++++++++++++---
 2 files changed, 14 insertions(+), 4 deletions(-)

diff -puN mm/page_io.c~fontswap-thp-fix mm/page_io.c
--- a/mm/page_io.c~fontswap-thp-fix
+++ a/mm/page_io.c
@@ -250,7 +250,7 @@ int swap_writepage(struct page *page, st
 		unlock_page(page);
 		goto out;
 	}
-	if (frontswap_store(page) == 0) {
+	if (!PageTransHuge(page) && frontswap_store(page) == 0) {
 		set_page_writeback(page);
 		unlock_page(page);
 		end_page_writeback(page);
diff -puN mm/vmscan.c~fontswap-thp-fix mm/vmscan.c
--- a/mm/vmscan.c~fontswap-thp-fix
+++ a/mm/vmscan.c
@@ -55,6 +55,7 @@
 
 #include <linux/swapops.h>
 #include <linux/balloon_compaction.h>
+#include <linux/frontswap.h>
 
 #include "internal.h"
 
@@ -1121,13 +1122,22 @@ static unsigned long shrink_page_list(st
 					if (!can_split_huge_page(page, NULL))
 						goto activate_locked;
 					/*
+					 * Split THP if frontswap enabled,
+					 * because it cannot process THP
+					 */
+					if (frontswap_enabled()) {
+						if (split_huge_page_to_list(
+							page, page_list))
+							goto activate_locked;
+					}
+					/*
 					 * Split pages without a PMD map right
 					 * away. Chances are some or all of the
 					 * tail pages can be freed without IO.
 					 */
-					if (!compound_mapcount(page) &&
-					    split_huge_page_to_list(page,
-								    page_list))
+					else if (!compound_mapcount(page) &&
+						 split_huge_page_to_list(page,
+							page_list))
 						goto activate_locked;
 				}
 				if (!add_to_swap(page)) {
_

Patches currently in -mm which might be from huang.ying.caritas@gmail.com are

fontswap-thp-fix.patch


                 reply	other threads:[~2018-02-06  0:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5a78f5cd.ECDEASpRYnvw7dGH%akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=ddstreet@ieee.org \
    --cc=huang.ying.caritas@gmail.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@kernel.org \
    --cc=minchan@kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sjenning@redhat.com \
    --cc=stable@vger.kerenl.org \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox