mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
mm: introduce putback_movable_pages()
The PATCH "mm: introduce compaction and migration for virtio ballooned pages" hacks around putback_lru_pages() in order to allow ballooned pages to be re-inserted on balloon page list as if a ballooned page was like a LRU page. As ballooned pages are not legitimate LRU pages, this patch introduces putback_movable_pages() to properly cope with cases where the isolated pageset contains ballooned pages and LRU pages, thus fixing the mentioned inelegant hack around putback_lru_pages(). Signed-off-by: Rafael Aquini <[email protected]> Cc: Rusty Russell <[email protected]> Cc: "Michael S. Tsirkin" <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: Minchan Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
e22504296d
commit
5733c7d11d
4 changed files with 26 additions and 4 deletions
|
|
@ -1003,7 +1003,7 @@ static int compact_zone(struct zone *zone, struct compact_control *cc)
|
|||
switch (isolate_migratepages(zone, cc)) {
|
||||
case ISOLATE_ABORT:
|
||||
ret = COMPACT_PARTIAL;
|
||||
putback_lru_pages(&cc->migratepages);
|
||||
putback_movable_pages(&cc->migratepages);
|
||||
cc->nr_migratepages = 0;
|
||||
goto out;
|
||||
case ISOLATE_NONE:
|
||||
|
|
@ -1026,9 +1026,9 @@ static int compact_zone(struct zone *zone, struct compact_control *cc)
|
|||
trace_mm_compaction_migratepages(nr_migrate - nr_remaining,
|
||||
nr_remaining);
|
||||
|
||||
/* Release LRU pages not migrated */
|
||||
/* Release isolated pages not migrated */
|
||||
if (err) {
|
||||
putback_lru_pages(&cc->migratepages);
|
||||
putback_movable_pages(&cc->migratepages);
|
||||
cc->nr_migratepages = 0;
|
||||
if (err == -ENOMEM) {
|
||||
ret = COMPACT_PARTIAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue