Patent ID: 8661005

Claim:
A system, comprising: one or more processors; a memory coupled to said one or more processors, said memory including a computer usable medium storing a first Read-Copy Update (RCU)-protected first hash table and at least one program of instructions executable by said processor to concurrently perform hash table resizing and modifying operations, said operations comprising: allocating a second RCU-protected hash table in said memory, said second hash table representing a resized version of said first hash table that has a different number of hash buckets than said first hash table, said second hash table buckets being defined but initially having no hash table elements; populating said second hash table by linking each hash bucket of said second hash table to all hash buckets of said first hash table containing elements that hash to said second hash table bucket; publishing said second hash table so that it is available for searching by hash table readers; if said modifying comprises an inserting a new hash table element, inserting said new hash table element at the head of a corresponding bucket in said second hash table; if said modifying comprises deleting an existing hash table element, entering an RCU read-side critical section, removing or redirecting all pointers in one or more hash buckets of said first hash table and said second hash table that reference said existing hash table element, exiting said RCU read-side critical section, waiting for a grace period which guarantees that no readers searching said first hash table or said second hash table will be referencing said existing hash table element, and freeing said existing hash table element from said memory; and freeing said first hash table from memory after waiting for a grace period which guarantees that no readers searching said first hash table will be affected by said freeing.