From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
"Huang, Ying" <ying.huang@intel.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Huang Ying <huang.ying.caritas@gmail.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Dan Streetman <ddstreet@ieee.org>,
Seth Jennings <sjenning@redhat.com>,
Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
Shaohua Li <shli@kernel.org>, Michal Hocko <mhocko@suse.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Mel Gorman <mgorman@techsingularity.net>,
Shakeel Butt <shakeelb@google.com>,
stable@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: Re: [PATCH -mm -v2] mm, swap, frontswap: Fix THP swap if frontswap enabled
Date: Thu, 8 Feb 2018 20:22:51 +0900 [thread overview]
Message-ID: <20180208112251.GA710@jagdpanzerIV> (raw)
In-Reply-To: <20180208102521.GB74192@eng-minchan1.roam.corp.google.com>
On (02/08/18 02:25), Minchan Kim wrote:
[..]
> > > if (PageTransHuge(page)) {
> > > - if (IS_ENABLED(CONFIG_THP_SWAP))
> > > - get_swap_pages(1, true, &entry);
> > > + /* Frontswap doesn't support THP */
> > > + if (!frontswap_enabled()) {
> > > + if (IS_ENABLED(CONFIG_THP_SWAP))
> > > + get_swap_pages(1, true, &entry);
> > > + }
> > > return entry;
> > > }
> >
> > I have proposed exactly the same thing [1], Minchan commented that
> > it would introduce frontswap dependency to swap_slots.c [2]. Which
> > is true, but I'd still probably prefer to handle it all in
> > get_swap_page. Minchan, any objections?
>
> I didn't want to spread out frontswap stuff unless it has good value
> because most of frontswap functions are located in mm/swapfile.c
> at this moment.
Sure, your points are perfectly valid. At the same time it might be the
case that we already kind of expose that THP dependency thing to vmscan.
The whole
if (!add_to_swap()) {
if (!PageTransHuge(page))
goto activate_locked;
split_huge_page_to_list(page);
add_to_swap(page);
}
looks a bit suspicious - if add_to_swap() fails and the page is THP then
split it and add_to_swap() again.
-ss
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2018-02-08 11:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-07 7:00 [PATCH -mm -v2] mm, swap, frontswap: Fix THP swap if frontswap enabled Huang, Ying
2018-02-07 16:27 ` Konrad Rzeszutek Wilk
2018-02-07 21:05 ` Andrew Morton
2018-02-08 1:28 ` Huang, Ying
2018-02-08 1:36 ` Sergey Senozhatsky
2018-02-08 10:25 ` Minchan Kim
2018-02-08 11:22 ` Sergey Senozhatsky [this message]
2018-02-08 10:17 ` Minchan Kim
2018-02-08 15:17 ` huang ying
2018-02-08 15:27 ` huang ying
2018-02-08 17:37 ` Minchan Kim
2018-02-09 0:39 ` Huang, Ying
2018-02-12 16:26 ` Dan Streetman
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=20180208112251.GA710@jagdpanzerIV \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=ddstreet@ieee.org \
--cc=hannes@cmpxchg.org \
--cc=huang.ying.caritas@gmail.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=sergey.senozhatsky@gmail.com \
--cc=shakeelb@google.com \
--cc=shli@kernel.org \
--cc=sjenning@redhat.com \
--cc=stable@vger.kernel.org \
--cc=ying.huang@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).