All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "Xi Ruoyao" <xry111@xry111.site>,
	libc-alpha@sourceware.org, linux-kernel@vger.kernel.org,
	linux-api@vger.kernel.org, linux-mm@kvack.org,
	linux-arch@vger.kernel.org,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"André Almeida" <andrealmeid@igalia.com>
Subject: Re: Several tst-robust* tests time out with recent Linux kernel
Date: Tue, 14 Nov 2023 17:43:20 +0100	[thread overview]
Message-ID: <87ttpowajb.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20231114154017.GI4779@noisy.programming.kicks-ass.net> (Peter Zijlstra's message of "Tue, 14 Nov 2023 16:40:17 +0100")

* Peter Zijlstra:

>> diff --git a/kernel/futex/futex.h b/kernel/futex/futex.h
>> index b5379c0e6d6d..1a1f9301251f 100644
>> --- a/kernel/futex/futex.h
>> +++ b/kernel/futex/futex.h
>> @@ -17,7 +17,7 @@
>>   * restarts.
>>   */
>>  #ifdef CONFIG_MMU
>> -# define FLAGS_SHARED		0x01
>> +# define FLAGS_SHARED		0x10
>>  #else
>>  /*
>>   * NOMMU does not have per process address space. Let the compiler optimize
>
> Just the above seems sufficient.

There are a few futex_wake calls which hard-code the flags argument as
1:

kernel/futex/core.c=637=static int handle_futex_death(u32 __user *uaddr, struct task_struct *curr,
--
kernel/futex/core.c-686-         * this.
kernel/futex/core.c-687-         */
kernel/futex/core.c-688-        owner = uval & FUTEX_TID_MASK;
kernel/futex/core.c-689-
kernel/futex/core.c-690-        if (pending_op && !pi && !owner) {
kernel/futex/core.c:691:                futex_wake(uaddr, 1, 1, FUTEX_BITSET_MATCH_ANY);
kernel/futex/core.c-692-                return 0;
kernel/futex/core.c-693-        }
kernel/futex/core.c-694-
kernel/futex/core.c-695-        if (owner != task_pid_vnr(curr))
kernel/futex/core.c-696-                return 0;
--
kernel/futex/core.c-739-        /*
kernel/futex/core.c-740-         * Wake robust non-PI futexes here. The wakeup of
kernel/futex/core.c-741-         * PI futexes happens in exit_pi_state():
kernel/futex/core.c-742-         */
kernel/futex/core.c-743-        if (!pi && (uval & FUTEX_WAITERS))
kernel/futex/core.c:744:                futex_wake(uaddr, 1, 1, FUTEX_BITSET_MATCH_ANY);
kernel/futex/core.c-745-
kernel/futex/core.c-746-        return 0;
kernel/futex/core.c-747-}
kernel/futex/core.c-748-
kernel/futex/core.c-749-/*


Thanks,
Florian


  reply	other threads:[~2023-11-14 16:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4bda9f2e06512e375e045f9e72edb205104af19c.camel@xry111.site>
2023-11-14  9:46 ` Several tst-robust* tests time out with recent Linux kernel Xi Ruoyao
2023-11-14 15:31   ` Peter Zijlstra
2023-11-14 15:40     ` Peter Zijlstra
2023-11-14 16:43       ` Florian Weimer [this message]
2023-11-14 20:14         ` Peter Zijlstra
2023-11-14 21:56           ` [tip: locking/urgent] futex: Fix hardcoded flags tip-bot2 for Peter Zijlstra
2023-11-15  1:11           ` Several tst-robust* tests time out with recent Linux kernel Edgecombe, Rick P
2023-11-15  8:51             ` Peter Zijlstra
2023-11-15 23:28               ` Edgecombe, Rick P
2023-11-17  1:22                 ` Edgecombe, Rick P
2024-01-19 13:56                   ` Stefan Liebler
2024-01-29 22:23                     ` Edgecombe, Rick P
2024-01-30 10:12                       ` Stefan Liebler
2023-11-15  3:07           ` [tip: locking/urgent] futex: Fix hardcoded flags tip-bot2 for Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ttpowajb.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=andrealmeid@igalia.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=xry111@xry111.site \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.