]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: Typo fixes - Thanks Douglas Gilbert
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 31 Aug 2021 19:34:32 +0000 (15:34 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 2 Sep 2021 15:26:37 +0000 (11:26 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Documentation/core-api/maple-tree.rst

index eebb3469db43d37a67b37e336928da05936bb175..01c79d2c200ba61f781b41e012541dae84caf531 100644 (file)
@@ -71,19 +71,19 @@ Sometimes it is necessary to ensure the next call to store to a maple tree does
 not allocate memory, please see the advanced API for this use case.
 
 Finally, you can remove all entries from a maple tree by calling
-mtree_destroy().  If the maple tree entries are pointers, you my wish to free
+mtree_destroy().  If the maple tree entries are pointers, you may wish to free
 the entries first.
 
 Allocating Nodes
 ----------------
 
-Normal API allocations are handled internal to the tree.
+When using the normal API, the allocations are handled by the internal tree code.
 
 Locking
 -------
 
 When using the Normal API, you do not have to worry about locking.
-The Maple Tree uses RCU and interanl spinlock to synchronise access:
+The Maple Tree uses RCU and internal spinlock to synchronise access:
 
 No lock needed:
  * mas_destroy()
@@ -132,7 +132,7 @@ you are storing in the Maple Tree, you can call mas_lock() before calling
 mas_walk(), then take a reference count on the object you have found before
 calling the mas_unlock().  This will prevent stores from removing the object
 from the tree between looking up the object and incrementing the refcount.  You
-can also use RCU to avoid dereferencing freed memory, but an explaination of
+can also use RCU to avoid dereferencing freed memory, but an explanation of
 that is beyond the scope of this document.
 
 If it is necessary to drop the locks during an iteration, then mas_pause()
@@ -147,7 +147,7 @@ Advanced API
 The advanced API offers more flexibility and better performance at the cost of
 an interface which can be harder to use and has fewer safeguards.  No locking
 is done for you by the advanced API, and you are required to use the mas_lock
-while modifying the tree.  You can choose whether to use the mas_lokc or the
+while modifying the tree.  You can choose whether to use the mas_lock or the
 RCU lock while doing read-only operations on the tree.  You can mix advanced
 and normal operations on the same array and the normal API is implemented in
 terms of the advanced API.
@@ -188,7 +188,7 @@ you wish to search for a gap within a range, then mas_empty_area() or
 mas_empty_area_rev() can be used.  mas_empty_area searches for a gap starting
 at the lowest index given up to the maximum of the range.  mas_empty_area_rev
 searches for a gap starting at the highest index given and continues downward
-to the lower bounds of the range.
+to the lower bound of the range.
 
 
 Allocating Nodes
@@ -257,7 +257,7 @@ in bits 3-6), bit 2 is reserved.  That leaves bits 0-1 unused for now.
 
 In regular B-Tree terms, pivots are called keys.  The term pivot is used to
 indicate that the tree is specifying ranges,  Pivots may appear in the subtree
-with an entry attached to the value where as keys are unique to a specific
+with an entry attached to the value whereas keys are unique to a specific
 position of a B-tree.  Pivot values are inclusive of the slot with the same
 index.
 
@@ -418,7 +418,7 @@ followed by a contraction when the entry is removed.  To accomplish the
 balance, there are empty slots remaining in both left and right nodes after a
 split.
 
-Another way that 'jitter' is avoided is to terminate a spit up early if the
+Another way that 'jitter' is avoided is to terminate a split up early if the
 left or right node has space to spare.  This is referred to as "pushing left"
 or "pushing right" and is similar to the b* tree, except the nodes left or
 right can rarely be reused due to RCU, but the ripple upwards is halted which