Hi, Hill, Thanks for comments! Hillf Danton <hillf.zj@xxxxxxxxxxxxxxx> writes: >> >> @@ -187,6 +221,14 @@ int add_to_swap(struct page *page, struct list_head *list) >> VM_BUG_ON_PAGE(!PageLocked(page), page); >> VM_BUG_ON_PAGE(!PageUptodate(page), page); >> >> + if (unlikely(PageTransHuge(page))) { >> + err = add_to_swap_trans_huge(page, list); >> + if (err < 0) >> + return 0; >> + else if (err > 0) >> + return err; >> + /* fallback to split firstly if return 0 */ > > switch (err) and add vm event count according to the meaning of err? Yes. switch(err) looks better, I will change it. For vm event, I found for now there are only two vm event for swap: PSWPIN and PSWPOUT. There are counted when page and read from or write to the block device. So I think we have no existing vm event to count here. Best Regards, Huang, Ying -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>