Peter Zijlstra a écrit :
Unfortunately not, nonlinear vmas don't have a linear relation between
address and offset. What you would need to do is do a linear walk of the
page tables. But even that might not suffice if nonlinear vmas may form
a non-injective, surjective mapping.
/me checks..
On Tue, 2007-03-20 at 16:32 +0100, Pierre Peiffer wrote:
> Peter Zijlstra a écrit :
> >> +static void *get_futex_address(union futex_key *key)
> >> +{
> >> + void *uaddr;
> >> +
> >> + if (key->both.offset & 1) {
> >> + /* shared mapping */
> >> + uaddr =
Peter Zijlstra a écrit :
+static void *get_futex_address(union futex_key *key)
+{
+ void *uaddr;
+
+ if (key->both.offset & 1) {
+ /* shared mapping */
+ uaddr = (void*)((key->shared.pgoff << PAGE_SHIFT)
+ + key->shared.offset
Peter Zijlstra a écrit :
+static void *get_futex_address(union futex_key *key)
+{
+ void *uaddr;
+
+ if (key-both.offset 1) {
+ /* shared mapping */
+ uaddr = (void*)((key-shared.pgoff PAGE_SHIFT)
+ + key-shared.offset - 1);
On Tue, 2007-03-20 at 16:32 +0100, Pierre Peiffer wrote:
Peter Zijlstra a écrit :
+static void *get_futex_address(union futex_key *key)
+{
+ void *uaddr;
+
+ if (key-both.offset 1) {
+ /* shared mapping */
+ uaddr = (void*)((key-shared.pgoff PAGE_SHIFT)
+
Peter Zijlstra a écrit :
Unfortunately not, nonlinear vmas don't have a linear relation between
address and offset. What you would need to do is do a linear walk of the
page tables. But even that might not suffice if nonlinear vmas may form
a non-injective, surjective mapping.
/me checks..
On Tue, 2007-03-13 at 10:52 +0100, [EMAIL PROTECTED] wrote:
> plain text document attachment (futex-requeue-pi.diff)
> This patch provides the futex_requeue_pi functionality.
>
> This provides an optimization, already used for (normal) futexes, to be used
> for
> PI-futexes.
>
> This
On Tue, 2007-03-13 at 10:52 +0100, [EMAIL PROTECTED] wrote:
plain text document attachment (futex-requeue-pi.diff)
This patch provides the futex_requeue_pi functionality.
This provides an optimization, already used for (normal) futexes, to be used
for
PI-futexes.
This optimization is
This patch provides the futex_requeue_pi functionality.
This provides an optimization, already used for (normal) futexes, to be used for
PI-futexes.
This optimization is currently used by the glibc in pthread_broadcast, when
using "normal" mutexes. With futex_requeue_pi, it can be used with
This patch provides the futex_requeue_pi functionality.
This provides an optimization, already used for (normal) futexes, to be used for
PI-futexes.
This optimization is currently used by the glibc in pthread_broadcast, when
using normal mutexes. With futex_requeue_pi, it can be used with
10 matches
Mail list logo