Skip to content

Commit 5a0f85c

Browse files
committed
benchmarks/lockhammer/TODO
document some ideas and TODOs hybrid_spinlock, tbb_spin_rw_mutex, and clh_spinlock - reuse the lock pointer provided by lockhammer to improve run-to-run reproducibility queued_spinlock - uses the lock pointer, but need mcspool to also be reproducible ticket_spinlock - conditionalize slow path polling interstitial (USE_RELAX) Change-Id: I6415e2a6ff09e87456fbcb55f37cf47db702d4d8
1 parent bf6639b commit 5a0f85c

File tree

1 file changed

+60
-0
lines changed
  • benchmarks/lockhammer

1 file changed

+60
-0
lines changed

benchmarks/lockhammer/TODO

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
2+
3+
4+
Physical address accessing strategy
5+
- While a specified physical address can be obtained by mmap /dev/mem with
6+
CONFIG_STRICT_DEVMEM=n (and nopat on x86), we can not guarantee that memory
7+
location is freely available for use. This may be OK for simulation, but not
8+
OK on a real system.
9+
10+
To get around this problem, find a physical address in a persistent hugepage.
11+
This means not transparent hugepages, but HugeTLB pages. Using a persistent
12+
hugepage lets us access a physical memory that also persists after the
13+
program ends so that there is repeatability.
14+
15+
TODO: check that N=1 hugepages works with multiple NUMA domains (yes it
16+
does, but since hugepages are default round-robin distributed ("interleaved")
17+
across NUMA domains, N=1 will place only one hugepage in the first NUMA domain.
18+
If other domains are to be tested, use --hugepage-physaddr to request the
19+
hugepage with that physical address in that NUMA domain.)
20+
TODO: use get_mempolicy() to determine the NUMA domain of a hugepage.
21+
TODO: use fewer hugepages (done)
22+
TODO: add a flag to specify the hugepage physical address, and to try remapping
23+
hugepages until it is obtained again. (done)
24+
TODO: use set_mempolicy(MPOL_BIND) to place a hugepage on a node instead of the above.
25+
TODO: respect hugepage size in bytes and in kilobytes by name; it only takes in the abbreviated one right now
26+
27+
28+
Update SpinPause() in ext/jvm/jvm_objectmonitor.h
29+
- The SpinPause() function returns 0. However, this is only the case
30+
in now very old versions of OpenJDK. Modern versions use pause
31+
on 64-bit x86 (amd64) and a parameterized choice of a one or more
32+
ISB, or NOP on aarch64.
33+
34+
35+
ext/linux/hybrid_spinlock*
36+
- use the lockhammer lock pointer instead of malloc'ing mcs_pool for better reproducibility
37+
38+
queued_spinlock
39+
- queued_spinlock uses the lock pointer as well as mcs_pool, so need a way to have both be reproducible.
40+
41+
tbb_spin_rw_mutex
42+
- instead of doing operations on the state variable, use the test harness lock pointer for better reproducibility
43+
44+
clh_spinlock
45+
- instead of operating on global_clh_lock, use the test harness lock pointer for better reproducibility
46+
47+
ticket_spinlock
48+
- Modify so that USE_RELAX is effective
49+
50+
51+
cpufreq check:
52+
- for the intel_pstate driver, warn if no_turbo is set to 0
53+
54+
55+
56+
57+
add a memory update in the critical section
58+
- optionally store update on the same cacheline as the lock
59+
- expect a lot of kernel locks to have this
60+
- optionally store update somewhere else than the lock cache line (GUPS)

0 commit comments

Comments
 (0)