Project

General

Profile

Libradosobjecter - improve threading » History » Version 1

Jessica Mack, 06/23/2015 09:27 PM

1 1 Jessica Mack
h1. Libradosobjecter - improve threading
2
3
h3. Summary
4
5
The Objecter and librados currently use a single global lock for all state.  Break this down to improve multithread performance.
6
7
h3. Owners
8
9
* Sage Weil (Inktank)
10
* Name (Affiliation)
11
* Name
12
13
h3. Interested Parties
14
15
* Somnath Ray (SanDisk)
16
* Haomai Wang (UnitedStack)
17
* Guang Yang (Yahoo!)
18
19
h3. Current Status
20
21
* Objecter uses a single lock for all state.
22
* Objecter doesn't own the lock; it is provided by the caller/owner (e.g., librados's lock, or MDS's lock, or Client's lock)
23
* Objecter has two basic categories of state:
24
** OSDMap state
25
** per-OSD session state
26
*** list of requests, Connection*, etc.
27
28
h3. Detailed Description
29
 
30
h3. Work items
31
32
h4. Coding tasks
33
34
# objecter: take over ownership of lock
35
## do not take caller's lock
36
## remove assumption that completion callbacks are invoked with locks held
37
## remove assumption that messages are passed in with locks held
38
# add read/write lock protecting just OSDMap and session map
39
## use this in place of global lock where possible
40
# replace global counters with atomics
41
# add new lock protecting non-osd operations (stuff for the mon)
42
# move ops, linger_ops, etc into per-session maps
43
## with luck, this will simplify the code that verifies the reply came back from the right now
44
## it will complicate somewhat the code the recalculates targets for ops bc they will move around betwen sessions.held 
45
# add per-OSDSession r/w lock
46
## use this in place of the global lock when initiating operations
47
## allocate tid via an atomic inside the session lock
48
## do a readlock/unlock/writelock retry loop when the needed session is not open
49
# modify smalliobench or similar tool to submit requests via many threads