mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
mm/page_owner: preserve original free_pid/free_tgid during folio migration
__update_page_owner_free_handle() accepts pid and tgid, but ignores them, always storing current->pid and current->tgid. __folio_copy_owner() forwards the original free pid/tgid during folio migration, yet these values were overwritten by the migrating task. Store the passed-in pid/tgid so the migrated folio keeps the original free attribution. Link: https://lore.kernel.org/20260903092126.24685-1-hongfu.li@linux.dev Signed-off-by: Hongfu Li <lihongfu@kylinos.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Vlastimil Babka (SUSE) <vbabka@kernel.org> Cc: Brendan Jackman <brendan.jackman@linux.dev> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Zi Yan <ziy@nvidia.com>
This commit is contained in:
parent
600c820b8e
commit
e1e8650302
|
|
@ -307,8 +307,8 @@ static inline void __update_page_owner_free_handle(struct page *page,
|
|||
page_owner->free_handle = handle;
|
||||
}
|
||||
page_owner->free_ts_nsec = free_ts_nsec;
|
||||
page_owner->free_pid = current->pid;
|
||||
page_owner->free_tgid = current->tgid;
|
||||
page_owner->free_pid = pid;
|
||||
page_owner->free_tgid = tgid;
|
||||
}
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user