US 12,222,866 B2
Mechanisms for a contention free lookup in a cache with concurrent insertions and deletions
Vijaya Jakkula, San Jose, CA (US); Siva Ramineni, Milpitas, CA (US); and Venkata Bhanu P. Gollapudi, Pleasanton, CA (US)
Assigned to Samsung Electronics Co., Ltd., Gyeonggi-Do (KR)
Filed by SAMSUNG ELECTRONICS CO., LTD., Suwon (KR)
Filed on Apr. 28, 2021, as Appl. No. 17/242,855.
Application 17/242,855 is a continuation of application No. 16/433,927, filed on Jun. 6, 2019, granted, now 11,030,109.
Prior Publication US 2021/0248081 A1, Aug. 12, 2021
Int. Cl. G06F 12/0891 (2016.01); G06F 9/52 (2006.01); G06F 12/0815 (2016.01); G06F 16/907 (2019.01)
CPC G06F 12/0891 (2013.01) [G06F 9/52 (2013.01); G06F 12/0815 (2013.01); G06F 16/907 (2019.01)] 17 Claims
OG exemplary drawing
 
1. A method of contention-free lookup by a cache manager of a data cache, the method comprising:
mapping, with the cache manager, a key of a cache lookup operation by performing a hash function on the key to determine a mapped location, in the data cache, of object data corresponding to a key;
walking, by the cache manager, a collision chain of the mapped location by determining, with the cache manager, for one or more nodes of the collision chain, that a cache-entry indicator matches or is different from a collision chain signature of the collision chain, the cache-entry indicator comprising cache header signature information indicating that a cache entry, which comprises a management field corresponding to the cache-entry indicator, is in a pool of cache entries;
based on determining that the cache-entry indicator matches the collision chain signature, determining, with the cache manager, that a key in the cache-entry indicator matches or is different from the key of the cache lookup operation;
based on determining that the key in the cache-entry indicator matches the key of the cache lookup operation, acquiring, by the cache manager, an entry lock;
based on acquiring the entry lock, determining, by the cache manager, that the key in the cache-entry indicator matches or is different from the key of the cache lookup operation;
based on determining that the key in the cache-entry indicator matches the key of the cache lookup operation, finding, by the cache manager, the object data in the mapped location;
based on determining that the key in the cache-entry indicator is different from the key of the cache lookup operation, releasing, with the cache manager, the entry lock, and again walking, with the cache manager, the collision chain; and
based on determining that the key in the cache-entry indicator is different from the key of the cache lookup operation, reading, with the cache manager, the cache entry corresponding to the cache lookup operation from a data storage, and repopulating, by the cache manager, the cache entry into the mapped location based on the cache header signature information.