lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20160324051138.GA14101@bbox>
Date:	Thu, 24 Mar 2016 14:11:38 +0900
From:	Minchan Kim <minchan@...nel.org>
To:	Gioh Kim <gurugio@...mail.net>
Cc:	Joonsoo Kim <iamjoonsoo.kim@....com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	jlayton@...chiereds.net, bfields@...ldses.org,
	Vlastimil Babka <vbabka@...e.cz>, koct9i@...il.com,
	aquini@...hat.com, virtualization@...ts.linux-foundation.org,
	Mel Gorman <mgorman@...e.de>, Hugh Dickins <hughd@...gle.com>,
	Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
	Rik van Riel <riel@...hat.com>, rknize@...orola.com,
	Gioh Kim <gi-oh.kim@...fitbricks.com>,
	Sangseok Lee <sangseok.lee@....com>,
	Chan Gyun Jeong <chan.jeong@....com>,
	Al Viro <viro@...IV.linux.org.uk>,
	YiPing Xu <xuyiping@...ilicon.com>,
	dri-devel@...ts.freedesktop.org
Subject: Re: Re: [PATCH v2 13/18] mm/compaction: support non-lru movable
 pagemigration

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@...mail.net

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