diff options
| author | Chengming Zhou <[email protected]> | 2024-06-21 15:54:31 +0800 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2024-07-04 18:05:51 -0700 |
| commit | a0b856b617c585b86a077aae5176c946e1462b7d (patch) | |
| tree | f34a2a729e3e0c741243dd9ec4821b5fcff7a997 /tools/perf/scripts/python | |
| parent | d58a361b0350128bf5a5cf47773edaedbb6ea838 (diff) | |
mm/ksm: optimize the chain()/chain_prune() interfaces
Now the implementation of stable_node_dup() causes chain()/chain_prune()
interfaces and usages are overcomplicated.
Why? stable_node_dup() only find and return a candidate stable_node for
sharing, so the users have to recheck using stable_node_dup_any() if any
non-candidate stable_node exist. And try to ksm_get_folio() from it
again.
Actually, stable_node_dup() can just return a best stable_node as it can,
then the users can check if it's a candidate for sharing or not.
The code is simplified too and fewer corner cases: such as stable_node and
stable_node_dup can't be NULL if returned tree_folio is not NULL.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Chengming Zhou <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Stefan Roesch <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions