diff options
| author | Wei Yang <[email protected]> | 2024-09-08 14:05:54 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2024-11-05 16:56:24 -0800 |
| commit | 5059aa6334fcf4b7ddd672255aec5835aecd32b6 (patch) | |
| tree | b7faa9d6059ec223855cbd063cea5e0ef15aec26 /tools/perf/scripts/python/libxed.py | |
| parent | f36ba810816182953af74d176e0644e38979b723 (diff) | |
maple_tree: memset maple_big_node as a whole
In mast_fill_bnode(), we first clear some fields of maple_big_node and set
the 'type' unconditionally before return. This means we won't leverage
any information in maple_big_node and it is safe to clear the whole
structure.
In maple_big_node, we define slot and padding/gap in a union. And based
on current definition of MAPLE_BIG_NODE_SLOTS/GAPS, padding is always less
than slot and part of the gap is overlapped by slot.
For example on 64bit system:
MAPLE_BIG_NODE_SLOT is 34
MAPLE_BIG_NODE_GAP is 21
With this knowledge, current code may clear some space by twice. And
this could be avoid by clearing the structure as a whole.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Wei Yang <[email protected]>
Reviewed-by: Liam R. Howlett <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions