FUTEX_WAIT_PRIVATE

489 views
Skip to first unread message

Changli Gao

unread,
Nov 27, 2017, 11:40:03 AM11/27/17
to golang-dev
When profiling a go program, I find there are many lock contentions related to futex. After checking the code of go, I notice that go doesn't utilize FUTEX_WAIT_PRIVATE to avoid to lock mmap_sem. How about setting this flag?

FYI:

Ian Lance Taylor

unread,
Nov 27, 2017, 5:06:56 PM11/27/17
to Changli Gao, golang-dev
Huh. Would be nice if the futex man page documented this flag.

Want to open an issue or send a patch? Thanks.

Ian

Ian Lance Taylor

unread,
Nov 27, 2017, 11:18:59 PM11/27/17
to Changli Gao, golang-dev
Actually I wrote up the patch myself: https://golang.org/cl/80144.

Ian

Brad Fitzpatrick

unread,
Nov 28, 2017, 1:54:36 AM11/28/17
to Ian Lance Taylor, Changli Gao, golang-dev
Changli Gao, can you profile your program again with that change and see how much it helps?

Changli Gao

unread,
Nov 28, 2017, 9:00:51 AM11/28/17
to Brad Fitzpatrick, Ian Lance Taylor, golang-dev
It is an internal program, and I'll try when I have time.
--
Regards,
Changli Gao(xia...@gmail.com)

Uli Kunitz

unread,
Nov 28, 2017, 2:18:14 PM11/28/17
to golang-dev
It is documented in the latest version of Linux man page on Michael Kerrisk's web site:


Debian stable, 9.2, has the the version from the website. Ubuntu LTS 14.04 has an older version not mentioning the FUTEX_PRIVATE_FLAG.
Reply all
Reply to author
Forward
0 new messages