Browse Prior Art Database

Method and System for Reducing Spin Lock Contention

IP.com Disclosure Number: IPCOM000197334D
Publication Date: 2010-Jul-02
Document File: 3 page(s) / 35K

Publishing Venue

The IP.com Prior Art Database

Abstract

A method and system is provided to reduce spin lock contention in Symmetric Multi-Processor (SMP) systems. The method provides a tree of tiered locks. A processor in the SMP system attempts to acquire an original lock at the top level of the tree, failing which, the processor moves to a lower level to acquire a non-original lock.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 52% of the total text.

Page 1 of 3

Method and System for Reducing Spin Lock Contention

Disclosed is a method and system for reducing lock contention in Symmetric Multi-Processor (SMP) systems.

The method disclosed herein provides a tree of tiered locks instead of a single lock in order to provide mutual exclusion in an SMP system. A processor in the SMP system initially attempts to acquire an original lock at the top level of the tree. In an instance, a predefined number of attempts for acquiring a lock may be specified. If the processor fails to acquire the original lock within the predefined number of attempts, then the processor moves to an immediately lower level to acquire a non-original lock at the lower level. The immediately lower level may be specified in a predefined traversal path for each processor. For example, processors in the same node may follow a similar traversal path. The similarity of traversal paths taken by two processors may be based on the proximity of the two processors to each other. On moving to the immediately lower level, if the processor is still unable to acquire a non-original lock, the processor moves to a level further lower in the tree until a non-original lock is acquired or the bottom of the tree is reached.

Once a non-original lock at a particular level is acquired, the processor contends for a non-original lock at the immediately higher level in the tree. Once the non-original lock at the higher level is acquired, the non-original lock at the lower level is released. Thereafter, the processor continues to traverse up the tree until the original lock is obtained. Upon acquiring the original lock, the processor releases the non-original lock acquired at the lower level.

Consider an example of an SMP system with 8 nodes, with each node having one socket, and each socket having 2 cores. The paths which each CPU core...