IP Library Granted Patent US 9,323,771
Granted Patent B2
US 9,323,771 · App. 13/869,815 · Granted Apr 26, 2016

Efficient rename in a lock-coupled traversal of B+tree

Inventor: Saikrishnan Krishnamurthy (Nashua, NH)
Assignee: Dell Products, LP
G06F17/30117
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,323,771
App. No.
13/869,815
Filed
Apr 24, 2013
Granted
Apr 26, 2016
Kind
B2
Examiner
LE, MIRANDA
Art Unit
2168
USPC
707/822
Abstract

Highly concurrent systems use lock-coupling for tree traversal wherein only two levels (parent and current) are locked at any time. The parent lock is released as soon as successful lock is attained on the grandchild. The rename technique described here facilitates using finer grained locking and multiple path traversals by changing lock ownerships.

Claims (88)

1. A computer-implemented method, comprising:

representing a namespace of a file system in a single tree structure, the single tree structure being formed of a plurality of nodes, at least some nodes representing respective filenames in the file system;

for each node, the node holding a key of a respective filename; and

renaming a first key with a second key in the single tree structure using lock coupling, including:

locking a subject node and the parent node;

holding in a first state machine a lock of the parent node;

traversing the single tree structure, beginning from the subject node, using lock coupling and searching for the first key and second keys;

upon divergence of the first and second keys, generating a first path and a second path as two independent paths of traversal of the single tree structure, wherein each of the two independent paths of the single tree structure are traversed concurrently, such that the traversal of the first path is independent from the concurrent traversal of the second path, by:

creating a second state machine traversing the single tree structure, beginning from the subject node, using lock coupling and searching for the first key;

creating a third state machine traversing the single tree structure, beginning from the parent node of the subject node, using lock coupling and searching for the second key, wherein the third state machine traverses the single tree structure concurrently with the second state machine,

such that two independent paths from the subject node to succeeding nodes in respective paths of traversal by the second and third state machines result, and the first state machine waits until the second and third state machines complete;

comparing the first and second keys against a minimum key for each node in the respective paths of traversal;

determining whether the first and second keys diverge at a given node;

upon determining the first and second keys diverge at the given node, creating separate execution paths for traversal; and

determining traversal completion of an execution path upon locking a leaf index node.

2. The method of claim 1 wherein the single tree structure is a B+Tree.

3. The method of claim 1 , further comprising:

requesting, by the second state machine, a lock from the first state machine for at least one node along at least one execution path prior to modifying the at least one node; and

granting to the second state machine the lock for the at least one node along the at least one execution path prior to modifying the at least one node.

4. The method of claim 1 , further comprising:

queuing one or more additional state machines behind the first state machine until the first state machine releases the lock for the parent node.

5. The method of claim 1 , further comprising:

generating a first additional state machine and assigning to the first additional state machine a current lock of the given node;

generating a second additional state machine and assigning to the second additional state machine a lock of a parent node of the given node;

the first and second additional state machines being assigned respective ones of the separate execution paths for traversal,

wherein state machine of the parent node of the given node transitions to a pending state waiting for the first additional state machine and the second additional state machine to complete traversal.

6. The method of claim 5 , further comprising

storing an address of a locked leaf node in the state machine of a parent node to the leaf node;

checking, by at least one of the two additional state machines, whether an address for a requested locked leaf node is held by the other state machine; and

preventing a deadlock by returning control to the leaf node's parent state machine without attempting to lock the address of the locked leaf node.

7. The method of claim 5 , further comprising:

upon traversal completion of the second and third state machine, transferring control to the first state machine;

modifying a namespace by deleting the first key and inserting the second key; and

moving a data pointer from the first key to the second key, wherein moving the data pointer includes referencing a memory address associated with the second key.

8. The method of claim 7 , further comprising:

releasing locks held on the nodes of the first and second keys after moving the data pointer from the first key to the second key.

9. A computer system, comprising:

a file system stored in memory, a namespace of the file system being represented in a single tree structure, the single tree structure being formed of a plurality of nodes, at least some nodes representing respective filenames in the file system, and for each node, the node holding a key of a respective filename; and

a processor configured to rename a first key with a second key in the single tree structure using lock coupling, wherein the processor is configured to:

lock a subject node and the parent node;

hold in a first state machine a lock of the parent node;

traverse the single tree structure, beginning from the subject node, using lock coupling and searching for the first key and second keys;

upon divergence of the first and second keys, generate a first path and a second path as two independent paths of traversal of the single tree structure, wherein each of the two independent paths of the single tree structure are traversed concurrently, such that the traversal of the first path is independent from the concurrent traversal of the second path, by:

create a second state machine traversing the single tree structure, beginning from the subject node, using lock coupling and searching for the first key;

