FROMLIST: BACKPORT: THP shattering: the reverse of collapsing
In contrast to split, shatter migrates occupied pages in a partially mapped THP to a bunch of base folios. IOW, unlike split done in place, shatter is the exact opposite of collapse. The advantage of shattering is that it keeps the original THP intact. The cost of copying during the migration is not a side effect, but rather by design, since splitting is considered a discouraged behavior. In retail terms, the return of a purchase is charged with a restocking fee and the original goods can be resold. THPs from ZONE_NOMERGE can only be shattered, since they cannot be split or merged. THPs from ZONE_NOSPLIT can be shattered or split (the latter requires [1]), if they are above the minimum order. [1] https://lore.kernel.org/20240226205534.1603748-1-zi.yan@sent.com/ Change-Id: I7637124bb1ede775dba7b1d363d53256f337851f Signed-off-by:Yu Zhao <yuzhao@google.com> Link: https://lore.kernel.org/r/20240229183436.4110845-3-yuzhao@google.com/ Bug: 313807618 Signed-off-by:
Kalesh Singh <kaleshsingh@google.com>
Loading