soft-offline: use migrate_pages() instead of migrate_huge_page() (fwd)
Forwarding off-list email
Quoted 47 lines · Aneesh Kumar K.V
Quoted 17 lines · Michal Hocko
Quoted 1 line · Aneesh Kumar K.V
Michal Hocko <[email protected]> writes:
[...]
Quoted 14 lines
Quoted 6 lines
Little bit offtopic:
Btw. hugetlb migration breaks to charging even before this patchset AFAICS. The aboveput_pageshould remove the last reference and then it will uncharge it but I do not see anything that would charge a new page. This is all because regula LRU pages are uncharged when they are unmapped. But this a different story not related to this series.But when we call that
put_page, we would have alreayd move the cgroup information to the new page. We haveh_cg = hugetlb_cgroup_from_page(oldhpage); set_hugetlb_cgroup(oldhpage, NULL);Quoted 9 lines
Quoted 5 lines
/* move the h_cg details to new cgroup */ set_hugetlb_cgroup(newhpage, h_cg);in
hugetlb_cgroup_migrateYes but the res counter charge would be missing for the newpage after
put_pageMoving this to private as i didn't get what you meant here.
We unchage hugepage via
__put_compound_page->free_huge_page->hugetlb_cgroup_uncharge_pageThat does
h_cg = hugetlb_cgroup_from_page(page); if (unlikely(!h_cg)) return;During migrate we do
set_hugetlb_cgroup(oldhpage, NULL); /* move the h_cg details to new cgroup */ set_hugetlb_cgroup(newhpage, h_cg);
Quoted 6 lines
So when we do a
put_page(oldhpage), we won't be finding any cgroup attached to it and hence won't be updating the cgroup res counter value.So not sure what you mean by res counter change would be missing for the newpage after
put_page. I may be missing something here. Can you explain ?
Dang! You are right of course. I have missed the !h_cg check in hugetlb_cgroup_uncharge_page.
Sorry about the confusion. I am so distracted by many issues these days...
Thanks!
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>