From: Minchan Kim <minchan@kernel.org>
To: Gioh Kim <gurugio@hanmail.net>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
jlayton@poochiereds.net, bfields@fieldses.org,
Vlastimil Babka <vbabka@suse.cz>,
koct9i@gmail.com, aquini@redhat.com,
virtualization@lists.linux-foundation.org,
Mel Gorman <mgorman@suse.de>, Hugh Dickins <hughd@google.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Rik van Riel <riel@redhat.com>,
rknize@motorola.com, Gioh Kim <gi-oh.kim@profitbricks.com>,
Sangseok Lee <sangseok.lee@lge.com>,
Chan Gyun Jeong <chan.jeong@lge.com>,
Al Viro <viro@ZenIV.linux.org.uk>,
YiPing Xu <xuyiping@hisilicon.com>,
dri-devel@lists.freedesktop.org
Subject: Re: Re: [PATCH v2 13/18] mm/compaction: support non-lru movable pagemigration
Date: Thu, 24 Mar 2016 14:11:38 +0900 [thread overview]
Message-ID: <20160324051138.GA14101@bbox> (raw)
In-Reply-To: <20160324052650.HM.e0000000006t8Yn@gurugio.wwl1662.hanmail.net>
On Thu, Mar 24, 2016 at 05:26:50AM +0900, Gioh Kim wrote:
> Hmmm... But, in failure case, is it safe to call putback_lru_page() for
> them?
> And, PageIsolated() would be left. Is it okay? It's not symmetric that
> isolated page can be freed by decreasing ref count without calling
> putback function. This should be clarified and documented.
>
> I agree Joonsoo's idea.
>
> Freeing isolated page out of putback() could be confused.
If we makes such rule, subsystem cannot free the isolated pages until VM calls
putback. I don't think it's a good idea. With it, every users should make own
deferred page freeing logic which might be more error-prone and obstacle for
using this interface.
I want to make client free his pages whenever he want if possible.
>
> Every detail cannot be documented. And more documents mean less elegant
> code.
>
> Is it possible to free isolated page in putback()?
>
> In move_to_new_page(), can we call a_ops->migratepage like following?
>
> move_to_new_page()
>
> {
>
> mapping = page_mapping(page)
>
> if (!mapping)
>
> rc = migrate_page
>
> else if (mapping->a_ops->migratepage && IsolatePage(page))
>
> rc = mapping->a_ops->migratepage
>
It's not a problem. The problem is that a page failed migration
so VM will putback the page. But, between fail of migration and
putback of isolated page, user can free the page. In this case,
putback operation would be not called and pass the page in
putback_lru_page.
> else
>
> rc = fallback_migrate_page
>
> ...
>
> return rc
>
> }
>
> I'm sorry that I couldn't review in detail because I forgot many
> details.
You're a human being, not Alphago. :)
Thanks for the review, Gioh!
>
> [1][Kk8NwEH1.I.q95.FfPs-qw00]
> [@from=gurugio&rcpt=minchan%40kernel%2Eorg&msgid=%3C20160324052650%2EHM
> %2Ee0000000006t8Yn%40gurugio%2Ewwl1662%2Ehanmail%2Enet%3E]
>
> References
>
> 1. mailto:gurugio@hanmail.net
--
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>
prev parent reply other threads:[~2016-03-24 5:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-23 20:26 Re: [PATCH v2 13/18] mm/compaction: support non-lru movable pagemigration Gioh Kim
2016-03-24 5:11 ` Minchan Kim [this message]
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=20160324051138.GA14101@bbox \
--to=minchan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=aquini@redhat.com \
--cc=bfields@fieldses.org \
--cc=chan.jeong@lge.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gi-oh.kim@profitbricks.com \
--cc=gurugio@hanmail.net \
--cc=hughd@google.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=jlayton@poochiereds.net \
--cc=koct9i@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=riel@redhat.com \
--cc=rknize@motorola.com \
--cc=sangseok.lee@lge.com \
--cc=sergey.senozhatsky@gmail.com \
--cc=vbabka@suse.cz \
--cc=viro@ZenIV.linux.org.uk \
--cc=virtualization@lists.linux-foundation.org \
--cc=xuyiping@hisilicon.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).