Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #122453 > unrolled thread
| Started by | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| First post | 2025-07-29 22:54 -0700 |
| Last post | 2025-08-07 21:08 -0700 |
| Articles | 10 on this page of 90 — 6 participants |
Back to article view | Back to comp.lang.c++
fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-07-29 22:54 -0700
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-02 12:58 -0700
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-02 13:00 -0700
Re: fun with a mutex... Muttley@DastardlyHQ.org - 2025-08-04 08:48 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-04 12:34 -0700
Re: fun with a mutex... Muttley@DastardlyHQ.org - 2025-08-05 07:27 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-05 16:10 -0700
Re: fun with a mutex... cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-06 00:38 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-05 19:14 -0700
Re: fun with a mutex... cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-06 11:29 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-06 15:43 -0700
Re: fun with a mutex... cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-08 01:41 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-07 20:52 -0700
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-05 19:16 -0700
Re: fun with a mutex... cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-06 12:04 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-06 15:47 -0700
Re: fun with a mutex... cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-08 01:49 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-07 20:59 -0700
Re: fun with a mutex... cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-09 09:17 +0000
Re: fun with a mutex... Bonita Montero <Bonita.Montero@gmail.com> - 2025-08-09 11:52 +0200
Re: fun with a mutex... cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-09 16:08 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-09 10:48 -0700
Re: fun with a mutex... cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-10 03:08 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-11 13:37 -0700
Re: fun with a mutex... cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-13 11:41 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-15 17:28 -0700
Re: fun with a mutex... cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-18 20:25 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-18 13:34 -0700
Re: fun with a mutex... cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-18 20:39 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-18 14:06 -0700
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-18 14:28 -0700
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-18 14:33 -0700
Re: fun with a mutex... cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-18 22:56 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-18 16:09 -0700
Re: fun with a mutex... cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-18 23:44 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-18 16:55 -0700
Re: fun with a mutex... cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-18 23:57 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-19 13:25 -0700
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-15 17:30 -0700
Re: fun with a mutex... cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-18 20:26 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-18 13:39 -0700
Re: fun with a mutex... cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-18 20:44 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-18 14:08 -0700
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-18 16:11 -0700
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-18 16:20 -0700
Re: fun with a mutex... Bonita Montero <Bonita.Montero@gmail.com> - 2025-08-11 11:04 +0200
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-11 13:30 -0700
Re: fun with a mutex... Bonita Montero <Bonita.Montero@gmail.com> - 2025-08-12 10:23 +0200
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-12 01:31 -0700
Re: fun with a mutex... Bonita Montero <Bonita.Montero@gmail.com> - 2025-08-12 10:39 +0200
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-12 01:45 -0700
Re: fun with a mutex... Bonita Montero <Bonita.Montero@gmail.com> - 2025-08-12 10:56 +0200
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-12 02:14 -0700
Re: fun with a mutex... Bonita Montero <Bonita.Montero@gmail.com> - 2025-08-12 15:08 +0200
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-15 21:36 -0700
Re: fun with a mutex... Bonita Montero <Bonita.Montero@gmail.com> - 2025-08-16 10:13 +0200
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-16 01:56 -0700
Re: fun with a mutex... Bonita Montero <Bonita.Montero@gmail.com> - 2025-08-16 11:05 +0200
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-16 13:31 -0700
Re: fun with a mutex... Bonita Montero <Bonita.Montero@gmail.com> - 2025-08-17 14:50 +0200
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-17 13:43 -0700
Re: fun with a mutex... cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-13 11:45 +0000
Re: fun with a mutex... Bonita Montero <Bonita.Montero@gmail.com> - 2025-08-13 19:07 +0200
Re: fun with a mutex... scott@slp53.sl.home (Scott Lurndal) - 2025-08-13 17:31 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-15 10:00 -0700
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-13 12:41 -0700
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-09 10:44 -0700
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-09 11:00 -0700
Re: fun with a mutex... "Fred. Zwarts" <F.Zwarts@HetNet.nl> - 2025-08-05 10:27 +0200
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-05 16:07 -0700
Re: fun with a mutex... "Fred. Zwarts" <F.Zwarts@HetNet.nl> - 2025-08-06 10:56 +0200
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-06 15:36 -0700
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-04 12:38 -0700
Re: fun with a mutex... Muttley@DastardlyHQ.org - 2025-08-05 07:29 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-05 16:08 -0700
Re: fun with a mutex... Bonita Montero <Bonita.Montero@gmail.com> - 2025-08-06 15:51 +0200
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-06 15:34 -0700
Re: fun with a mutex... Bonita Montero <Bonita.Montero@gmail.com> - 2025-08-07 06:44 +0200
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-07 12:17 -0700
Re: fun with a mutex... Bonita Montero <Bonita.Montero@gmail.com> - 2025-08-07 21:51 +0200
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-07 12:52 -0700
Re: fun with a mutex... Bonita Montero <Bonita.Montero@gmail.com> - 2025-08-16 11:21 +0200
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-16 13:22 -0700
Re: fun with a mutex... Bonita Montero <Bonita.Montero@gmail.com> - 2025-08-17 03:59 +0200
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-16 23:53 -0700
Re: fun with a mutex... Bonita Montero <Bonita.Montero@gmail.com> - 2025-08-17 10:37 +0200
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-07 12:32 -0700
Re: fun with a mutex... cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-08 01:51 +0000
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-07 21:01 -0700
Re: fun with a mutex... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-07 21:08 -0700
Page 5 of 5 — ← Prev page 1 2 3 4 [5]
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Date | 2025-08-07 12:52 -0700 |
| Message-ID | <107305e$6rav$6@dont-email.me> |
| In reply to | #122488 |
On 8/7/2025 12:51 PM, Bonita Montero wrote: > Am 07.08.2025 um 21:17 schrieb Chris M. Thomasson: > >> On 8/6/2025 9:44 PM, Bonita Montero wrote: > >>> No one actually follows this silly idea. > >> I don't think its totally silly. ... > > It is. > Why? I don't think its 100% silly.
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2025-08-16 11:21 +0200 |
| Message-ID | <107pih3$1katd$1@raubtier-asyl.eternal-september.org> |
| In reply to | #122489 |
Am 07.08.2025 um 21:52 schrieb Chris M. Thomasson: > On 8/7/2025 12:51 PM, Bonita Montero wrote: >> Am 07.08.2025 um 21:17 schrieb Chris M. Thomasson: >> >>> On 8/6/2025 9:44 PM, Bonita Montero wrote: >> >>>> No one actually follows this silly idea. >> >>> I don't think its totally silly. ... >> >> It is. >> > > Why? I don't think its 100% silly. I've already told that: The task needs to be some nanoseconds only (similar to a PAUSE-instruction) to delay the locking not so long and the task must be able to be completely omitted, i.e. it may be excecuted nevey. Both in combination never happens. Show me a paper about your idea. If that would really work someone else should have written a paper about that.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Date | 2025-08-16 13:22 -0700 |
| Message-ID | <107qpak$1tg2i$1@dont-email.me> |
| In reply to | #122545 |
On 8/16/2025 2:21 AM, Bonita Montero wrote: > Am 07.08.2025 um 21:52 schrieb Chris M. Thomasson: >> On 8/7/2025 12:51 PM, Bonita Montero wrote: >>> Am 07.08.2025 um 21:17 schrieb Chris M. Thomasson: >>> >>>> On 8/6/2025 9:44 PM, Bonita Montero wrote: >>> >>>>> No one actually follows this silly idea. >>> >>>> I don't think its totally silly. ... >>> >>> It is. >>> >> >> Why? I don't think its 100% silly. > > I've already told that: The task needs to be some nanoseconds only > (similar to a PAUSE-instruction) to delay the locking not so long > and the task must be able to be completely omitted, i.e. it may be > excecuted nevey. Both in combination never happens. > Show me a paper about your idea. If that would really work someone > else should have written a paper about that. > The backoff that does productive work does not necessarily need that mutex, now, now, now... It's doing other real work in the mean time, during contention?
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2025-08-17 03:59 +0200 |
| Message-ID | <107rd1c$21ktu$1@raubtier-asyl.eternal-september.org> |
| In reply to | #122547 |
Am 16.08.2025 um 22:22 schrieb Chris M. Thomasson: > On 8/16/2025 2:21 AM, Bonita Montero wrote: >> Am 07.08.2025 um 21:52 schrieb Chris M. Thomasson: >>> On 8/7/2025 12:51 PM, Bonita Montero wrote: >>>> Am 07.08.2025 um 21:17 schrieb Chris M. Thomasson: >>>> >>>>> On 8/6/2025 9:44 PM, Bonita Montero wrote: >>>> >>>>>> No one actually follows this silly idea. >>>> >>>>> I don't think its totally silly. ... >>>> >>>> It is. >>>> >>> >>> Why? I don't think its 100% silly. >> >> I've already told that: The task needs to be some nanoseconds only >> (similar to a PAUSE-instruction) to delay the locking not so long >> and the task must be able to be completely omitted, i.e. it may be >> excecuted nevey. Both in combination never happens. >> Show me a paper about your idea. If that would really work someone >> else should have written a paper about that. >> > > The backoff that does productive work does not necessarily need that > mutex, now, now, now... It's doing other real work in the mean time, > during contention? Your idea is total nonsense.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Date | 2025-08-16 23:53 -0700 |
| Message-ID | <107ru9s$24rmm$3@dont-email.me> |
| In reply to | #122549 |
On 8/16/2025 6:59 PM, Bonita Montero wrote: > Am 16.08.2025 um 22:22 schrieb Chris M. Thomasson: >> On 8/16/2025 2:21 AM, Bonita Montero wrote: >>> Am 07.08.2025 um 21:52 schrieb Chris M. Thomasson: >>>> On 8/7/2025 12:51 PM, Bonita Montero wrote: >>>>> Am 07.08.2025 um 21:17 schrieb Chris M. Thomasson: >>>>> >>>>>> On 8/6/2025 9:44 PM, Bonita Montero wrote: >>>>> >>>>>>> No one actually follows this silly idea. >>>>> >>>>>> I don't think its totally silly. ... >>>>> >>>>> It is. >>>>> >>>> >>>> Why? I don't think its 100% silly. >>> >>> I've already told that: The task needs to be some nanoseconds only >>> (similar to a PAUSE-instruction) to delay the locking not so long >>> and the task must be able to be completely omitted, i.e. it may be >>> excecuted nevey. Both in combination never happens. >>> Show me a paper about your idea. If that would really work someone >>> else should have written a paper about that. >>> >> >> The backoff that does productive work does not necessarily need that >> mutex, now, now, now... It's doing other real work in the mean time, >> during contention? > > Your idea is total nonsense. > I still don't think its 100% nonsense.
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2025-08-17 10:37 +0200 |
| Message-ID | <107s4am$26cv7$1@raubtier-asyl.eternal-september.org> |
| In reply to | #122550 |
Am 17.08.2025 um 08:53 schrieb Chris M. Thomasson: >> Your idea is total nonsense. > I still don't think its 100% nonsense. I think some people had this idea already and have withdrawn it because of what I said. It simply doesn't work because the task has to be able to be totally omitted and the task has to be nanoseconds-short. The best thing is to poll with PAUSE instructions and to use the gaps the PAUSE instruction leavs with some other code on the same core.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Date | 2025-08-07 12:32 -0700 |
| Message-ID | <1072v18$6rav$2@dont-email.me> |
| In reply to | #122481 |
On 8/6/2025 9:44 PM, Bonita Montero wrote: > Am 07.08.2025 um 00:34 schrieb Chris M. Thomasson: > >> On 8/6/2025 6:51 AM, Bonita Montero wrote: > >>> This situation almost never happens. >>> It requires that the locking can be delayed an arbitrary time. > >> Not an arbitrary time. Its bounded. > > No one actually follows this silly idea. > Actually, this made me think of an older experiment of mine for a proxy collector using mutexes. It's pretty funny, but works. Humm... If I get some more time tonight I might code it up for fun.
[toc] | [prev] | [next] | [standalone]
| From | cross@spitfire.i.gajendra.net (Dan Cross) |
|---|---|
| Date | 2025-08-08 01:51 +0000 |
| Message-ID | <1073l7t$mpg$3@reader1.panix.com> |
| In reply to | #122477 |
In article <1070laa$3lg2n$1@dont-email.me>, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote: >On 8/6/2025 6:51 AM, Bonita Montero wrote: >> Am 30.07.2025 um 07:54 schrieb Chris M. Thomasson: >> >>> This is using the idea of trying to do other work while a mutex is >>> contended. ... >> >> This situation almost never happens. >> It requires that the locking can be delayed an arbitrary time. > >Not an arbitrary time. Its bounded. The number of times you try to do "other work" may be bounded. But I don't see any why you think you can meaningfully assert that the work itself is usefully bounded. So no, it is not guaranteed to be bounded, in which case you must assume it is unbounded. - Dan C.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Date | 2025-08-07 21:01 -0700 |
| Message-ID | <1073sre$en4a$4@dont-email.me> |
| In reply to | #122494 |
On 8/7/2025 6:51 PM, Dan Cross wrote: > In article <1070laa$3lg2n$1@dont-email.me>, > Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote: >> On 8/6/2025 6:51 AM, Bonita Montero wrote: >>> Am 30.07.2025 um 07:54 schrieb Chris M. Thomasson: >>> >>>> This is using the idea of trying to do other work while a mutex is >>>> contended. ... >>> >>> This situation almost never happens. >>> It requires that the locking can be delayed an arbitrary time. >> >> Not an arbitrary time. Its bounded. > > The number of times you try to do "other work" may be bounded. > But I don't see any why you think you can meaningfully assert > that the work itself is usefully bounded. So no, it is not > guaranteed to be bounded, in which case you must assume it is > unbounded. Humm... Good point. Say the work was a try to pop off a lock-free queue, then stuff that result into a thread local queue. Or, if the work is "compatible", well, not call into unknown user code or something like that, then, execute it. Well, the mutex is contended anyway?Ahhh shit.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Date | 2025-08-07 21:08 -0700 |
| Message-ID | <1073t8c$en4a$5@dont-email.me> |
| In reply to | #122497 |
On 8/7/2025 9:01 PM, Chris M. Thomasson wrote: > On 8/7/2025 6:51 PM, Dan Cross wrote: >> In article <1070laa$3lg2n$1@dont-email.me>, >> Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote: >>> On 8/6/2025 6:51 AM, Bonita Montero wrote: >>>> Am 30.07.2025 um 07:54 schrieb Chris M. Thomasson: >>>> >>>>> This is using the idea of trying to do other work while a mutex is >>>>> contended. ... >>>> >>>> This situation almost never happens. >>>> It requires that the locking can be delayed an arbitrary time. >>> >>> Not an arbitrary time. Its bounded. >> >> The number of times you try to do "other work" may be bounded. >> But I don't see any why you think you can meaningfully assert >> that the work itself is usefully bounded. So no, it is not >> guaranteed to be bounded, in which case you must assume it is >> unbounded. > > Humm... Good point. Say the work was a try to pop off a lock-free queue, > then stuff that result into a thread local queue. Or, if the work is > "compatible", well, not call into unknown user code or something like > that, then, execute it. Well, the mutex is contended anyway?Ahhh shit. Oh... Its been many years. But I just thought of my test bench. Mutex proxy vs lock-free proxy for a poor mans RCU. If a thread hit a failure on a try_lock() it means its in transition, so it should switch to the other set of per-thread locks, and try_lock again. A reapear thread would switch a threads lock index, then take the previous lock. Once a reaper thread held all of the threads previous locks, it was deemed a quiescent state.
[toc] | [prev] | [standalone]
Page 5 of 5 — ← Prev page 1 2 3 4 [5]
Back to top | Article view | comp.lang.c++
csiph-web