create a third state machine traversing the single tree structure, beginning from the parent node of the subject node, using lock coupling and searching for the second key, wherein the third state machine traverses the single tree structure concurrently with the second state machine,

such that two independent paths from the subject node to succeeding nodes in respective paths of traversal by the second and third state machines result, and the first state machine waits until the second and third state machines complete;

compare the first and second keys against a minimum key for each node in the respective paths of traversal;

determine whether the first and second keys diverge at a given node;

upon determining the first and second keys diverge at the given node, create separate execution paths for traversal; and

determine traversal completion of an execution path upon locking a leaf index node.

10. The computer system of claim 9 , wherein:

the single tree structure is a B+Tree; and

the processor is further configured to:

request, by the second state machine, a lock from the first state machine for at least one node along at least one execution path prior to modifying the at least one node; and

grant to the second state machine the lock for the at least one node along the at least one execution path prior to modifying the at least one node.

11. The computer system of claim 9 , wherein the processor is further configured to:

queue one or more additional state machines behind the first state machine until the first state machine releases the lock for the parent node.

12. The computer system of claim 9 , wherein the processor is further configured to:

generate a first additional state machine and assigning to the first additional state machine a current lock of the given node;

generate a second additional state machine and assigning to the second additional state machine a lock of a parent node of the given node;

assign the first additional state machine and the second additional state machine respective ones of the separate execution paths for traversal,

wherein the processor transitions a state machine of the parent node of the given node to a pending state waiting for the first additional state machine and the second additional state machine to complete traversal.

13. The computer system of claim 12 , wherein the processor is further configured to:

store an address of a locked leaf node in the state machine of a parent node to the leaf node;

check, by at least one of the two additional state machines, whether an address for a requested locked leaf node is held by the other state machine; and

prevent a deadlock by returning control to the leaf node's parent state machine without attempting to lock the address of the locked leaf node.

14. The computer system of claim 12 , wherein the processor is further configured to:

upon traversal completion of the second and third state machine, transfer control to the first state machine;

modify a namespace by deleting the first key and inserting the second key; and

move a data pointer from the first key to the second key, wherein moving the data pointer includes referencing a memory address associated with the second key.

15. The computer system of claim 14 , wherein the processor is further configured to:

release locks held on the nodes of the first and second keys after moving the data pointer from the first key to the second key.

16. A computer program product executed by a processor in communication with a file system, the computer program product comprising:

a non-transitory computer readable medium, the computer readable medium comprising program instructions which, when executed by the processor causes:

representing a namespace of said file system in a single tree structure, the single tree structure being formed of a plurality of nodes, at least some nodes representing respective filenames in the file system;

for each node, the node holding a key of a respective filename; and

renaming a first key with a second key in the single tree structure using lock coupling, including:

locking a subject node and the parent node;

holding in a first state machine a lock of the parent node;

traversing the single tree structure, beginning from the subject node, using lock coupling and searching for the first key and second keys;

upon divergence of the first and second keys, generating a first path and a second path as two independent paths of traversal of the single tree structure, wherein each of the two independent paths of the single tree structure are traversed concurrently, such that the traversal of the first path is independent from the concurrent traversal of the second path, by:

creating a second state machine traversing the single tree structure, beginning from the subject node, using lock coupling and searching for the first key;

creating a third state machine traversing the single tree structure, beginning from the parent node of the subject node, using lock coupling and searching for the second key, wherein the third state machine traverses the single tree structure concurrently with the second state machine,

such that two independent paths from the subject node to succeeding nodes in respective paths of traversal by the second and third state machines result, and the first state machine waits until the second and third state machines complete;

comparing the first and second keys against a minimum key for each node in the respective paths of traversal;

determining whether the first and second keys diverge at a given node;

upon determining the first and second keys diverge at the given node, creating separate execution paths for traversal; and

determining traversal completion of an execution path upon locking a leaf index node.

