diff options
author | Liam R. Howlett <Liam.Howlett@oracle.com> | 2023-08-04 12:59:51 -0400 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-08-21 13:37:41 -0700 |
commit | 530f745c7620af288b71b3d667cb90f10df3defe (patch) | |
tree | 275a9a4f4491828b11d42c85d25ed29dfa0a5bd3 /mm/compaction.c | |
parent | 068bafcac0b89ee5b1616793231eb4b3dd41e3f0 (diff) | |
download | lwn-530f745c7620af288b71b3d667cb90f10df3defe.tar.gz lwn-530f745c7620af288b71b3d667cb90f10df3defe.zip |
maple_tree: replace data before marking dead in split and spanning store
Reorder the operations for split and spanning stores so that new data is
placed in the tree prior to marking the old data as dead. This will limit
re-walks on dead data to just once instead of a retry loop.
The order of operations is as follows: Create the new data, put the new
data in place, mark the top node of the old data as dead.
Then repair parent links in the reused nodes through all levels of the
tree, following the new nodes downwards. Finally walk the top dead node
looking for nodes that are no longer used, or subtrees that should be
destroyed (marked dead throughout then freed), follow the partially used
nodes downwards to discover other dead nodes and subtrees.
Link: https://lkml.kernel.org/r/20230804165951.2661157-7-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Paul E. McKenney <paulmck@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/compaction.c')
0 files changed, 0 insertions, 0 deletions