[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <559F1014.6070306@lge.com>
Date: Fri, 10 Jul 2015 09:21:40 +0900
From: Gioh Kim <gioh.kim@....com>
To: "Michael S. Tsirkin" <mst@...hat.com>, koct9i@...il.com,
aquini@...hat.com
CC: jlayton@...chiereds.net, bfields@...ldses.org, vbabka@...e.cz,
iamjoonsoo.kim@....com, viro@...iv.linux.org.uk,
minchan@...nel.org, linux-fsdevel@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
linux-mm@...ck.org, gunho.lee@....com, akpm@...ux-foundation.org,
Gioh Kim <gurugio@...mail.net>
Subject: Re: [RFCv3 3/5] mm/balloon: apply mobile page migratable into balloon
>> @@ -124,6 +130,7 @@ static inline void balloon_page_insert(struct balloon_dev_info *balloon,
>> struct page *page)
>> {
>> __SetPageBalloon(page);
>> + page->mapping = balloon->inode->i_mapping;
>> SetPagePrivate(page);
>> set_page_private(page, (unsigned long)balloon);
>> list_add(&page->lru, &balloon->pages);
>> @@ -140,6 +147,7 @@ static inline void balloon_page_insert(struct balloon_dev_info *balloon,
>> static inline void balloon_page_delete(struct page *page)
>> {
>> __ClearPageBalloon(page);
>> + page->mapping = NULL;
>> set_page_private(page, 0);
>> if (PagePrivate(page)) {
>> ClearPagePrivate(page);
>
> Order of cleanup here is not the reverse of the order of initialization.
> Better make it exactly the reverse.
>
>
> Also, I have a question: is it enough to lock the page to make changing
> the mapping safe? Do all users lock the page too?
>
>
>
>
I think balloon developers can answer that precisely.
I've just follow this comment:
http://lxr.free-electrons.com/source/include/linux/balloon_compaction.h#L16
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists