[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-mm
Subject: Re: [PATCH -v4 RESEND 6/9] mm, THP, swap: Support to add/delete THP to/from swap cache
From: "Huang\, Ying" <ying.huang () intel ! com>
Date: 2016-10-28 8:30:43
Message-ID: 87lgx87u4s.fsf () yhuang-dev ! intel ! com
[Download RAW message or body]
Hi, Hillf,
Hillf Danton <hillf.zj@alibaba-inc.com> writes:
> On Friday, October 28, 2016 1:56 PM Huang, Ying wrote:
>>
>> @@ -109,9 +118,16 @@ int __add_to_swap_cache(struct page *page, swp_entry_t entry)
>> * So add_to_swap_cache() doesn't returns -EEXIST.
>> */
>> VM_BUG_ON(error == -EEXIST);
>> - set_page_private(page, 0UL);
>> ClearPageSwapCache(page);
>> - put_page(page);
>> + set_page_private(cur_page, 0UL);
>> + while (i--) {
>> + cur_page--;
>> + cur_entry.val--;
>> + set_page_private(cur_page, 0UL);
>> + radix_tree_delete(&address_space->page_tree,
>> + swp_offset(cur_entry));
>> + }
>
> Pull pages out of radix tree with tree lock held?
OOPS, I should hold the tree lock for the error path too. Will update
it in the next version. Thanks for pointing out this!
Best Regards,
Huang, Ying
>> + page_ref_sub(page, nr);
>> }
>>
>> return error;
>>
--
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 in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic