US11288190B2ActiveUtilityA1

Method, electronic device and computer program product for caching information using active and standby buffers

51
Assignee: EMC IP HOLDING CO LLCPriority: Oct 31, 2019Filed: May 29, 2020Granted: Mar 29, 2022
Est. expiryOct 31, 2039(~13.3 yrs left)· nominal 20-yr term from priority
G06F 3/0638G06F 3/0656G06F 2212/261G06F 3/0604G06F 3/0619G06F 12/0802G06F 3/0689G06F 12/0868G06F 2212/60G06F 3/0607
51
PatentIndex Score
0
Cited by
9
References
14
Claims

Abstract

Techniques for providing information involve: obtaining, from a first device for updating information, a first copy of the updated information, where a second copy of the information prior to the updating is cached in a first buffer acting as an active buffer and the second copy is provided in response to receiving a first request for providing the information from a second device; caching the first copy in a second buffer acting as a standby buffer; in response to the first copy being cached in the second buffer, switching the second buffer to the active buffer and switching the first buffer to the standby buffer; and in response to receiving a second request for providing the information from the second device, providing, to the second device, the first copy cached in the active buffer. Such techniques can ensure the consistency of the provided information without a lock.

Claims

exact text as granted — not AI-modified
We claim: 
     
       1. A method, performed by a computing apparatus, of providing information, comprising:
 obtaining, from a first device for updating information, an updated first copy of the information, a second copy of the information prior to being updated being cached in both a first buffer acting as an active buffer and a second buffer acting as a standby buffer; 
 while the first buffer acts as the active buffer, providing the second copy prior to being updated from the first buffer to a second device in response to receiving, from the second device, a first request for providing the information; 
 caching the updated first copy in the second buffer acting as the standby buffer while the first buffer continues to cache the second copy of the information prior to being updated; 
 in response to the first copy being cached in the second buffer, switching the second buffer to act as the active buffer and the first buffer to act as the standby buffer; and 
 while the second buffer acts as the active buffer, in response to receiving, from the second device, a second request for providing the information, providing, to the second device, the updated first copy cached in the active buffer. 
 
     
     
       2. The method of  claim 1 , wherein the first buffer comprises a first indicator indicating a role of the first buffer and the second buffer comprises a second indicator indicating a role of the second buffer, and wherein switching the second buffer to act as the active buffer and the first buffer to act as the standby buffer comprises:
 updating the first indicator to indicate that the first buffer acts as the standby buffer; and 
 updating the second indicator to indicate that the second buffer acts as the active buffer. 
 
     
     
       3. The method of  claim 2 , wherein the updating of the first indicator and the updating of the second indicator are performed atomically. 
     
     
       4. The method of  claim 1 , wherein exactly one of the first buffer and the second buffer comprises an indicator indicating respective roles of the first buffer and the second buffer, and wherein switching the second buffer to act as the active buffer and the first buffer to act as the standby buffer comprises:
 updating the indicator to indicate that the first buffer acts as the standby buffer and the second buffer acts as the active buffer. 
 
     
     
       5. The method of  claim 4 , wherein the indicator comprises a single bit. 
     
     
       6. The method of  claim 1 , further comprising:
 in response to switching the second buffer to act as the active buffer and the first buffer to act as the standby buffer, copying the updated first copy cached in the active buffer to the standby buffer. 
 
     
     
       7. The method of  claim 1  wherein:
 the information is disk array metadata about a disk array; and 
 the first device includes a disk array management module configured to update disk array metadata about the disk array. 
 
     
     
       8. An electronic device, comprising:
 at least one processing unit; 
 at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the device to perform acts comprising: 
 obtaining, from a first device for updating information, an updated first copy of the information, a second copy of the information prior to being updated being cached in both a first buffer acting as an active buffer and a second buffer acting as a standby buffer; 
 while the first buffer acts as the active buffer, providing the second copy prior to being updated from the first buffer to a second device in response to receiving, from the second device, a first request for providing the information; 
 caching the updated first copy in the second buffer acting as the standby buffer while the first buffer continues to cache the second copy of the information prior to being updated; 
 in response to the first copy being cached in the second buffer, switching the second buffer to act as the active buffer and the first buffer to act as the standby buffer; and 
 while the second buffer acts as the active buffer, in response to receiving, from the second device, a second request for providing the information, providing, to the second device, the updated first copy cached in the active buffer. 
 
     
     
       9. The device of  claim 8 , wherein the first buffer comprises a first indicator indicating a role of the first buffer and the second buffer comprises a second indicator indicating a role of the second buffer, and wherein switching the second buffer to act as the active buffer and the first buffer to act as the standby buffer comprises:
 updating the first indicator to indicate that the first buffer acts as the standby buffer; and 
 updating the second indicator to indicate that the second buffer acts as the active buffer. 
 
     
     
       10. The device of  claim 9 , wherein the updating of the first indicator and the updating of the second indicator are performed atomically. 
     
     
       11. The device of  claim 8 , wherein exactly one of the first buffer and the second buffer comprises an indicator indicating respective roles of the first buffer and the second buffer, and wherein switching the second buffer to act as the active buffer and switching the first buffer to act as the standby buffer comprises:
 updating the indicator to indicate that the first buffer acts as the standby buffer and the second buffer acts as the active buffer. 
 
     
     
       12. The device of  claim 11 , wherein the indicator comprises a single bit. 
     
     
       13. The device of  claim 8 , wherein the acts further comprise:
 in response to switching the second buffer to act as the active buffer and the first buffer to act as the standby buffer, copying the updated first copy cached in the active buffer to the standby buffer. 
 
     
     
       14. A computer program product having a non-transitory computer readable medium which stores a set of instructions to provide information; the set of instructions, when carried out by computerized circuitry, causing the computerized circuitry to perform a method of:
 obtaining, from a first device for updating information, an updated first copy of the information, a second copy of the information prior to being updated being cached in both a first buffer acting as an active buffer and a second buffer acting as a standby buffer; 
 while the first buffer acts as the active buffer, providing the second copy prior to being updated from the first buffer to a second device in response to receiving, from the second device, a first request for providing the information; 
 caching the updated first copy in the second buffer acting as-a the standby buffer while the first buffer continues to cache the second copy of the information prior to being updated; 
 in response to the first copy being cached in the second buffer, switching the second buffer to act as the active buffer and the first buffer to act as the standby buffer; and 
 while the second buffer acts as the active buffer, in response to receiving, from the second device, a second request for providing the information, providing, to the second device, the updated first copy cached in the active buffer.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.