summaryrefslogtreecommitdiff
path: root/dist/serial.py
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2013-10-17 11:37:45 -0400
committerKeith Bostic <keith@wiredtiger.com>2013-10-17 11:43:50 -0400
commit1903f5137dd4d0954f786e9718b20538dfbe7760 (patch)
treeb97e3d6ab554dbcef3f12a53bf06738ad17c9d45 /dist/serial.py
parent2d9512cf832694e165ee27cf6a66c89f985590e0 (diff)
downloadmongo-1903f5137dd4d0954f786e9718b20538dfbe7760.tar.gz
Replace the per-btree handle spinlock with an array of 256 spinlocks in
the connection structure. When a page is first modified, the sequentially next spinlock is assigned to the page, and then the page uses that spinlock to serialize its modifications. Reference #721.
Diffstat (limited to 'dist/serial.py')
-rw-r--r--dist/serial.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/dist/serial.py b/dist/serial.py
index 8cb86b3da40..6abfa5bc96f 100644
--- a/dist/serial.py
+++ b/dist/serial.py
@@ -105,8 +105,8 @@ def output(entry, f):
# Call the worker function.
if entry.name != "update":
f.write('''
-\t/* Acquire the serialization spinlock, call the worker function. */
-\t__wt_spin_lock(session, &S2BT(session)->serial_lock);''')
+\t/* Acquire the page's spinlock, call the worker function. */
+\tWT_PAGE_LOCK(session, page);''')
f.write('''
\tret = __''' + entry.name + '''_serial_func(
@@ -121,7 +121,7 @@ def output(entry, f):
if entry.name != "update":
f.write('''
-\t__wt_spin_unlock(session, &S2BT(session)->serial_lock);''')
+\tWT_PAGE_UNLOCK(session, page);''')
f.write('''