Assignments (15)
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (053546/0001) Recorded Jun 23, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: DELL MARKETING L.P. (ON BEHALF OF ITSELF AND AS SUCCESSOR-IN-INTEREST TO CREDANT TECHNOLOGIES, INC.); DELL INTERNATIONAL L.L.C.; DELL PRODUCTS L.P.; DELL USA L.P.; EMC CORPORATION; DELL MARKETING CORPORATION (SUCCESSOR-IN-INTEREST TO FORCE10 NETWORKS, INC. AND WYSE TECHNOLOGY L.L.C.); EMC IP HOLDING COMPANY LLC
Reel/Frame 071642/0001 →
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (045455/0001) Recorded May 20, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: DELL MARKETING CORPORATION (SUCCESSOR-IN-INTEREST TO ASAP SOFTWARE EXPRESS, INC.); DELL MARKETING L.P. (ON BEHALF OF ITSELF AND AS SUCCESSOR-IN-INTEREST TO CREDANT TECHNOLOGIES, INC.); DELL USA L.P.; DELL INTERNATIONAL L.L.C.; DELL PRODUCTS L.P.; DELL MARKETING CORPORATION (SUCCESSOR-IN-INTEREST TO FORCE10 NETWORKS, INC. AND WYSE TECHNOLOGY L.L.C.); EMC CORPORATION (ON BEHALF OF ITSELF AND AS SUCCESSOR-IN-INTEREST TO MAGINATICS LLC); EMC IP HOLDING COMPANY LLC (ON BEHALF OF ITSELF AND AS SUCCESSOR-IN-INTEREST TO MOZY, INC.); SCALEIO LLC
Reel/Frame 061753/0001 →
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (040136/0001) Recorded Apr 26, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: DELL MARKETING CORPORATION (SUCCESSOR-IN-INTEREST TO ASAP SOFTWARE EXPRESS, INC.); DELL MARKETING L.P. (ON BEHALF OF ITSELF AND AS SUCCESSOR-IN-INTEREST TO CREDANT TECHNOLOGIES, INC.); DELL USA L.P.; DELL INTERNATIONAL L.L.C.; DELL PRODUCTS L.P.; DELL MARKETING CORPORATION (SUCCESSOR-IN-INTEREST TO FORCE10 NETWORKS, INC. AND WYSE TECHNOLOGY L.L.C.); EMC CORPORATION (ON BEHALF OF ITSELF AND AS SUCCESSOR-IN-INTEREST TO MAGINATICS LLC); EMC IP HOLDING COMPANY LLC (ON BEHALF OF ITSELF AND AS SUCCESSOR-IN-INTEREST TO MOZY, INC.); SCALEIO LLC
Reel/Frame 061324/0001 →
RELEASE OF SECURITY INTEREST Recorded Nov 3, 2021
From: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH
To: ASAP SOFTWARE EXPRESS, INC.; AVENTAIL LLC; CREDANT TECHNOLOGIES, INC.; DELL USA L.P.; DELL INTERNATIONAL, L.L.C.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL SOFTWARE INC.; DELL SYSTEMS CORPORATION; EMC CORPORATION; EMC IP HOLDING COMPANY LLC; FORCE10 NETWORKS, INC.; MAGINATICS LLC; MOZY, INC.; SCALEIO LLC; WYSE TECHNOLOGY L.L.C.
Reel/Frame 058216/0001 →
SECURITY AGREEMENT Recorded Apr 22, 2020
From: CREDANT TECHNOLOGIES INC.; DELL INTERNATIONAL L.L.C.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL USA L.P.; EMC CORPORATION; FORCE10 NETWORKS, INC.; WYSE TECHNOLOGY L.L.C.; EMC IP HOLDING COMPANY LLC
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A.
Reel/Frame 053546/0001 →
SECURITY AGREEMENT Recorded Mar 21, 2019
From: CREDANT TECHNOLOGIES, INC.; DELL INTERNATIONAL L.L.C.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL USA L.P.; EMC CORPORATION; FORCE10 NETWORKS, INC.; WYSE TECHNOLOGY L.L.C.; EMC IP HOLDING COMPANY LLC
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A.
Reel/Frame 049452/0223 →
SECURITY AGREEMENT Recorded Sep 21, 2016
From: ASAP SOFTWARE EXPRESS, INC.; AVENTAIL LLC; CREDANT TECHNOLOGIES, INC.; DELL USA L.P.; DELL INTERNATIONAL L.L.C.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL SOFTWARE INC.; DELL SYSTEMS CORPORATION; EMC CORPORATION; EMC IP HOLDING COMPANY LLC; FORCE10 NETWORKS, INC.; MAGINATICS LLC; MOZY, INC.; SCALEIO LLC; SPANNING CLOUD APPS LLC; WYSE TECHNOLOGY L.L.C.
To: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH, AS COLLATERAL AGENT
Reel/Frame 040134/0001 →
SECURITY AGREEMENT Recorded Sep 21, 2016
From: ASAP SOFTWARE EXPRESS, INC.; AVENTAIL LLC; CREDANT TECHNOLOGIES, INC.; DELL USA L.P.; DELL INTERNATIONAL L.L.C.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL SOFTWARE INC.; DELL SYSTEMS CORPORATION; EMC CORPORATION; EMC IP HOLDING COMPANY LLC; FORCE10 NETWORKS, INC.; MAGINATICS LLC; MOZY, INC.; SCALEIO LLC; SPANNING CLOUD APPS LLC; WYSE TECHNOLOGY L.L.C.
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 040136/0001 →
RELEASE OF SECURITY INTEREST Recorded Sep 14, 2016
From: BANK OF AMERICA, N.A., AS COLLATERAL AGENT
To: DELL MARKETING L.P.; ASAP SOFTWARE EXPRESS, INC.; APPASSURE SOFTWARE, INC.; COMPELLENT TECHNOLOGIES, INC.; CREDANT TECHNOLOGIES, INC.; DELL INC.; DELL PRODUCTS L.P.; DELL USA L.P.; DELL SOFTWARE INC.; FORCE10 NETWORKS, INC.; PEROT SYSTEMS CORPORATION; SECUREWORKS, INC.; WYSE TECHNOLOGY L.L.C.
Reel/Frame 040040/0001 →
RELEASE OF SECURITY INTEREST Recorded Sep 14, 2016
From: BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS COLLATERAL AGENT
To: DELL MARKETING L.P.; ASAP SOFTWARE EXPRESS, INC.; APPASSURE SOFTWARE, INC.; COMPELLENT TECHNOLOGIES, INC.; CREDANT TECHNOLOGIES, INC.; DELL INC.; DELL PRODUCTS L.P.; DELL USA L.P.; DELL SOFTWARE INC.; FORCE10 NETWORKS, INC.; PEROT SYSTEMS CORPORATION; SECUREWORKS, INC.; WYSE TECHNOLOGY L.L.C.
Reel/Frame 040065/0618 →
RELEASE OF SECURITY INTEREST Recorded Sep 13, 2016
From: BANK OF AMERICA, N.A., AS ADMINISTRATIVE AGENT
To: DELL MARKETING L.P.; ASAP SOFTWARE EXPRESS, INC.; APPASSURE SOFTWARE, INC.; COMPELLANT TECHNOLOGIES, INC.; CREDANT TECHNOLOGIES, INC.; DELL INC.; DELL PRODUCTS L.P.; DELL USA L.P.; DELL SOFTWARE INC.; FORCE10 NETWORKS, INC.; PEROT SYSTEMS CORPORATION; SECUREWORKS, INC.; WYSE TECHNOLOGY L.L.C.
Reel/Frame 040065/0216 →
PATENT SECURITY AGREEMENT (NOTES) Recorded Jan 2, 2014
From: APPASSURE SOFTWARE, INC.; ASAP SOFTWARE EXPRESS, INC.; BOOMI, INC.; COMPELLENT TECHNOLOGIES, INC.; CREDANT TECHNOLOGIES, INC.; DELL INC.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL SOFTWARE INC.; DELL USA L.P.; FORCE10 NETWORKS, INC.; GALE TECHNOLOGIES, INC.; PEROT SYSTEMS CORPORATION; SECUREWORKS, INC.; WYSE TECHNOLOGY L.L.C.
To: BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS FIRST LIEN COLLATERAL AGENT
Reel/Frame 031897/0348 →
PATENT SECURITY AGREEMENT (TERM LOAN) Recorded Jan 2, 2014
From: DELL INC.; APPASSURE SOFTWARE, INC.; ASAP SOFTWARE EXPRESS, INC.; BOOMI, INC.; COMPELLENT TECHNOLOGIES, INC.; CREDANT TECHNOLOGIES, INC.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL SOFTWARE INC.; DELL USA L.P.; FORCE10 NETWORKS, INC.; GALE TECHNOLOGIES, INC.; PEROT SYSTEMS CORPORATION; SECUREWORKS, INC.; WYSE TECHNOLOGY L.L.C.
To: BANK OF AMERICA, N.A., AS COLLATERAL AGENT
Reel/Frame 031899/0261 →
PATENT SECURITY AGREEMENT (ABL) Recorded Jan 2, 2014
From: DELL INC.; APPASSURE SOFTWARE, INC.; ASAP SOFTWARE EXPRESS, INC.; BOOMI, INC.; COMPELLENT TECHNOLOGIES, INC.; CREDANT TECHNOLOGIES, INC.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL SOFTWARE INC.; DELL USA L.P.; FORCE10 NETWORKS, INC.; GALE TECHNOLOGIES, INC.; PEROT SYSTEMS CORPORATION; SECUREWORKS, INC.; WYSE TECHNOLOGY L.L.C.
To: BANK OF AMERICA, N.A., AS ADMINISTRATIVE AGENT
Reel/Frame 031898/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 24, 2013
From: KRISHNAMURTHY, SAIKRISHNAN
To: DELL PRODUCTS, LP
Reel/Frame 030280/0812 →
Continuity (1)
Related Publication 20140324925A1 · Oct 30, 2014