Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1403709 > unrolled thread
| Started by | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| First post | 2016-05-19 14:30 +0200 |
| Last post | 2016-05-20 07:00 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [patch V2 3/7] futex: Add op for hash preallocation Peter Zijlstra <peterz@infradead.org> - 2016-05-19 14:30 +0200
Re: [patch V2 3/7] futex: Add op for hash preallocation Darren Hart <dvhart@infradead.org> - 2016-05-19 21:40 +0200
Re: [patch V2 3/7] futex: Add op for hash preallocation Peter Zijlstra <peterz@infradead.org> - 2016-05-20 07:00 +0200
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2016-05-19 14:30 +0200 |
| Subject | Re: [patch V2 3/7] futex: Add op for hash preallocation |
| Message-ID | <rAvft-8bz-41@gated-at.bofh.it> |
On Thu, May 05, 2016 at 08:44:05PM -0000, Thomas Gleixner wrote: > From: Sebastian Siewior <bigeasy@linutronix.de> > > The per process hash is allocated on the fly at the first futex operation of a > process. The size of the hash is determined by a system wide default setting > controlled by the sys admin, This is suboptimal for RT applications and > applications with pathological futex abuse, > > - For RT applications its important to allocate the per process hash before the > first futex operation to avoid the allocation on the first futex operation. > > - For pathological applications which use gazillions of futexes its useful to > allocate a hash greater than the default hash size. > > Add a futex op which allows to preallocate the hash with the requested > size. The size is limited by the systemwide maximum hash size, which can be > set by the admin. The requested size is rounded up to the next order of 2. > > The function can be called several times, but ony the first call results in a > hash allocation of the requested size as there is no non-intrusive way to > reallocate/rehash in a multithreaded application. > > Note, that this call must be issued before the first futex operation in the > process because that would automatically allocate the default sized hash. > > The function returns the actual hash size or 0 if the global hash is used. The > latter is the case on UP and in the rare case that the allocation failed and > the global hash is used as a fallback. OK, so no on-line rehashing possible?
[toc] | [next] | [standalone]
| From | Darren Hart <dvhart@infradead.org> |
|---|---|
| Date | 2016-05-19 21:40 +0200 |
| Message-ID | <rABXB-41A-25@gated-at.bofh.it> |
| In reply to | #1403709 |
On Thu, May 19, 2016 at 02:24:57PM +0200, Peter Zijlstra wrote: > On Thu, May 05, 2016 at 08:44:05PM -0000, Thomas Gleixner wrote: > > From: Sebastian Siewior <bigeasy@linutronix.de> > > > > The per process hash is allocated on the fly at the first futex operation of a > > process. The size of the hash is determined by a system wide default setting > > controlled by the sys admin, This is suboptimal for RT applications and > > applications with pathological futex abuse, > > > > - For RT applications its important to allocate the per process hash before the > > first futex operation to avoid the allocation on the first futex operation. > > > > - For pathological applications which use gazillions of futexes its useful to > > allocate a hash greater than the default hash size. > > > > Add a futex op which allows to preallocate the hash with the requested > > size. The size is limited by the systemwide maximum hash size, which can be > > set by the admin. The requested size is rounded up to the next order of 2. > > > > The function can be called several times, but ony the first call results in a > > hash allocation of the requested size as there is no non-intrusive way to > > reallocate/rehash in a multithreaded application. > > > > Note, that this call must be issued before the first futex operation in the > > process because that would automatically allocate the default sized hash. > > > > The function returns the actual hash size or 0 if the global hash is used. The > > latter is the case on UP and in the rare case that the allocation failed and > > the global hash is used as a fallback. > > OK, so no on-line rehashing possible? It doesn't do it currently... did you see something that makes it impossible to add? -- Darren Hart Intel Open Source Technology Center
[toc] | [prev] | [next] | [standalone]
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2016-05-20 07:00 +0200 |
| Message-ID | <rAKHv-10c-3@gated-at.bofh.it> |
| In reply to | #1403937 |
On Thu, May 19, 2016 at 12:38:19PM -0700, Darren Hart wrote: > On Thu, May 19, 2016 at 02:24:57PM +0200, Peter Zijlstra wrote: > > OK, so no on-line rehashing possible? > > It doesn't do it currently... did you see something that makes it impossible to > add? No, just tons of tricky.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web