I've got a nice idea for a new processor-extrension for spin-wait
-loops. The idea is that a thread of a processors enters a sleep
state if a word in memory is equal to a certain register until
the cacheline containing the word is modified or there's a timeout
according to the timestamp-counter's value.
This would eliminate active spinning and polling a value in memory.
Polling would occur only if the cacheline would be modified by
another thread.
On 3/23/2024 9:53 AM, Bonita Montero wrote:
I've got a nice idea for a new processor-extrension for spin-wait
-loops. The idea is that a thread of a processors enters a sleep
state if a word in memory is equal to a certain register until
the cacheline containing the word is modified or there's a timeout
according to the timestamp-counter's value.
This would eliminate active spinning and polling a value in memory.
Polling would occur only if the cacheline would be modified by
another thread.
futex
On 3/23/2024 9:53 AM, Bonita Montero wrote:
I've got a nice idea for a new processor-extrension for spin-wait
-loops. The idea is that a thread of a processors enters a sleep
state if a word in memory is equal to a certain register until
the cacheline containing the word is modified or there's a timeout
according to the timestamp-counter's value.
This would eliminate active spinning and polling a value in memory.
Polling would occur only if the cacheline would be modified by
another thread.
futex
On 3/23/2024 1:52 PM, Chris M. Thomasson wrote:
On 3/23/2024 9:53 AM, Bonita Montero wrote:
I've got a nice idea for a new processor-extrension for spin-wait
-loops. The idea is that a thread of a processors enters a sleep
state if a word in memory is equal to a certain register until
the cacheline containing the word is modified or there's a timeout
according to the timestamp-counter's value.
This would eliminate active spinning and polling a value in memory.
Polling would occur only if the cacheline would be modified by
another thread.
futex
MWAIT?
Am 23.03.2024 um 21:52 schrieb Chris M. Thomasson:
On 3/23/2024 9:53 AM, Bonita Montero wrote:
I've got a nice idea for a new processor-extrension for spin-wait
-loops. The idea is that a thread of a processors enters a sleep
state if a word in memory is equal to a certain register until
the cacheline containing the word is modified or there's a timeout
according to the timestamp-counter's value.
This would eliminate active spinning and polling a value in memory.
Polling would occur only if the cacheline would be modified by
another thread.
futex
Not all kinds of mutexes can be done with a futex.
On 3/23/2024 9:53 AM, Bonita Montero wrote:
I've got a nice idea for a new processor-extrension for spin-wait
-loops. The idea is that a thread of a processors enters a sleep
state if a word in memory is equal to a certain register until
This sounds like a solution to a problem that doesn't exist,
and there would be no incentive for a processor designer
to include the substantial additional complexity required
to support your feature.
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
On 3/23/2024 9:53 AM, Bonita Montero wrote:
I've got a nice idea for a new processor-extrension for spin-wait
-loops. The idea is that a thread of a processors enters a sleep
state if a word in memory is equal to a certain register until
A processor which is doesn't own (or have a shared copy) of the
cacheline which would contain that word in memory will never know
if it was modified, as it won't see the invalidate messages in
a directory-based cache subsystem (leaving aside noncachable
accesses to the word in memory, of course).
This sounds like a solution to a problem that doesn't exist,
and there would be no incentive for a processor designer
to include the substantial additional complexity required
to support your feature.
On Sun, 24 Mar 2024 20:43:37 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
On 3/23/2024 9:53 AM, Bonita Montero wrote:
I've got a nice idea for a new processor-extrension for spin-wait
-loops. The idea is that a thread of a processors enters a sleep
state if a word in memory is equal to a certain register until
A processor which is doesn't own (or have a shared copy) of the
cacheline which would contain that word in memory will never know
if it was modified, as it won't see the invalidate messages in
a directory-based cache subsystem (leaving aside noncachable
accesses to the word in memory, of course).
It seems, I didn't understand the idea.
The problem does exist and primitive proposed by Bonita is not new.
It is a minor modification of Monitor/Mwait.
Am 23.03.2024 um 21:58 schrieb Chris M. Thomasson:
On 3/23/2024 1:52 PM, Chris M. Thomasson wrote:
On 3/23/2024 9:53 AM, Bonita Montero wrote:
I've got a nice idea for a new processor-extrension for spin-wait
-loops. The idea is that a thread of a processors enters a sleep
state if a word in memory is equal to a certain register until
the cacheline containing the word is modified or there's a timeout
according to the timestamp-counter's value.
This would eliminate active spinning and polling a value in memory.
Polling would occur only if the cacheline would be modified by
another thread.
futex
MWAIT?
MWAIT has no timeout.
On 3/23/2024 11:38 PM, Bonita Montero wrote:
Am 23.03.2024 um 21:58 schrieb Chris M. Thomasson:
On 3/23/2024 1:52 PM, Chris M. Thomasson wrote:
On 3/23/2024 9:53 AM, Bonita Montero wrote:
I've got a nice idea for a new processor-extrension for spin-wait
-loops. The idea is that a thread of a processors enters a sleep
state if a word in memory is equal to a certain register until
the cacheline containing the word is modified or there's a timeout
according to the timestamp-counter's value.
This would eliminate active spinning and polling a value in memory.
Polling would occur only if the cacheline would be modified by
another thread.
futex
MWAIT?
MWAIT has no timeout.
Not sure how important it would be for MWAIT to have a timeout... You
are referring to user space, right?
Am 26.03.2024 um 03:48 schrieb Chris M. Thomasson:
On 3/23/2024 11:38 PM, Bonita Montero wrote:
Am 23.03.2024 um 21:58 schrieb Chris M. Thomasson:
On 3/23/2024 1:52 PM, Chris M. Thomasson wrote:
On 3/23/2024 9:53 AM, Bonita Montero wrote:
I've got a nice idea for a new processor-extrension for spin-wait
-loops. The idea is that a thread of a processors enters a sleep
state if a word in memory is equal to a certain register until
the cacheline containing the word is modified or there's a timeout >>>>>> according to the timestamp-counter's value.
This would eliminate active spinning and polling a value in memory. >>>>>> Polling would occur only if the cacheline would be modified by
another thread.
futex
MWAIT?
MWAIT has no timeout.
Not sure how important it would be for MWAIT to have a timeout... You
are referring to user space, right?
MWAIT could be used for limited spinning like glibc's pthread_mutex
is capable. The advantage of a MWAIT with timout would be much less interconnect-traffic compared to polling.
Am 25.03.2024 um 13:34 schrieb Michael S:
The problem does exist and primitive proposed by Bonita is not new.
It is a minor modification of Monitor/Mwait.
Functionally the modification is minor, but the effect would be
major since the cache-interconnect traffic would be minimized.
On 3/26/2024 3:12 AM, Bonita Montero wrote:
Am 26.03.2024 um 03:48 schrieb Chris M. Thomasson:
On 3/23/2024 11:38 PM, Bonita Montero wrote:
Am 23.03.2024 um 21:58 schrieb Chris M. Thomasson:
On 3/23/2024 1:52 PM, Chris M. Thomasson wrote:
On 3/23/2024 9:53 AM, Bonita Montero wrote:
I've got a nice idea for a new processor-extrension for spin-wait >>>>>>> -loops. The idea is that a thread of a processors enters a sleep >>>>>>> state if a word in memory is equal to a certain register until
the cacheline containing the word is modified or there's a timeout >>>>>>> according to the timestamp-counter's value.
This would eliminate active spinning and polling a value in memory. >>>>>>> Polling would occur only if the cacheline would be modified by
another thread.
futex
MWAIT?
MWAIT has no timeout.
Not sure how important it would be for MWAIT to have a timeout... You
are referring to user space, right?
MWAIT could be used for limited spinning like glibc's pthread_mutex
is capable. The advantage of a MWAIT with timout would be much less
interconnect-traffic compared to polling.
MWAIT is meant to get around polling?
Am 26.03.2024 um 21:02 schrieb Chris M. Thomasson:
On 3/26/2024 3:12 AM, Bonita Montero wrote:
Am 26.03.2024 um 03:48 schrieb Chris M. Thomasson:
On 3/23/2024 11:38 PM, Bonita Montero wrote:
Am 23.03.2024 um 21:58 schrieb Chris M. Thomasson:
On 3/23/2024 1:52 PM, Chris M. Thomasson wrote:
On 3/23/2024 9:53 AM, Bonita Montero wrote:
I've got a nice idea for a new processor-extrension for spin-wait >>>>>>>> -loops. The idea is that a thread of a processors enters a sleep >>>>>>>> state if a word in memory is equal to a certain register until >>>>>>>> the cacheline containing the word is modified or there's a timeout >>>>>>>> according to the timestamp-counter's value.
This would eliminate active spinning and polling a value in memory. >>>>>>>> Polling would occur only if the cacheline would be modified by >>>>>>>> another thread.
futex
MWAIT?
MWAIT has no timeout.
Not sure how important it would be for MWAIT to have a timeout...
You are referring to user space, right?
MWAIT could be used for limited spinning like glibc's pthread_mutex
is capable. The advantage of a MWAIT with timout would be much less
interconnect-traffic compared to polling.
MWAIT is meant to get around polling?
MWAIT could replace polling / spinning on a mutex for a limited
time if it would have a timeout.
On 3/26/2024 1:23 PM, Bonita Montero wrote:
Am 26.03.2024 um 21:02 schrieb Chris M. Thomasson:
On 3/26/2024 3:12 AM, Bonita Montero wrote:
Am 26.03.2024 um 03:48 schrieb Chris M. Thomasson:
On 3/23/2024 11:38 PM, Bonita Montero wrote:
Am 23.03.2024 um 21:58 schrieb Chris M. Thomasson:
On 3/23/2024 1:52 PM, Chris M. Thomasson wrote:
On 3/23/2024 9:53 AM, Bonita Montero wrote:
I've got a nice idea for a new processor-extrension for spin-wait >>>>>>>>> -loops. The idea is that a thread of a processors enters a sleep >>>>>>>>> state if a word in memory is equal to a certain register until >>>>>>>>> the cacheline containing the word is modified or there's a timeout >>>>>>>>> according to the timestamp-counter's value.
This would eliminate active spinning and polling a value in >>>>>>>>> memory.
Polling would occur only if the cacheline would be modified by >>>>>>>>> another thread.
futex
MWAIT?
MWAIT has no timeout.
Not sure how important it would be for MWAIT to have a timeout...
You are referring to user space, right?
MWAIT could be used for limited spinning like glibc's pthread_mutex
is capable. The advantage of a MWAIT with timout would be much less
interconnect-traffic compared to polling.
MWAIT is meant to get around polling?
MWAIT could replace polling / spinning on a mutex for a limited
time if it would have a timeout.
So, you timeout, check some other stuff, then wait again. Still sounds
like polling?
So, you timeout, check some other stuff, then wait again.
Still sounds like polling?
On 3/26/2024 3:12 AM, Bonita Montero wrote:
Am 26.03.2024 um 03:48 schrieb Chris M. Thomasson:
On 3/23/2024 11:38 PM, Bonita Montero wrote:
Am 23.03.2024 um 21:58 schrieb Chris M. Thomasson:
MWAIT?
MWAIT has no timeout.
Not sure how important it would be for MWAIT to have a timeout...
You are referring to user space, right?
MWAIT could be used for limited spinning like glibc's pthread_mutex
is capable. The advantage of a MWAIT with timout would be much less interconnect-traffic compared to polling.
MWAIT is meant to get around polling?
On Tue, 26 Mar 2024 13:02:47 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> wrote:
On 3/26/2024 3:12 AM, Bonita Montero wrote:
Am 26.03.2024 um 03:48 schrieb Chris M. Thomasson:
On 3/23/2024 11:38 PM, Bonita Montero wrote:
Am 23.03.2024 um 21:58 schrieb Chris M. Thomasson:
MWAIT?
MWAIT has no timeout.
Not sure how important it would be for MWAIT to have a timeout...
You are referring to user space, right?
MWAIT could be used for limited spinning like glibc's pthread_mutex
is capable. The advantage of a MWAIT with timout would be much less
interconnect-traffic compared to polling.
MWAIT is meant to get around polling?
I don't know what you mean by 'get around'.
The main point of original Monitor/MWAIT is to allow to one SMT thread
to do polling on memory address in a way that consumes almost no core's execution resources thus allowing to the other SMT thread(s) of the
same core to run faster. The sort of more intelligent PAUSE.
In the absence of other SMT threads the main advantage of polling
loop with Monitor/MWAIT vs simple tight polling loop (STPL) is reduced
power consumption.
As far as cache coherence traffic (CCT) is concerned, Monitor/MWAIT
polling loop provides virtually no advantage relatively to STPL. Both
are quite efficient from CCT perspective, at least as long as programmer
does not do anything stupid.
Later on Intel invented 'MWAIT for Power Management' that has slightly different objectives. But that is O.T.
Sysop: | Tetrazocine |
---|---|
Location: | Melbourne, VIC, Australia |
Users: | 6 |
Nodes: | 8 (0 / 8) |
Uptime: | 26:13:15 |
Calls: | 45 |
Files: | 21,492 |
Messages: | 63,126 |