Next, the page is removed from its memory
block. When will PG_offline_skippable be used? The second phase when
the page is being removed from its memory block?

PG_offline_skippable is used during memory offlining, while we look for any 
pages that are not PageBuddy (... or hwpoisoned ...), to migrate them off the 
memory so they get converted to PageBuddy.

PageOffline + PageOfflineSkippable are checked on that phase, such that they 
don't require any migration.

Hmm, if you just do not want to get PageOffline migrated, not setting it
__PageMovable would work right? PageOffline + __PageMovable is used by
ballooning, as these inflated pages can be migrated. PageOffline without
__PageMovable should be virtio-mem. Am I missing any other user?

Sure. Just imagine !CONFIG_BALLOON_COMPACTION.

In summary, we have

1) Migratable PageOffline pages (balloon compaction)

2) Unmigratable PageOffline pages (e.g., XEN balloon, hyper-v balloon,
    memtrace, in the future likely some memory holes, ... )

3) Skippable PageOffline pages (virtio-mem)

Thank you for all the explanation. Now I understand how memory offline
and memory hotunplug work and shall begin to check the patches. :)

Sure, if you think the doc or some comments could be updated, I'm happy to review such changes.

It's always very helpful to receive feedback from someone that's new to this code.

--
Cheers,

David / dhildenb


Reply via email to