Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1396300

Re: [patch V2 3/7] futex: Add op for hash preallocation

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [patch V2 3/7] futex: Add op for hash preallocation
Date 2016-05-07 13:50 +0200
Message-ID <rw8Ua-PG-9@gated-at.bofh.it> (permalink)
References <rvynE-79b-3@gated-at.bofh.it> <rvynE-79b-1@gated-at.bofh.it> <rvSw1-1EJ-3@gated-at.bofh.it> <rw65Y-6Am-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, 7 May 2016, Thomas Gleixner wrote:
> On Fri, 6 May 2016, Darren Hart wrote:
> > > Note, that this call must be issued before the first futex operation in the
> > > process because that would automatically allocate the default sized hash.
> > 
> > So this seems like it could be tricky for the user as system libraries, like
> > glibc, make use of futexes. Can we guarantee that "sys_futex" is not called by
> > the time main() is called?
> 
> To the extent of my testing I never observed that the hash was automatically
> created when I called futex(PREALLOC) right away in main. But yes, that might
> need some thought.

Thinking more about it. If a process is single threaded and it definitely is
up to the point where it reaches main(), there is nothing which might cause a
sys_futex() call except something which would use shared futexes in the depth
of init code. I doubt that this happens, and if it does, then it's some non
standard feature^Whackery which I do not care about at all.

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[patch V2 3/7] futex: Add op for hash preallocation Thomas Gleixner <tglx@linutronix.de> - 2016-05-05 22:50 +0200
  Re: [patch V2 3/7] futex: Add op for hash preallocation Darren Hart <dvhart@infradead.org> - 2016-05-06 20:20 +0200
    Re: [patch V2 3/7] futex: Add op for hash preallocation Thomas Gleixner <tglx@linutronix.de> - 2016-05-07 10:50 +0200
      Re: [patch V2 3/7] futex: Add op for hash preallocation Thomas Gleixner <tglx@linutronix.de> - 2016-05-07 13:50 +0200

csiph-web