]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Thoughts: Add table of bits in the parent.
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Thu, 31 Jan 2019 16:15:05 +0000 (11:15 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Wed, 31 Jul 2019 14:52:38 +0000 (10:52 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Thoughts

index f18ce275c109c1dae864e58b50a24718f35fee4d..08a74d91fa19b7d2ad9efe31cd3a7a82fc9f1e94 100644 (file)
--- a/Thoughts
+++ b/Thoughts
@@ -13,10 +13,10 @@ Tree Root
 ---------
 
 If the tree contains a single entry at index 0, it is usually stored in
-tree->ma_root.  To optimise for the page cache, an entry which ends in
-'00', '01' or '11' is stored in the root, but an entry which ends in '10'
-will be stored in a node.  Bit 2 is set if there are any NULL entries
-in the tree.  Bits 3-6 are used to store enum maple_type.
+tree->ma_root.  To optimise for the page cache, an entry which ends in '00',
+'01' or '11' is stored in the root, but an entry which ends in '10' will be
+stored in a node.  Bit 2 is set if there are any NULL entries in the tree.
+Bits 3-6 are used to store enum maple_type.
 
 The flags are used both to store some immutable information about this tree
 (set at tree creation time) and dynamic information set under the spinlock.
@@ -57,6 +57,12 @@ and 21 in a range_16, so encode a range_16 as 00 (Bits 2-6 encode the
 slot number), encode range_32 as 010 (Bits 3-6 encode the slot number)
 and range_64 as 110 (Bits 3-6 encode the slot number).
 
+Parent bits:
+bit 0: 1 = root, 0 otherwise
+bit 1: 0 = range 16, 1 otherwise
+bit 2: 0 = range 32, 1 = range 64
+
+
 Auxiliary Data
 --------------