* Futex Question (64 bits?)
@ 2014-03-24 21:19 Ryan Nicholl
2014-04-21 17:50 ` Randy Dunlap
2014-04-23 5:28 ` Rusty Russell
0 siblings, 2 replies; 3+ messages in thread
From: Ryan Nicholl @ 2014-03-24 21:19 UTC (permalink / raw)
To: linux-kernel; +Cc: Ryan Nicholl
I would like to know if it would be possible to use a 64 bit futex
call? If not, I would like to request it be added. (It is acknowledged
in the manpages that it must be added eventually anyway.)
I am programming a C++11+ library. One of the constructed features is
a "locking pointer". Unfortunately, pointers are usually 64 bits,
while the futex call supports only 32 bits. I could not discover any
documented way to invoke a 64 bit futex call.
It's unfortunate in that the futex call must have a timeout set
because of the possible deadlock condition where only the half of the
pointer not futexed is modified between the time the system call is
entered and executed.
This creates a situation that prevents the locking_ptr from being
realtime safe unless the timeout is set at a very low value.
Furthermore, this causes excess CPU usage due to spurious wakeups.
Thank you,
Ryan Nicholl
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Futex Question (64 bits?)
2014-03-24 21:19 Futex Question (64 bits?) Ryan Nicholl
@ 2014-04-21 17:50 ` Randy Dunlap
2014-04-23 5:28 ` Rusty Russell
1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2014-04-21 17:50 UTC (permalink / raw)
To: Ryan Nicholl, linux-kernel; +Cc: Rusty Russell
[adding Rusty]
On 03/24/2014 02:19 PM, Ryan Nicholl wrote:
> I would like to know if it would be possible to use a 64 bit futex
> call? If not, I would like to request it be added. (It is acknowledged
> in the manpages that it must be added eventually anyway.)
>
> I am programming a C++11+ library. One of the constructed features is
> a "locking pointer". Unfortunately, pointers are usually 64 bits,
> while the futex call supports only 32 bits. I could not discover any
> documented way to invoke a 64 bit futex call.
>
> It's unfortunate in that the futex call must have a timeout set
> because of the possible deadlock condition where only the half of the
> pointer not futexed is modified between the time the system call is
> entered and executed.
>
> This creates a situation that prevents the locking_ptr from being
> realtime safe unless the timeout is set at a very low value.
> Furthermore, this causes excess CPU usage due to spurious wakeups.
>
> Thank you,
> Ryan Nicholl
> --
--
~Randy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Futex Question (64 bits?)
2014-03-24 21:19 Futex Question (64 bits?) Ryan Nicholl
2014-04-21 17:50 ` Randy Dunlap
@ 2014-04-23 5:28 ` Rusty Russell
1 sibling, 0 replies; 3+ messages in thread
From: Rusty Russell @ 2014-04-23 5:28 UTC (permalink / raw)
To: Ryan Nicholl, linux-kernel; +Cc: Ryan Nicholl
Ryan Nicholl <r.p.nicholl@gmail.com> writes:
> I would like to know if it would be possible to use a 64 bit futex
> call? If not, I would like to request it be added. (It is acknowledged
> in the manpages that it must be added eventually anyway.)
It could be done; it's just not been done yet.
Simple matter of coding ;)
Cheers,
Rusty.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-23 5:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-24 21:19 Futex Question (64 bits?) Ryan Nicholl
2014-04-21 17:50 ` Randy Dunlap
2014-04-23 5:28 ` Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox