History

mm/zsmalloc.c: fix the migrated zspage statistics.

When zspage is migrated to the other zone, the zone page state should be updated as well, otherwise the NR_ZSPAGE for each zone shows wrong counts including proc/zoneinfo in practice.

Chanho Min committed 6 years ago

Commit ac8f05d1 parent feee6b21 file · +5 −0Browse files

Unified · Split

mm/zsmalloc.c+5−0
@@ -2069,6 +2069,11 @@ static int zs_page_migrate(struct address_space *mapping, struct page *newpage, · 2068 unmodified lines
2069 zs_pool_dec_isolated(pool);2069 zs_pool_dec_isolated(pool);
2070 }2070 }
2071 2071
2072 if (page_zone(newpage) != page_zone(page)) {
2073 dec_zone_page_state(page, NR_ZSPAGES);
2074 inc_zone_page_state(newpage, NR_ZSPAGES);
2075 }
2076
2072 reset_page(page);2077 reset_page(page);
2073 put_page(page);2078 put_page(page);
2074 page = newpage;2079 page = newpage;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t