×

Optimized deletion and insertion for high-performance resizable RCU-protected hash tables

  • US 8,666,952 B2
  • Filed: 04/25/2012
  • Issued: 03/04/2014
  • Est. Priority Date: 12/08/2011
  • Status: Expired due to Fees
First Claim
Patent Images

1. A method for concurrently resizing and modifying an Read-Copy Update (RCU)-protected hash table in a computer system having one or more processors operatively coupled to a memory, said memory including a computer usable medium storing an 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 representing said method, 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 said memory after waiting for a grace period which guarantees that no readers searching said first hash table will be affected by said freeing.

View all claims
  • 0 Assignments
Timeline View
Assignment View
    ×
    ×