mxnet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bhavin Thaker <bhavintha...@gmail.com>
Subject Re: Futex
Date Fri, 24 Nov 2017 06:27:19 GMT
Yes, here are some links that confirm Haitao Wang’s statement:

The classic book, The linux programming interface, by Michael Kerrisk:
On Linux, mutexes are implemented using futexes(an acronym derived from fast
user space mutexes), and lock contentions are dealt with using the
futex()system
call.

https://stackoverflow.com/questions/6364314/why-is-a-pthread-mutex-considered-slower-than-a-futex

Bhavin Thaker.


On Thu, Nov 23, 2017 at 10:00 PM kellen sunderland <
kellen.sunderland@gmail.com> wrote:

> I think Haitao is right given some stacks we've recently looked at.  e.g.
> https://gist.github.com/KellenSunderland/893d11165e19d1efcf5c0fe8e8584600
>
> -Kellen
>
> On Thu, Nov 23, 2017 at 7:32 PM, Haitao Wang <haitao@openailab.com> wrote:
>
> > Hi, Chris,
> >
> > As far as I know, the mutex implementation in Linux is based on futex
> > already.
> >
> > Thanks,
> > Haitao
> >
> > -----Original Message-----
> > From: dev-return-1553-haitao=openailab.com@mxnet.incubator.apache.org
> > [mailto:dev-return-1553-haitao=openailab.com@mxnet.incubator.apache.org]
> > On Behalf Of Chris Olivier
> > Sent: Friday, November 24, 2017 3:02 AM
> > To: dev@mxnet.incubator.apache.org
> > Subject: Futex
> >
> > Was doing some timing with futexes (we used them a lot in a previous life
> > in database engines) and they're consistently about 20-30% faster than
> > standard mutexes in Linux.
> >
> > However, it seems like this is not worth making a change since mutexes
> > don't tend to get called so much that it would seem to make a noticeable
> > difference, although I could be wrong -- so far besides the queue, I am
> not
> > aware of any major bottlenecks on mutexes.
> >
> > Any thoughts?
> >
> > -Chris
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message