Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbc2a050

Browse files
committed
Use a non-locking initial test in TAS_SPIN on PPC.
Further testing convinces me that this is helpful at sufficiently highcontention levels, though it's still worrisome that it loses slightlyat lower contention levels.Per Manabu Ori.
1 parent63876d3 commitbc2a050

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/include/storage/s_lock.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,9 @@ typedef unsigned int slock_t;
358358

359359
#defineTAS(lock) tas(lock)
360360

361+
/* On PPC, it's a win to use a non-locking test before the lwarx */
362+
#defineTAS_SPIN(lock)(*(lock) ? 1 : TAS(lock))
363+
361364
/*
362365
* NOTE: per the Enhanced PowerPC Architecture manual, v1.0 dated 7-May-2002,
363366
* an isync is a sufficient synchronization barrier after a lwarx/stwcx loop.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp