* RE: Re: [PATCH v2 13/18] mm/compaction: support non-lru movable pagemigration
@ 2016-03-23 20:26 Gioh Kim
2016-03-24 5:11 ` Minchan Kim
0 siblings, 1 reply; 2+ messages in thread
From: Gioh Kim @ 2016-03-23 20:26 UTC (permalink / raw)
To: Joonsoo Kim
Cc: Rik van Riel, Sergey Senozhatsky, YiPing Xu, aquini, rknize,
linux-mm, Chan Gyun Jeong, dri-devel, Hugh Dickins, linux-kernel,
Al Viro, virtualization, bfields, Minchan Kim, Gioh Kim, koct9i,
Sangseok Lee, Andrew Morton, jlayton, Vlastimil Babka, Mel Gorman
[-- Attachment #1: Type: text/html, Size: 2502 bytes --]
[-- Attachment #2: Type: text/plain, Size: 183 bytes --]
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Re: [PATCH v2 13/18] mm/compaction: support non-lru movable pagemigration
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
0 siblings, 0 replies; 2+ messages in thread
From: Minchan Kim @ 2016-03-24 5:11 UTC (permalink / raw)
To: Gioh Kim
Cc: Joonsoo Kim, Andrew Morton, linux-kernel, linux-mm, jlayton,
bfields, Vlastimil Babka, koct9i, aquini, virtualization,
Mel Gorman, Hugh Dickins, Sergey Senozhatsky, Rik van Riel,
rknize, Gioh Kim, Sangseok Lee, Chan Gyun Jeong, Al Viro,
YiPing Xu, dri-devel
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-24 5:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).