Re: pcp updates: libpcp locking and concurrency control changes
"Ken McDonell" <[email protected]> Thu, 19 Jan 2017 06:52:52 +1100
| Newsgroups | gmane.comp.sysutils.pcp |
|---|---|
| Message-ID | <[email protected]> |
Frank, Just a small point I noticed on re-reading an earlier response from you. On 16/01/17 11:49, Frank Ch. Eigler wrote: > ... >> [...] Additionally the lock ordering of the new local mutexes >> and __pmLock_extcall ensures these ones are deadlock free. > > Yeah, this is simple to show because "__pmLock_extcall" is a "leaf" > lock, beneath which nothing else (in libpcp) is nested. ... The point I was making was that there are a bunch of newly added local mutexes as well as __pmLock_extcall ... the new ones are named foo_lock for local control within the foo.c source file ... kenj@bozo:~/src/pcp/src/libpcp_fault/src$ grep '[a-z]_lock.*INIT' *.[cy] auxconnect.c:static pthread_mutex_t auxconnect_lock = PTHREAD_MUTEX_INITIALIZER; config.c:static pthread_mutex_t config_lock = PTHREAD_MUTEX_INITIALIZER; fault.c:static pthread_mutex_t fault_lock = PTHREAD_MUTEX_INITIALIZER; pdubuf.c:static pthread_mutex_t pdubuf_lock = PTHREAD_MUTEX_INITIALIZER; pdu.c:static pthread_mutex_t pdu_lock = PTHREAD_MUTEX_INITIALIZER; util.c:static pthread_mutex_t util_lock = PTHREAD_MUTEX_INITIALIZER; and these ones are non-leaves in the lock graph, but are _only_ allowed to lock __pmLock_extcall once a foo_lock is held. So I'm asserting that level N (__pmLock_extcall) and level N-1 (all the foo_lock mutexes) are deadlock free. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#14993): https://groups.io/g/pcp/message/14993 View All Messages In Topic (7): https://groups.io/g/pcp/topic/4185439 Mute This Topic: https://groups.io/mt/4185439?uid=174580 New Topic: https://groups.io/g/pcp/post -=-=- pcp mailing list [email protected] https://groups.io/g/pcp/messages -=-=- Change Your Subscription: https://groups.io/g/pcp/editsub?uid=174580 Group Home: https://groups.io/g/pcp Contact Group Owner: [email protected] Terms of Service: https://groups.io/static/tos Unsubscribe: https://groups.io/g/pcp/leave/354243/563757577/xyzzy -=-=-=-=-=-=-=-=-=-=-=-