can't find file to patch at input line 167 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |From patchwork Fri Jul 9 00:13:18 2021 |Content-Type: text/plain; charset="utf-8" |MIME-Version: 1.0 |Content-Transfer-Encoding: 8bit |X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Almeida?= | |X-Patchwork-Id: 44277 |Return-Path: |X-Original-To: patchwork@sourceware.org |Delivered-To: patchwork@sourceware.org |Received: from server2.sourceware.org (localhost [IPv6:::1]) | by sourceware.org (Postfix) with ESMTP id 226913982C80 | for ; Fri, 9 Jul 2021 00:15:02 +0000 (GMT) |DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 226913982C80 |DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; | s=default; t=1625789702; | bh=Gh0Oh3bdobKyi47zU2U9eLwzr7irrDNllEbrR0NgZI4=; | h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: | List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: | From; | b=gxTTffFtP0zsiqMFdmwKaGnzWsNa94LuHyXrdxHFxEVL3f+MQeBnZIeJ/5vjqBlTc | CEspuaT0aC0KqJ+SzA5hHCWU3YAeSrdJHVASV6hLTVfpbPpOdC4Yq1NZ0Zl7kOHnXi | 6+yeusPTHYJDf5r1EHb0HhVVSvcLr+Inqqeh5MPU= |X-Original-To: libc-alpha@sourceware.org |Delivered-To: libc-alpha@sourceware.org |Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk | [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) | by sourceware.org (Postfix) with ESMTPS id 6EA3C3982C87 | for ; Fri, 9 Jul 2021 00:14:01 +0000 (GMT) |DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6EA3C3982C87 |Received: from [127.0.0.1] (localhost [127.0.0.1]) | (Authenticated sender: tonyk) with ESMTPSA id 3C9451F41516 |To: Thomas Gleixner , Ingo Molnar , | Peter Zijlstra , Darren Hart , | linux-kernel@vger.kernel.org, Steven Rostedt , | Sebastian Andrzej Siewior |Subject: [PATCH v5 01/11] futex2: Implement wait and wake functions |Date: Thu, 8 Jul 2021 21:13:18 -0300 |Message-Id: <20210709001328.329716-2-andrealmeid@collabora.com> |X-Mailer: git-send-email 2.32.0 |In-Reply-To: <20210709001328.329716-1-andrealmeid@collabora.com> |References: <20210709001328.329716-1-andrealmeid@collabora.com> |MIME-Version: 1.0 |X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, | KAM_DMARC_STATUS, KAM_MANYTO, SPF_HELO_PASS, SPF_PASS, TXREP, | UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 |X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on | server2.sourceware.org |X-BeenThere: libc-alpha@sourceware.org |X-Mailman-Version: 2.1.29 |Precedence: list |List-Id: Libc-alpha mailing list |List-Unsubscribe: , | |List-Archive: |List-Post: |List-Help: |List-Subscribe: , | |X-Patchwork-Original-From: =?utf-8?q?Andr=C3=A9_Almeida_via_Libc-alpha?= | |From: =?utf-8?q?Andr=C3=A9_Almeida?= |Reply-To: =?utf-8?q?Andr=C3=A9_Almeida?= |Cc: fweimer@redhat.com, shuah@kernel.org, Davidlohr Bueso , | libc-alpha@sourceware.org, corbet@lwn.net, linux-api@vger.kernel.org, | z.figura12@gmail.com, | =?utf-8?q?Andr=C3=A9_Almeida?= , | Nicholas Piggin , malteskarupke@fastmail.fm, | acme@kernel.org, linux-kselftest@vger.kernel.org, | Andrey Semashev , joel@joelfernandes.org, | Peter Oskolkov , kernel@collabora.com, krisman@collabora.com, | pgriffais@valvesoftware.com |Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org |Sender: "Libc-alpha" | | |Create a new set of futex syscalls known as futex2. This new interface |is aimed to expand it with new functionalities without modifying the |current complex interface. | |Implement wait and wake functions with support for 32 sized futexes: | |- futex_wait(void *uaddr, unsigned int val, unsigned int flags, | struct timespec *timo) | | The user thread is put to sleep, waiting for a futex_wake() at uaddr, | if the value at *uaddr is the same as val (otherwise, the syscall | returns immediately with -EAGAIN). timo is an optional timeout value | for the operation. | | Return 0 on success, error code otherwise. | | - futex_wake(void *uaddr, unsigned long nr_wake, unsigned int flags) | | Wake `nr_wake` threads waiting at uaddr. | | Return the number of woken threads on success, error code otherwise. | |** The `flag` argument | | The flag is used to specify the size of the futex word | (FUTEX_[8, 16, 32, 64]). It's mandatory to define one. | | By default, the timeout uses a monotonic clock, but can be used as a | realtime one by using the FUTEX_REALTIME_CLOCK flag. | | By default, futexes are of the private type, that means that this user | address will be accessed by threads that shares the same memory region. | This allows for some internal optimizations, so they are faster. | However, if the address needs to be shared with different processes | (like using `mmap()` or `shm()`), they need to be defined as shared and | the flag FUTEX_SHARED_FLAG is used to set that. | | By default, the operation has no NUMA-awareness, meaning that the user | can't choose the memory node where the kernel side futex data will be | stored. The user can choose the node where it wants to operate by | setting the FUTEX_NUMA_FLAG and using the following structure (where X | can be 8, 16, or 32, 64): | | struct futexX_numa { | __uX value; | __sX hint; | }; | | This structure should be passed at the `void *uaddr` of futex | functions. The address of the structure will be used to be waited/waken | on, and the `value` will be compared to `val` as usual. The `hint` | member is used to defined which node the futex will use. When waiting, | the futex will be registered on a kernel-side table stored on that | node; when waking, the futex will be searched for on that given table. | That means that there's no redundancy between tables, and the wrong | `hint` value will led to undesired behavior. Userspace is responsible | for dealing with node migrations issues that may occur. `hint` can | range from [0, MAX_NUMA_NODES], for specifying a node, or -1, to use | the same node the current process is using. | | When not using FUTEX_NUMA_FLAG on a NUMA system, the futex will be | stored on a global table on some node, defined at compilation time. | |** The `timo` argument | |As per the Y2038 work done in the kernel, new interfaces shouldn't add |timeout options known to be buggy. Given that, `timo` should be a 64bit |timeout at all platforms, using an absolute timeout value. | |Signed-off-by: André Almeida |--- | arch/x86/entry/syscalls/syscall_32.tbl | 2 + | arch/x86/entry/syscalls/syscall_64.tbl | 2 + | include/linux/compat.h | 4 + | include/linux/futex.h | 21 +++++ | include/linux/syscalls.h | 6 ++ | include/uapi/asm-generic/unistd.h | 7 +- | include/uapi/linux/futex.h | 4 +- | init/Kconfig | 7 ++ | kernel/Makefile | 1 + | kernel/futex.c | 23 +----- | kernel/futex2.c | 103 +++++++++++++++++++++++++ | kernel/sys_ni.c | 5 ++ | 12 files changed, 163 insertions(+), 22 deletions(-) | create mode 100644 kernel/futex2.c | |diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl |index 4bbc267fb36b..e3b827a9c094 100644 |--- a/arch/x86/entry/syscalls/syscall_32.tbl |+++ b/arch/x86/entry/syscalls/syscall_32.tbl -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 177 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl |index ce18119ea0d0..63b447255df2 100644 |--- a/arch/x86/entry/syscalls/syscall_64.tbl |+++ b/arch/x86/entry/syscalls/syscall_64.tbl -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 190 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/include/linux/compat.h b/include/linux/compat.h |index 8855b1b702b2..5a910e0c437a 100644 |--- a/include/linux/compat.h |+++ b/include/linux/compat.h -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 205 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/include/linux/futex.h b/include/linux/futex.h |index b70df27d7e85..f0eaa05ec8bc 100644 |--- a/include/linux/futex.h |+++ b/include/linux/futex.h -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 237 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h |index 050511e8f1f8..b9c2874410d0 100644 |--- a/include/linux/syscalls.h |+++ b/include/linux/syscalls.h -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 254 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h |index d2a942086fcb..df9fe2e23ee0 100644 |--- a/include/uapi/asm-generic/unistd.h |+++ b/include/uapi/asm-generic/unistd.h -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 273 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/include/uapi/linux/futex.h b/include/uapi/linux/futex.h |index 235e5b2facaa..44750caa261e 100644 |--- a/include/uapi/linux/futex.h |+++ b/include/uapi/linux/futex.h -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 288 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/init/Kconfig b/init/Kconfig |index a61c92066c2e..d87629ec7e48 100644 |--- a/init/Kconfig |+++ b/init/Kconfig -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 306 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/kernel/Makefile b/kernel/Makefile |index 4df609be42d0..1eaf2af50283 100644 |--- a/kernel/Makefile |+++ b/kernel/Makefile -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 318 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/kernel/futex.c b/kernel/futex.c |index 2ecb07575055..ef7131bd8bc4 100644 |--- a/kernel/futex.c |+++ b/kernel/futex.c -------------------------- File to patch: Skip this patch? [y] Skipping patch. 3 out of 3 hunks ignored patching file kernel/futex2.c can't find file to patch at input line 475 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c |index 0ea8128468c3..dbe397eaea46 100644 |--- a/kernel/sys_ni.c |+++ b/kernel/sys_ni.c -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 605 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- | |From patchwork Fri Jul 9 00:13:19 2021 |Content-Type: text/plain; charset="utf-8" |MIME-Version: 1.0 |Content-Transfer-Encoding: 8bit |X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Almeida?= | |X-Patchwork-Id: 44278 |Return-Path: |X-Original-To: patchwork@sourceware.org |Delivered-To: patchwork@sourceware.org |Received: from server2.sourceware.org (localhost [IPv6:::1]) | by sourceware.org (Postfix) with ESMTP id 02F8B3982C88 | for ; Fri, 9 Jul 2021 00:15:47 +0000 (GMT) |DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 02F8B3982C88 |DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; | s=default; t=1625789747; | bh=RfmnEuFzbIYSNH3rNftAYkQpf6ejbKrNWW0AmNx3hxw=; | h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: | List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: | From; | b=HkNrDToHDWordHbeVO2nK+lkW4YE1K9FjLqktuQ5pG+EuqvhVlijER7K1OYUF3koX | Jo8KUPok1MAIOc6E0GfBvulbC+5NF8cK/NSY2TKdcPv/jHAZsvqqTL9vOTB22DUlzc | /hBjI/T37otQteY/962mF6pwah59Q2lAxqqN6zqc= |X-Original-To: libc-alpha@sourceware.org |Delivered-To: libc-alpha@sourceware.org |Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk | [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) | by sourceware.org (Postfix) with ESMTPS id 0E21E385703A | for ; Fri, 9 Jul 2021 00:14:08 +0000 (GMT) |DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0E21E385703A |Received: from [127.0.0.1] (localhost [127.0.0.1]) | (Authenticated sender: tonyk) with ESMTPSA id 04F221F415F9 |To: Thomas Gleixner , Ingo Molnar , | Peter Zijlstra , Darren Hart , | linux-kernel@vger.kernel.org, Steven Rostedt , | Sebastian Andrzej Siewior |Subject: [PATCH v5 02/11] futex2: Implement vectorized wait |Date: Thu, 8 Jul 2021 21:13:19 -0300 |Message-Id: <20210709001328.329716-3-andrealmeid@collabora.com> |X-Mailer: git-send-email 2.32.0 |In-Reply-To: <20210709001328.329716-1-andrealmeid@collabora.com> |References: <20210709001328.329716-1-andrealmeid@collabora.com> |MIME-Version: 1.0 |X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, | KAM_DMARC_STATUS, KAM_MANYTO, SPF_HELO_PASS, SPF_PASS, TXREP, | UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 |X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on | server2.sourceware.org |X-BeenThere: libc-alpha@sourceware.org |X-Mailman-Version: 2.1.29 |Precedence: list |List-Id: Libc-alpha mailing list |List-Unsubscribe: , | |List-Archive: |List-Post: |List-Help: |List-Subscribe: , | |X-Patchwork-Original-From: =?utf-8?q?Andr=C3=A9_Almeida_via_Libc-alpha?= | |From: =?utf-8?q?Andr=C3=A9_Almeida?= |Reply-To: =?utf-8?q?Andr=C3=A9_Almeida?= |Cc: fweimer@redhat.com, shuah@kernel.org, Davidlohr Bueso , | libc-alpha@sourceware.org, corbet@lwn.net, linux-api@vger.kernel.org, | z.figura12@gmail.com, | =?utf-8?q?Andr=C3=A9_Almeida?= , | Nicholas Piggin , malteskarupke@fastmail.fm, | acme@kernel.org, linux-kselftest@vger.kernel.org, | Andrey Semashev , joel@joelfernandes.org, | Peter Oskolkov , kernel@collabora.com, krisman@collabora.com, | pgriffais@valvesoftware.com |Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org |Sender: "Libc-alpha" | | |Add support to wait on multiple futexes. This is the interface |implemented by this syscall: | |futex_waitv(struct futex_waitv *waiters, unsigned int nr_futexes, | unsigned int flags, struct timespec *timo) | |struct futex_waitv { | __u64 val; | void *uaddr; | unsigned int flags; |}; | |Given an array of struct futex_waitv, wait on each uaddr. The thread |wakes if a futex_wake() is performed at any uaddr. The syscall returns |immediately if any waiter has *uaddr != val. *timo is an optional |timeout value for the operation. The flags argument of the syscall |should be used solely for specifying the timeout clock as realtime, if |needed. Flags for shared futexes, sizes, etc. should be used on the |individual flags of each waiter. | |Returns the array index of one of the awakened futexes. There’s no given |information of how many were awakened, or any particular attribute of it |(if it’s the first awakened, if it is of the smaller index...). | |Signed-off-by: André Almeida |--- | arch/x86/entry/syscalls/syscall_32.tbl | 1 + | arch/x86/entry/syscalls/syscall_64.tbl | 1 + | include/linux/compat.h | 9 + | include/linux/futex.h | 108 ++++++-- | include/uapi/asm-generic/unistd.h | 4 +- | include/uapi/linux/futex.h | 15 ++ | kernel/futex.c | 72 +----- | kernel/futex2.c | 345 +++++++++++++++++++++++++ | kernel/sys_ni.c | 2 + | 9 files changed, 477 insertions(+), 80 deletions(-) | |diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl |index e3b827a9c094..5573437c1914 100644 |--- a/arch/x86/entry/syscalls/syscall_32.tbl |+++ b/arch/x86/entry/syscalls/syscall_32.tbl -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 614 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl |index 63b447255df2..bad4aca3e9ba 100644 |--- a/arch/x86/entry/syscalls/syscall_64.tbl |+++ b/arch/x86/entry/syscalls/syscall_64.tbl -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 626 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/include/linux/compat.h b/include/linux/compat.h |index 5a910e0c437a..75b90e41e05b 100644 |--- a/include/linux/compat.h |+++ b/include/linux/compat.h -------------------------- File to patch: Skip this patch? [y] Skipping patch. 2 out of 2 hunks ignored can't find file to patch at input line 653 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/include/linux/futex.h b/include/linux/futex.h |index f0eaa05ec8bc..7afef5bb3da2 100644 |--- a/include/linux/futex.h |+++ b/include/linux/futex.h -------------------------- File to patch: Skip this patch? [y] Skipping patch. 4 out of 4 hunks ignored can't find file to patch at input line 794 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h |index df9fe2e23ee0..57acb3a0f69f 100644 |--- a/include/uapi/asm-generic/unistd.h |+++ b/include/uapi/asm-generic/unistd.h -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 811 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/include/uapi/linux/futex.h b/include/uapi/linux/futex.h |index 44750caa261e..daa135bdedda 100644 |--- a/include/uapi/linux/futex.h |+++ b/include/uapi/linux/futex.h -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 837 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/kernel/futex.c b/kernel/futex.c |index ef7131bd8bc4..135782fc3461 100644 |--- a/kernel/futex.c |+++ b/kernel/futex.c -------------------------- File to patch: Skip this patch? [y] Skipping patch. 9 out of 9 hunks ignored patching file kernel/futex2.c can't find file to patch at input line 1339 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c |index dbe397eaea46..93807bb7be51 100644 |--- a/kernel/sys_ni.c |+++ b/kernel/sys_ni.c -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 1495 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- | |From patchwork Fri Jul 9 00:13:20 2021 |Content-Type: text/plain; charset="utf-8" |MIME-Version: 1.0 |Content-Transfer-Encoding: 8bit |X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Almeida?= | |X-Patchwork-Id: 44279 |Return-Path: |X-Original-To: patchwork@sourceware.org |Delivered-To: patchwork@sourceware.org |Received: from server2.sourceware.org (localhost [IPv6:::1]) | by sourceware.org (Postfix) with ESMTP id 026D1385741D | for ; Fri, 9 Jul 2021 00:16:42 +0000 (GMT) |DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 026D1385741D |DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; | s=default; t=1625789802; | bh=7vZmKfITdR7e0tr64RbVQt1huzWJkWy2O4HlRBTAJ90=; | h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: | List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: | From; | b=fbnEnPuzfD3BEd5LJlnJlTLliz1ZEa+52zbtpCm9rDLdv5J8XQE9C5RkVYIEtrV1V | HUNjefZuFlRz1A0BFk0b9+NDqud7MACnP6YNXi8fwIE0vpTTb6pq1acm8EM4DElKH6 | 0LqwRmvMjgMjSxwPrZbXjuhckRq7pdFjjJB1zUN0= |X-Original-To: libc-alpha@sourceware.org |Delivered-To: libc-alpha@sourceware.org |Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk | [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) | by sourceware.org (Postfix) with ESMTPS id B21FB3982CB0 | for ; Fri, 9 Jul 2021 00:14:14 +0000 (GMT) |DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B21FB3982CB0 |Received: from [127.0.0.1] (localhost [127.0.0.1]) | (Authenticated sender: tonyk) with ESMTPSA id C3F5E1F421A2 |To: Thomas Gleixner , Ingo Molnar , | Peter Zijlstra , Darren Hart , | linux-kernel@vger.kernel.org, Steven Rostedt , | Sebastian Andrzej Siewior |Subject: [PATCH v5 03/11] futex2: Implement requeue operation |Date: Thu, 8 Jul 2021 21:13:20 -0300 |Message-Id: <20210709001328.329716-4-andrealmeid@collabora.com> |X-Mailer: git-send-email 2.32.0 |In-Reply-To: <20210709001328.329716-1-andrealmeid@collabora.com> |References: <20210709001328.329716-1-andrealmeid@collabora.com> |MIME-Version: 1.0 |X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, | KAM_DMARC_STATUS, KAM_MANYTO, SPF_HELO_PASS, SPF_PASS, TXREP, | UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 |X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on | server2.sourceware.org |X-BeenThere: libc-alpha@sourceware.org |X-Mailman-Version: 2.1.29 |Precedence: list |List-Id: Libc-alpha mailing list |List-Unsubscribe: , | |List-Archive: |List-Post: |List-Help: |List-Subscribe: , | |X-Patchwork-Original-From: =?utf-8?q?Andr=C3=A9_Almeida_via_Libc-alpha?= | |From: =?utf-8?q?Andr=C3=A9_Almeida?= |Reply-To: =?utf-8?q?Andr=C3=A9_Almeida?= |Cc: fweimer@redhat.com, shuah@kernel.org, Davidlohr Bueso , | libc-alpha@sourceware.org, corbet@lwn.net, linux-api@vger.kernel.org, | z.figura12@gmail.com, | =?utf-8?q?Andr=C3=A9_Almeida?= , | Nicholas Piggin , malteskarupke@fastmail.fm, | acme@kernel.org, linux-kselftest@vger.kernel.org, | Andrey Semashev , joel@joelfernandes.org, | Peter Oskolkov , kernel@collabora.com, krisman@collabora.com, | pgriffais@valvesoftware.com |Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org |Sender: "Libc-alpha" | | |Implement requeue interface similarly to FUTEX_CMP_REQUEUE operation. | |This is the syscall implemented by this patch: | |futex_requeue(struct futex_requeue *rq1, struct futex_requeue *rq2, | unsigned int nr_wake, unsigned int nr_requeue, | u64 cmpval, unsigned int flags) | |struct futex_requeue { | void *uaddr; | unsigned int flags; |}; | |If (rq1->uaddr == cmpval), wake at rq1->uaddr a nr_wake number of |waiters and then, remove a number of nr_requeue waiters at rq1->uaddr |and add them to rq2->uaddr list. Each uaddr has its own set of flags, |that must be defined at struct futex_requeue (such as size, shared, NUMA). |The flags argument of the syscall is there just for the sake of |extensibility, and right now it needs to be zero. | |Return the number of the woken futexes + the number of requeued ones on |success, error code otherwise. | |Signed-off-by: André Almeida |--- | |The original FUTEX_CMP_REQUEUE interfaces is such as follows: | |futex(*uaddr1, FUTEX_CMP_REQUEUE, nr_wake, nr_requeue, *uaddr2, cmpval); | |Given that when this interface was created they was only one type of |futex (as opposed to futex2, where there is shared, sizes, and NUMA), |there was no way to specify individual flags for uaddr1 and 2. When |FUTEX_PRIVATE was implemented, a new opcode was created as well |(FUTEX_CMP_REQUEUE_PRIVATE), but they apply both futexes, so they |should be of the same type regarding private/shared. This imposes a |limitation on the use cases of the operation, and to overcome that at futex2, |`struct futex_requeue` was created, so one can set individual flags for |each futex. This flexibility is a trade-off with performance, given that |now we need to perform two extra copy_from_user(). One alternative would |be to use the upper half of flags bits to the first one, and the bottom |half for the second futex, but this would also impose limitations, given |that we would limit by half the flags possibilities. If equal futexes |are common enough, the following extension could be added to overcome |the current performance: | |- A flag FUTEX_REQUEUE_EQUAL is added to futex2() flags; |- If futex_requeue() see this flag, that means that both futexes uses | the same set of attributes. |- Then, the function parses the flags as of futex_wait/wake(). |- *rq1 and *rq2 are used as void* (instead of struct | futex_requeue) just like wait/wake(). | |In that way, we could avoid the copy_from_user(). |--- | arch/x86/entry/syscalls/syscall_32.tbl | 1 + | arch/x86/entry/syscalls/syscall_64.tbl | 1 + | include/linux/compat.h | 10 +++ | include/linux/futex.h | 3 + | include/uapi/asm-generic/unistd.h | 4 +- | include/uapi/linux/futex.h | 10 +++ | kernel/futex.c | 18 ++-- | kernel/futex2.c | 111 +++++++++++++++++++++++++ | kernel/sys_ni.c | 2 + | 9 files changed, 150 insertions(+), 10 deletions(-) | |diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl |index 5573437c1914..f02c3da76945 100644 |--- a/arch/x86/entry/syscalls/syscall_32.tbl |+++ b/arch/x86/entry/syscalls/syscall_32.tbl -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 1504 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl |index bad4aca3e9ba..8815c0de5d05 100644 |--- a/arch/x86/entry/syscalls/syscall_64.tbl |+++ b/arch/x86/entry/syscalls/syscall_64.tbl -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 1516 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/include/linux/compat.h b/include/linux/compat.h |index 75b90e41e05b..861616de6d75 100644 |--- a/include/linux/compat.h |+++ b/include/linux/compat.h -------------------------- File to patch: Skip this patch? [y] Skipping patch. 2 out of 2 hunks ignored can't find file to patch at input line 1544 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/include/linux/futex.h b/include/linux/futex.h |index 7afef5bb3da2..95afac7b2f76 100644 |--- a/include/linux/futex.h |+++ b/include/linux/futex.h -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 1558 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h |index 57acb3a0f69f..89a480490dca 100644 |--- a/include/uapi/asm-generic/unistd.h |+++ b/include/uapi/asm-generic/unistd.h -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 1575 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/include/uapi/linux/futex.h b/include/uapi/linux/futex.h |index daa135bdedda..7effdd568699 100644 |--- a/include/uapi/linux/futex.h |+++ b/include/uapi/linux/futex.h -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 1596 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/kernel/futex.c b/kernel/futex.c |index 135782fc3461..7e6d70195d8a 100644 |--- a/kernel/futex.c |+++ b/kernel/futex.c -------------------------- File to patch: Skip this patch? [y] Skipping patch. 5 out of 5 hunks ignored patching file kernel/futex2.c can't find file to patch at input line 1775 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c |index 93807bb7be51..20a425b79fca 100644 |--- a/kernel/sys_ni.c |+++ b/kernel/sys_ni.c -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored patching file Documentation/locking/futex2.rst can't find file to patch at input line 2065 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/Documentation/locking/index.rst b/Documentation/locking/index.rst |index 7003bd5aeff4..9bf03c7fa1ec 100644 |--- a/Documentation/locking/index.rst |+++ b/Documentation/locking/index.rst -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 2175 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- | |From patchwork Fri Jul 9 00:13:22 2021 |Content-Type: text/plain; charset="utf-8" |MIME-Version: 1.0 |Content-Transfer-Encoding: 8bit |X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Almeida?= | |X-Patchwork-Id: 44281 |Return-Path: |X-Original-To: patchwork@sourceware.org |Delivered-To: patchwork@sourceware.org |Received: from server2.sourceware.org (localhost [IPv6:::1]) | by sourceware.org (Postfix) with ESMTP id 5C41C3982C9C | for ; Fri, 9 Jul 2021 00:18:25 +0000 (GMT) |DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C41C3982C9C |DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; | s=default; t=1625789905; | bh=nz1yvyxcq5zr4/YnXLrPUYMSY4jGCdRqxnaLkeHyTyU=; | h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: | List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: | From; | b=b9jNe0EG/ou8RvDZVlucz8bBBhUD+zJXb6JZuNJBvVezifXNWx98NDofK3CrGL9vi | L/H+gUR03Cr3BYm+6a7E/z5maJhYH3NDAAE5PMpz83WIVzR/o92GA951UCg/D79QKl | nM9N7T9v3HYd9eTM2RE/kpZtW4QG3xpMDJpQRueo= |X-Original-To: libc-alpha@sourceware.org |Delivered-To: libc-alpha@sourceware.org |Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk | [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) | by sourceware.org (Postfix) with ESMTPS id B4C0C3982C8A | for ; Fri, 9 Jul 2021 00:14:27 +0000 (GMT) |DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B4C0C3982C8A |Received: from [127.0.0.1] (localhost [127.0.0.1]) | (Authenticated sender: tonyk) with ESMTPSA id BBDC01F4186C |To: Thomas Gleixner , Ingo Molnar , | Peter Zijlstra , Darren Hart , | linux-kernel@vger.kernel.org, Steven Rostedt , | Sebastian Andrzej Siewior |Subject: [PATCH v5 05/11] selftests: futex2: Add wake/wait test |Date: Thu, 8 Jul 2021 21:13:22 -0300 |Message-Id: <20210709001328.329716-6-andrealmeid@collabora.com> |X-Mailer: git-send-email 2.32.0 |In-Reply-To: <20210709001328.329716-1-andrealmeid@collabora.com> |References: <20210709001328.329716-1-andrealmeid@collabora.com> |MIME-Version: 1.0 |X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, | KAM_DMARC_STATUS, KAM_MANYTO, SPF_HELO_PASS, SPF_PASS, TXREP, | UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 |X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on | server2.sourceware.org |X-BeenThere: libc-alpha@sourceware.org |X-Mailman-Version: 2.1.29 |Precedence: list |List-Id: Libc-alpha mailing list |List-Unsubscribe: , | |List-Archive: |List-Post: |List-Help: |List-Subscribe: , | |X-Patchwork-Original-From: =?utf-8?q?Andr=C3=A9_Almeida_via_Libc-alpha?= | |From: =?utf-8?q?Andr=C3=A9_Almeida?= |Reply-To: =?utf-8?q?Andr=C3=A9_Almeida?= |Cc: fweimer@redhat.com, shuah@kernel.org, Davidlohr Bueso , | libc-alpha@sourceware.org, corbet@lwn.net, linux-api@vger.kernel.org, | z.figura12@gmail.com, | =?utf-8?q?Andr=C3=A9_Almeida?= , | Nicholas Piggin , malteskarupke@fastmail.fm, | acme@kernel.org, linux-kselftest@vger.kernel.org, | Andrey Semashev , joel@joelfernandes.org, | Peter Oskolkov , kernel@collabora.com, krisman@collabora.com, | pgriffais@valvesoftware.com |Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org |Sender: "Libc-alpha" | | |Add a simple file to test wake/wait mechanism using futex2 interface. |Test three scenarios: using a common local int variable as private |futex, a shm futex as shared futex and a file-backed shared memory as a |shared futex. This should test all branches of futex_get_key(). | |Create helper files so more tests can evaluate futex2. While 32bit ABIs |from glibc aren't yet able to use 64 bit sized time variables, add a |temporary workaround that implements the required types and calls the |appropriated syscalls, since futex2 doesn't supports 32 bit sized time. | |Signed-off-by: André Almeida |--- | .../selftests/futex/functional/.gitignore | 1 + | .../selftests/futex/functional/Makefile | 4 +- | .../selftests/futex/functional/futex2_wait.c | 195 ++++++++++++++++++ | .../testing/selftests/futex/functional/run.sh | 3 + | .../selftests/futex/include/futex2test.h | 79 +++++++ | 5 files changed, 281 insertions(+), 1 deletion(-) | create mode 100644 tools/testing/selftests/futex/functional/futex2_wait.c | create mode 100644 tools/testing/selftests/futex/include/futex2test.h | |diff --git a/tools/testing/selftests/futex/functional/.gitignore b/tools/testing/selftests/futex/functional/.gitignore |index 0e78b49d0f2f..3e2d577c0595 100644 |--- a/tools/testing/selftests/futex/functional/.gitignore |+++ b/tools/testing/selftests/futex/functional/.gitignore -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 2184 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile |index bd1fec59e010..e4e4aa2e0368 100644 |--- a/tools/testing/selftests/futex/functional/Makefile |+++ b/tools/testing/selftests/futex/functional/Makefile -------------------------- File to patch: Skip this patch? [y] Skipping patch. 2 out of 2 hunks ignored patching file tools/testing/selftests/futex/functional/futex2_wait.c can't find file to patch at input line 2407 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/tools/testing/selftests/futex/functional/run.sh b/tools/testing/selftests/futex/functional/run.sh |index 11a9d62290f5..dbe82275617c 100755 |--- a/tools/testing/selftests/futex/functional/run.sh |+++ b/tools/testing/selftests/futex/functional/run.sh -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored patching file tools/testing/selftests/futex/include/futex2test.h can't find file to patch at input line 2589 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- | |From patchwork Fri Jul 9 00:13:23 2021 |Content-Type: text/plain; charset="utf-8" |MIME-Version: 1.0 |Content-Transfer-Encoding: 8bit |X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Almeida?= | |X-Patchwork-Id: 44282 |Return-Path: |X-Original-To: patchwork@sourceware.org |Delivered-To: patchwork@sourceware.org |Received: from server2.sourceware.org (localhost [IPv6:::1]) | by sourceware.org (Postfix) with ESMTP id 61FB93982C9E | for ; Fri, 9 Jul 2021 00:19:20 +0000 (GMT) |DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 61FB93982C9E |DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; | s=default; t=1625789960; | bh=TcorSbwgbFwvQl+A+/VL2Kf9iHdE3xA+OvJbPbH6eBE=; | h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: | List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: | From; | b=fmQ/mhKZMACEO47g+j66BrqHoLfGAdrLBRvFEp6H6071zlfIVSgnxc96nFzagDeoG | VfR1tUOl4MkXntiBAxVPYtwC7Gf+77Evhqok8yWhOoJU0+NHStOSWUHdrEMkCh7RDt | rkyK3oUTsXEZmILsf2Q+KF2U7LbQ45PmPOd9qaYI= |X-Original-To: libc-alpha@sourceware.org |Delivered-To: libc-alpha@sourceware.org |Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk | [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) | by sourceware.org (Postfix) with ESMTPS id 2807E3982C8A | for ; Fri, 9 Jul 2021 00:14:34 +0000 (GMT) |DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2807E3982C8A |Received: from [127.0.0.1] (localhost [127.0.0.1]) | (Authenticated sender: tonyk) with ESMTPSA id 5207F1F4198C |To: Thomas Gleixner , Ingo Molnar , | Peter Zijlstra , Darren Hart , | linux-kernel@vger.kernel.org, Steven Rostedt , | Sebastian Andrzej Siewior |Subject: [PATCH v5 06/11] selftests: futex2: Add timeout test |Date: Thu, 8 Jul 2021 21:13:23 -0300 |Message-Id: <20210709001328.329716-7-andrealmeid@collabora.com> |X-Mailer: git-send-email 2.32.0 |In-Reply-To: <20210709001328.329716-1-andrealmeid@collabora.com> |References: <20210709001328.329716-1-andrealmeid@collabora.com> |MIME-Version: 1.0 |X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, | KAM_DMARC_STATUS, KAM_MANYTO, SPF_HELO_PASS, SPF_PASS, TXREP, | UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 |X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on | server2.sourceware.org |X-BeenThere: libc-alpha@sourceware.org |X-Mailman-Version: 2.1.29 |Precedence: list |List-Id: Libc-alpha mailing list |List-Unsubscribe: , | |List-Archive: |List-Post: |List-Help: |List-Subscribe: , | |X-Patchwork-Original-From: =?utf-8?q?Andr=C3=A9_Almeida_via_Libc-alpha?= | |From: =?utf-8?q?Andr=C3=A9_Almeida?= |Reply-To: =?utf-8?q?Andr=C3=A9_Almeida?= |Cc: fweimer@redhat.com, shuah@kernel.org, Davidlohr Bueso , | libc-alpha@sourceware.org, corbet@lwn.net, linux-api@vger.kernel.org, | z.figura12@gmail.com, | =?utf-8?q?Andr=C3=A9_Almeida?= , | Nicholas Piggin , malteskarupke@fastmail.fm, | acme@kernel.org, linux-kselftest@vger.kernel.org, | Andrey Semashev , joel@joelfernandes.org, | Peter Oskolkov , kernel@collabora.com, krisman@collabora.com, | pgriffais@valvesoftware.com |Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org |Sender: "Libc-alpha" | | |Adapt existing futex wait timeout file to test the same mechanism for |futex2. futex2 accepts only absolute 64bit timers, but supports both |monotonic and realtime clocks. | |Signed-off-by: André Almeida |--- | .../futex/functional/futex_wait_timeout.c | 24 +++++++++++++++++-- | 1 file changed, 22 insertions(+), 2 deletions(-) | |diff --git a/tools/testing/selftests/futex/functional/futex_wait_timeout.c b/tools/testing/selftests/futex/functional/futex_wait_timeout.c |index 1f8f6daaf1e7..d20f54745c2e 100644 |--- a/tools/testing/selftests/futex/functional/futex_wait_timeout.c |+++ b/tools/testing/selftests/futex/functional/futex_wait_timeout.c -------------------------- File to patch: Skip this patch? [y] Skipping patch. 4 out of 4 hunks ignored can't find file to patch at input line 2731 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- | |From patchwork Fri Jul 9 00:13:24 2021 |Content-Type: text/plain; charset="utf-8" |MIME-Version: 1.0 |Content-Transfer-Encoding: 8bit |X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Almeida?= | |X-Patchwork-Id: 44283 |Return-Path: |X-Original-To: patchwork@sourceware.org |Delivered-To: patchwork@sourceware.org |Received: from server2.sourceware.org (localhost [IPv6:::1]) | by sourceware.org (Postfix) with ESMTP id CD4C53982C88 | for ; Fri, 9 Jul 2021 00:20:05 +0000 (GMT) |DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD4C53982C88 |DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; | s=default; t=1625790005; | bh=bGs52aDlqjpIDHDUOAh1QCEWJehV1rmezqgB5PlYwnY=; | h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: | List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: | From; | b=C9KJHTyXbb1X69knkI/gE8QfSAFRYD9QAmhEMgm3pRubTxSmXdMcdGfrD6npirJKF | 6cL4owfxxCFjpqfuyuc8IlDU/J8QMe7RC/TbKrNiVuH0fBCx6Im8HMNXyo4rVxjPfu | 6G8vJKaFM6CGmsqpxODB2gwrWdLY22yj2XalAG3k= |X-Original-To: libc-alpha@sourceware.org |Delivered-To: libc-alpha@sourceware.org |Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk | [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) | by sourceware.org (Postfix) with ESMTPS id AD0A93982C80 | for ; Fri, 9 Jul 2021 00:14:40 +0000 (GMT) |DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AD0A93982C80 |Received: from [127.0.0.1] (localhost [127.0.0.1]) | (Authenticated sender: tonyk) with ESMTPSA id BBD551F41AF2 |To: Thomas Gleixner , Ingo Molnar , | Peter Zijlstra , Darren Hart , | linux-kernel@vger.kernel.org, Steven Rostedt , | Sebastian Andrzej Siewior |Subject: [PATCH v5 07/11] selftests: futex2: Add wouldblock test |Date: Thu, 8 Jul 2021 21:13:24 -0300 |Message-Id: <20210709001328.329716-8-andrealmeid@collabora.com> |X-Mailer: git-send-email 2.32.0 |In-Reply-To: <20210709001328.329716-1-andrealmeid@collabora.com> |References: <20210709001328.329716-1-andrealmeid@collabora.com> |MIME-Version: 1.0 |X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, | KAM_DMARC_STATUS, KAM_MANYTO, SPF_HELO_PASS, SPF_PASS, TXREP, | UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 |X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on | server2.sourceware.org |X-BeenThere: libc-alpha@sourceware.org |X-Mailman-Version: 2.1.29 |Precedence: list |List-Id: Libc-alpha mailing list |List-Unsubscribe: , | |List-Archive: |List-Post: |List-Help: |List-Subscribe: , | |X-Patchwork-Original-From: =?utf-8?q?Andr=C3=A9_Almeida_via_Libc-alpha?= | |From: =?utf-8?q?Andr=C3=A9_Almeida?= |Reply-To: =?utf-8?q?Andr=C3=A9_Almeida?= |Cc: fweimer@redhat.com, shuah@kernel.org, Davidlohr Bueso , | libc-alpha@sourceware.org, corbet@lwn.net, linux-api@vger.kernel.org, | z.figura12@gmail.com, | =?utf-8?q?Andr=C3=A9_Almeida?= , | Nicholas Piggin , malteskarupke@fastmail.fm, | acme@kernel.org, linux-kselftest@vger.kernel.org, | Andrey Semashev , joel@joelfernandes.org, | Peter Oskolkov , kernel@collabora.com, krisman@collabora.com, | pgriffais@valvesoftware.com |Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org |Sender: "Libc-alpha" | | |Adapt existing futex wait wouldblock file to test the same mechanism for |futex2. | |Signed-off-by: André Almeida |--- | .../futex/functional/futex_wait_wouldblock.c | 33 ++++++++++++++++--- | 1 file changed, 29 insertions(+), 4 deletions(-) | |diff --git a/tools/testing/selftests/futex/functional/futex_wait_wouldblock.c b/tools/testing/selftests/futex/functional/futex_wait_wouldblock.c |index 0ae390ff8164..510a98320248 100644 |--- a/tools/testing/selftests/futex/functional/futex_wait_wouldblock.c |+++ b/tools/testing/selftests/futex/functional/futex_wait_wouldblock.c -------------------------- File to patch: Skip this patch? [y] Skipping patch. 4 out of 4 hunks ignored can't find file to patch at input line 2895 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- | |From patchwork Fri Jul 9 00:13:25 2021 |Content-Type: text/plain; charset="utf-8" |MIME-Version: 1.0 |Content-Transfer-Encoding: 8bit |X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Almeida?= | |X-Patchwork-Id: 44284 |Return-Path: |X-Original-To: patchwork@sourceware.org |Delivered-To: patchwork@sourceware.org |Received: from server2.sourceware.org (localhost [IPv6:::1]) | by sourceware.org (Postfix) with ESMTP id 988E43982CB6 | for ; Fri, 9 Jul 2021 00:20:50 +0000 (GMT) |DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 988E43982CB6 |DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; | s=default; t=1625790050; | bh=nvXKUxQM4xjYVP4KI9TcbDjm03C+ffzL6tQsqR7yx9c=; | h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: | List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: | From; | b=lo+nPvwnuJUZYZLbqIUVqaoBUoQkyNL8CKC3Eas6BQAdDsiE8vViSSfMnebZ/QiMg | O84WVKNJcg8CglXUU7P9vQYgTAh3+ZjknLOOU9WS1vL+LLVX9NEjseKK4JNFUbLF/5 | BqGFoA+3/LG6Qverx69oiGoa+H6ugGL2E+2IwSCQ= |X-Original-To: libc-alpha@sourceware.org |Delivered-To: libc-alpha@sourceware.org |Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) | by sourceware.org (Postfix) with ESMTPS id 4215C3982C81 | for ; Fri, 9 Jul 2021 00:14:47 +0000 (GMT) |DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4215C3982C81 |Received: from [127.0.0.1] (localhost [127.0.0.1]) | (Authenticated sender: tonyk) with ESMTPSA id 34CB71F41BA9 |To: Thomas Gleixner , Ingo Molnar , | Peter Zijlstra , Darren Hart , | linux-kernel@vger.kernel.org, Steven Rostedt , | Sebastian Andrzej Siewior |Subject: [PATCH v5 08/11] selftests: futex2: Add waitv test |Date: Thu, 8 Jul 2021 21:13:25 -0300 |Message-Id: <20210709001328.329716-9-andrealmeid@collabora.com> |X-Mailer: git-send-email 2.32.0 |In-Reply-To: <20210709001328.329716-1-andrealmeid@collabora.com> |References: <20210709001328.329716-1-andrealmeid@collabora.com> |MIME-Version: 1.0 |X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, | KAM_DMARC_STATUS, KAM_MANYTO, SPF_HELO_PASS, SPF_PASS, TXREP, | UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 |X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on | server2.sourceware.org |X-BeenThere: libc-alpha@sourceware.org |X-Mailman-Version: 2.1.29 |Precedence: list |List-Id: Libc-alpha mailing list |List-Unsubscribe: , | |List-Archive: |List-Post: |List-Help: |List-Subscribe: , | |X-Patchwork-Original-From: =?utf-8?q?Andr=C3=A9_Almeida_via_Libc-alpha?= | |From: =?utf-8?q?Andr=C3=A9_Almeida?= |Reply-To: =?utf-8?q?Andr=C3=A9_Almeida?= |Cc: fweimer@redhat.com, shuah@kernel.org, Davidlohr Bueso , | libc-alpha@sourceware.org, corbet@lwn.net, linux-api@vger.kernel.org, | z.figura12@gmail.com, | =?utf-8?q?Andr=C3=A9_Almeida?= , | Nicholas Piggin , malteskarupke@fastmail.fm, | acme@kernel.org, linux-kselftest@vger.kernel.org, | Andrey Semashev , joel@joelfernandes.org, | Peter Oskolkov , kernel@collabora.com, krisman@collabora.com, | pgriffais@valvesoftware.com |Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org |Sender: "Libc-alpha" | | |Create a new file to test the waitv mechanism. Test both private and |shared futexes. Wake the last futex in the array, and check if the |return value from futex_waitv() is the right index. | |Signed-off-by: André Almeida |--- | .../selftests/futex/functional/.gitignore | 1 + | .../selftests/futex/functional/Makefile | 3 +- | .../selftests/futex/functional/futex2_waitv.c | 154 ++++++++++++++++++ | .../testing/selftests/futex/functional/run.sh | 3 + | .../selftests/futex/include/futex2test.h | 17 ++ | 5 files changed, 177 insertions(+), 1 deletion(-) | create mode 100644 tools/testing/selftests/futex/functional/futex2_waitv.c | |diff --git a/tools/testing/selftests/futex/functional/.gitignore b/tools/testing/selftests/futex/functional/.gitignore |index 3e2d577c0595..22c572de8d10 100644 |--- a/tools/testing/selftests/futex/functional/.gitignore |+++ b/tools/testing/selftests/futex/functional/.gitignore -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 2904 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile |index e4e4aa2e0368..240b53d8cb07 100644 |--- a/tools/testing/selftests/futex/functional/Makefile |+++ b/tools/testing/selftests/futex/functional/Makefile -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored patching file tools/testing/selftests/futex/functional/futex2_waitv.c can't find file to patch at input line 3078 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/tools/testing/selftests/futex/functional/run.sh b/tools/testing/selftests/futex/functional/run.sh |index dbe82275617c..6d30a30547da 100755 |--- a/tools/testing/selftests/futex/functional/run.sh |+++ b/tools/testing/selftests/futex/functional/run.sh -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored patching file tools/testing/selftests/futex/include/futex2test.h can't find file to patch at input line 3211 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- | |From patchwork Fri Jul 9 00:13:26 2021 |Content-Type: text/plain; charset="utf-8" |MIME-Version: 1.0 |Content-Transfer-Encoding: 8bit |X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Almeida?= | |X-Patchwork-Id: 44285 |Return-Path: |X-Original-To: patchwork@sourceware.org |Delivered-To: patchwork@sourceware.org |Received: from server2.sourceware.org (localhost [IPv6:::1]) | by sourceware.org (Postfix) with ESMTP id 475A23982CA9 | for ; Fri, 9 Jul 2021 00:21:35 +0000 (GMT) |DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 475A23982CA9 |DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; | s=default; t=1625790095; | bh=nulQ6XReEbxYU+TMDQPcHRTV8oDfnM43hw5J8/H/6pU=; | h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: | List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: | From; | b=yHDdA7OHZzfXacVNlH14VTDSxmLl+o+RuwaJCD6P7l1CyVoVTslydPvcrLGVvLzF8 | ATeZ2gs2zaEO06O9ddSsZEEaY5BlN0TKY26ytdUv0D+aR5Nkt5gE4vrNiYRp7ZUrxw | PNvKgcnAtV9c1AalhzmukGTmIe2csNC4rrZ72J+M= |X-Original-To: libc-alpha@sourceware.org |Delivered-To: libc-alpha@sourceware.org |Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) | by sourceware.org (Postfix) with ESMTPS id A08163982C88 | for ; Fri, 9 Jul 2021 00:14:53 +0000 (GMT) |DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A08163982C88 |Received: from [127.0.0.1] (localhost [127.0.0.1]) | (Authenticated sender: tonyk) with ESMTPSA id 996E21F433BD |To: Thomas Gleixner , Ingo Molnar , | Peter Zijlstra , Darren Hart , | linux-kernel@vger.kernel.org, Steven Rostedt , | Sebastian Andrzej Siewior |Subject: [PATCH v5 09/11] selftests: futex2: Add requeue test |Date: Thu, 8 Jul 2021 21:13:26 -0300 |Message-Id: <20210709001328.329716-10-andrealmeid@collabora.com> |X-Mailer: git-send-email 2.32.0 |In-Reply-To: <20210709001328.329716-1-andrealmeid@collabora.com> |References: <20210709001328.329716-1-andrealmeid@collabora.com> |MIME-Version: 1.0 |X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, | KAM_DMARC_STATUS, KAM_MANYTO, SPF_HELO_PASS, SPF_PASS, TXREP, | UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 |X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on | server2.sourceware.org |X-BeenThere: libc-alpha@sourceware.org |X-Mailman-Version: 2.1.29 |Precedence: list |List-Id: Libc-alpha mailing list |List-Unsubscribe: , | |List-Archive: |List-Post: |List-Help: |List-Subscribe: , | |X-Patchwork-Original-From: =?utf-8?q?Andr=C3=A9_Almeida_via_Libc-alpha?= | |From: =?utf-8?q?Andr=C3=A9_Almeida?= |Reply-To: =?utf-8?q?Andr=C3=A9_Almeida?= |Cc: fweimer@redhat.com, shuah@kernel.org, Davidlohr Bueso , | libc-alpha@sourceware.org, corbet@lwn.net, linux-api@vger.kernel.org, | z.figura12@gmail.com, | =?utf-8?q?Andr=C3=A9_Almeida?= , | Nicholas Piggin , malteskarupke@fastmail.fm, | acme@kernel.org, linux-kselftest@vger.kernel.org, | Andrey Semashev , joel@joelfernandes.org, | Peter Oskolkov , kernel@collabora.com, krisman@collabora.com, | pgriffais@valvesoftware.com |Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org |Sender: "Libc-alpha" | | |Add testing for futex_requeue(). The first test just requeue from one |waiter to another one, and wake it. The second performs both wake and |requeue, and we check return values to see if the operation |woke/requeued the expected number of waiters. | |Signed-off-by: André Almeida |--- | .../selftests/futex/functional/.gitignore | 1 + | .../selftests/futex/functional/Makefile | 3 +- | .../futex/functional/futex2_requeue.c | 164 ++++++++++++++++++ | .../selftests/futex/include/futex2test.h | 16 ++ | 4 files changed, 183 insertions(+), 1 deletion(-) | create mode 100644 tools/testing/selftests/futex/functional/futex2_requeue.c | |diff --git a/tools/testing/selftests/futex/functional/.gitignore b/tools/testing/selftests/futex/functional/.gitignore |index 22c572de8d10..d63b5f74bd6f 100644 |--- a/tools/testing/selftests/futex/functional/.gitignore |+++ b/tools/testing/selftests/futex/functional/.gitignore -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 3220 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile |index 240b53d8cb07..e162e40ce38f 100644 |--- a/tools/testing/selftests/futex/functional/Makefile |+++ b/tools/testing/selftests/futex/functional/Makefile -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored patching file tools/testing/selftests/futex/functional/futex2_requeue.c patching file tools/testing/selftests/futex/include/futex2test.h can't find file to patch at input line 3522 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- | |From patchwork Fri Jul 9 00:13:27 2021 |Content-Type: text/plain; charset="utf-8" |MIME-Version: 1.0 |Content-Transfer-Encoding: 8bit |X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Almeida?= | |X-Patchwork-Id: 44286 |Return-Path: |X-Original-To: patchwork@sourceware.org |Delivered-To: patchwork@sourceware.org |Received: from server2.sourceware.org (localhost [IPv6:::1]) | by sourceware.org (Postfix) with ESMTP id 13C0C3982C9E | for ; Fri, 9 Jul 2021 00:22:20 +0000 (GMT) |DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13C0C3982C9E |DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; | s=default; t=1625790140; | bh=6oXY9TcEsKmtiBK4PjyUdliWVSOXSP1TmKYX/6a/vpE=; | h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: | List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: | From; | b=ZJt8bfYgwYH9IVQ0nOrbcJF1ukOSINHugjfZ9v1AOg7gfQj3H+or4Z29P1yL0Do6X | VqfWYYNZvUSxs02uxRo77qYjHH7ceyfO/08mxTQO2HZWdj6XmBfGK0DAuAWksr1KFV | +GWhWBbS6cvVptYdpPxF7VpyVsZxNQRgTKVtjbgU= |X-Original-To: libc-alpha@sourceware.org |Delivered-To: libc-alpha@sourceware.org |Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk | [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) | by sourceware.org (Postfix) with ESMTPS id 18B203982C89 | for ; Fri, 9 Jul 2021 00:15:00 +0000 (GMT) |DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 18B203982C89 |Received: from [127.0.0.1] (localhost [127.0.0.1]) | (Authenticated sender: tonyk) with ESMTPSA id 3716A1F41DE0 |To: Thomas Gleixner , Ingo Molnar , | Peter Zijlstra , Darren Hart , | linux-kernel@vger.kernel.org, Steven Rostedt , | Sebastian Andrzej Siewior |Subject: [PATCH v5 10/11] perf bench: Add futex2 benchmark tests |Date: Thu, 8 Jul 2021 21:13:27 -0300 |Message-Id: <20210709001328.329716-11-andrealmeid@collabora.com> |X-Mailer: git-send-email 2.32.0 |In-Reply-To: <20210709001328.329716-1-andrealmeid@collabora.com> |References: <20210709001328.329716-1-andrealmeid@collabora.com> |MIME-Version: 1.0 |X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, | KAM_DMARC_STATUS, KAM_MANYTO, SPF_HELO_PASS, SPF_PASS, TXREP, | UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 |X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on | server2.sourceware.org |X-BeenThere: libc-alpha@sourceware.org |X-Mailman-Version: 2.1.29 |Precedence: list |List-Id: Libc-alpha mailing list |List-Unsubscribe: , | |List-Archive: |List-Post: |List-Help: |List-Subscribe: , | |X-Patchwork-Original-From: =?utf-8?q?Andr=C3=A9_Almeida_via_Libc-alpha?= | |From: =?utf-8?q?Andr=C3=A9_Almeida?= |Reply-To: =?utf-8?q?Andr=C3=A9_Almeida?= |Cc: fweimer@redhat.com, shuah@kernel.org, Davidlohr Bueso , | libc-alpha@sourceware.org, corbet@lwn.net, linux-api@vger.kernel.org, | z.figura12@gmail.com, | =?utf-8?q?Andr=C3=A9_Almeida?= , | Nicholas Piggin , malteskarupke@fastmail.fm, | acme@kernel.org, linux-kselftest@vger.kernel.org, | Andrey Semashev , joel@joelfernandes.org, | Peter Oskolkov , kernel@collabora.com, krisman@collabora.com, | pgriffais@valvesoftware.com |Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org |Sender: "Libc-alpha" | | |Add support at the existing futex benchmarking code base to enable |futex2 calls. `perf bench` tests can be used not only as a way to |measure the performance of implementation, but also as stress testing |for the kernel infrastructure. | |Signed-off-by: André Almeida |--- | tools/arch/x86/include/asm/unistd_64.h | 12 ++++++ | tools/perf/bench/bench.h | 4 ++ | tools/perf/bench/futex-hash.c | 24 +++++++++-- | tools/perf/bench/futex-requeue.c | 57 ++++++++++++++++++++------ | tools/perf/bench/futex-wake-parallel.c | 41 +++++++++++++++--- | tools/perf/bench/futex-wake.c | 37 +++++++++++++---- | tools/perf/bench/futex.h | 47 +++++++++++++++++++++ | tools/perf/builtin-bench.c | 18 ++++++-- | 8 files changed, 206 insertions(+), 34 deletions(-) | |diff --git a/tools/arch/x86/include/asm/unistd_64.h b/tools/arch/x86/include/asm/unistd_64.h |index 4205ed4158bf..191d43d84f04 100644 |--- a/tools/arch/x86/include/asm/unistd_64.h |+++ b/tools/arch/x86/include/asm/unistd_64.h -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 3542 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/tools/perf/bench/bench.h b/tools/perf/bench/bench.h |index eac36afab2b3..12346844b354 100644 |--- a/tools/perf/bench/bench.h |+++ b/tools/perf/bench/bench.h -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 3560 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/tools/perf/bench/futex-hash.c b/tools/perf/bench/futex-hash.c |index b65373ce5c4f..1068749af40c 100644 |--- a/tools/perf/bench/futex-hash.c |+++ b/tools/perf/bench/futex-hash.c -------------------------- File to patch: Skip this patch? [y] Skipping patch. 5 out of 5 hunks ignored can't find file to patch at input line 3620 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/tools/perf/bench/futex-requeue.c b/tools/perf/bench/futex-requeue.c |index 5fa23295ee5f..ee5e0da5ba50 100644 |--- a/tools/perf/bench/futex-requeue.c |+++ b/tools/perf/bench/futex-requeue.c -------------------------- File to patch: Skip this patch? [y] Skipping patch. 9 out of 9 hunks ignored can't find file to patch at input line 3750 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/tools/perf/bench/futex-wake-parallel.c b/tools/perf/bench/futex-wake-parallel.c |index 6e6f5247e1fe..cac90fc0bfb3 100644 |--- a/tools/perf/bench/futex-wake-parallel.c |+++ b/tools/perf/bench/futex-wake-parallel.c -------------------------- File to patch: Skip this patch? [y] Skipping patch. 7 out of 7 hunks ignored can't find file to patch at input line 3842 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/tools/perf/bench/futex-wake.c b/tools/perf/bench/futex-wake.c |index 6d217868f53c..546d2818eed8 100644 |--- a/tools/perf/bench/futex-wake.c |+++ b/tools/perf/bench/futex-wake.c -------------------------- File to patch: Skip this patch? [y] Skipping patch. 6 out of 6 hunks ignored can't find file to patch at input line 3923 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/tools/perf/bench/futex.h b/tools/perf/bench/futex.h |index 31b53cc7d5bc..6b2213cf3f64 100644 |--- a/tools/perf/bench/futex.h |+++ b/tools/perf/bench/futex.h -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 3979 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/tools/perf/builtin-bench.c b/tools/perf/builtin-bench.c |index 62a7b7420a44..e41a95ad2db6 100644 |--- a/tools/perf/builtin-bench.c |+++ b/tools/perf/builtin-bench.c -------------------------- File to patch: Skip this patch? [y] Skipping patch. 3 out of 3 hunks ignored can't find file to patch at input line 4119 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- | |From patchwork Fri Jul 9 00:13:28 2021 |Content-Type: text/plain; charset="utf-8" |MIME-Version: 1.0 |Content-Transfer-Encoding: 8bit |X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Almeida?= | |X-Patchwork-Id: 44287 |Return-Path: |X-Original-To: patchwork@sourceware.org |Delivered-To: patchwork@sourceware.org |Received: from server2.sourceware.org (localhost [IPv6:::1]) | by sourceware.org (Postfix) with ESMTP id 6019C3982CBD | for ; Fri, 9 Jul 2021 00:23:11 +0000 (GMT) |DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6019C3982CBD |DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; | s=default; t=1625790191; | bh=SHfpvjSOhoRk95Wt05YrZ2bTlFczvRUz4LaJI86yPXU=; | h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: | List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: | From; | b=JcrAworOQy4vUVujTzrCDSwLzMcbZcm5FFgxnDOdbLrh3BNeMAgOQV6xIraVCVX1u | foWphvyvGeTpGYFLKgQtkry+ydLQMdHRddvGsBXWEbxjGzPVf68szUIKhd5lXe7zyk | UeKD5YzmDd500UqA2egAqaNSMLxVBpm5n1RK6PFc= |X-Original-To: libc-alpha@sourceware.org |Delivered-To: libc-alpha@sourceware.org |Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) | by sourceware.org (Postfix) with ESMTPS id 8B6AA3982C88 | for ; Fri, 9 Jul 2021 00:15:06 +0000 (GMT) |DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8B6AA3982C88 |Received: from [127.0.0.1] (localhost [127.0.0.1]) | (Authenticated sender: tonyk) with ESMTPSA id AD5281F41E36 |To: Thomas Gleixner , Ingo Molnar , | Peter Zijlstra , Darren Hart , | linux-kernel@vger.kernel.org, Steven Rostedt , | Sebastian Andrzej Siewior |Subject: [PATCH v5 11/11] kernel: Enable waitpid() for futex2 |Date: Thu, 8 Jul 2021 21:13:28 -0300 |Message-Id: <20210709001328.329716-12-andrealmeid@collabora.com> |X-Mailer: git-send-email 2.32.0 |In-Reply-To: <20210709001328.329716-1-andrealmeid@collabora.com> |References: <20210709001328.329716-1-andrealmeid@collabora.com> |MIME-Version: 1.0 |X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, | KAM_DMARC_STATUS, KAM_MANYTO, KAM_NUMSUBJECT, SPF_HELO_PASS, SPF_PASS, TXREP, | UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 |X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on | server2.sourceware.org |X-BeenThere: libc-alpha@sourceware.org |X-Mailman-Version: 2.1.29 |Precedence: list |List-Id: Libc-alpha mailing list |List-Unsubscribe: , | |List-Archive: |List-Post: |List-Help: |List-Subscribe: , | |X-Patchwork-Original-From: =?utf-8?q?Andr=C3=A9_Almeida_via_Libc-alpha?= | |From: =?utf-8?q?Andr=C3=A9_Almeida?= |Reply-To: =?utf-8?q?Andr=C3=A9_Almeida?= |Cc: fweimer@redhat.com, shuah@kernel.org, Davidlohr Bueso , | libc-alpha@sourceware.org, corbet@lwn.net, linux-api@vger.kernel.org, | z.figura12@gmail.com, | =?utf-8?q?Andr=C3=A9_Almeida?= , | Nicholas Piggin , malteskarupke@fastmail.fm, | acme@kernel.org, linux-kselftest@vger.kernel.org, | Andrey Semashev , joel@joelfernandes.org, | Peter Oskolkov , kernel@collabora.com, krisman@collabora.com, | pgriffais@valvesoftware.com |Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org |Sender: "Libc-alpha" | | |To make pthreads works as expected if they are using futex2, wake |clear_child_tid with futex2 as well. This is make applications that uses |waitpid() (and clone(CLONE_CHILD_SETTID)) wake while waiting for the |child to terminate. Given that apps should not mix futex() and futex2(), |any correct app will trigger a harmless noop wakeup on the interface |that it isn't using. | |Signed-off-by: André Almeida |--- | |This commit is here for the intend to show what we need to do in order |to get a full NPTL working on top of futex2. It should be merged after |we talk to glibc folks on the details around the futex_wait() side. For |instance, we could use this as an opportunity to use private futexes or |8bit sized futexes, but both sides need to use the exactly same flags. |--- | include/linux/syscalls.h | 2 ++ | kernel/fork.c | 2 ++ | kernel/futex2.c | 30 ++++++++++++++++++------------ | 3 files changed, 22 insertions(+), 12 deletions(-) | |diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h |index b9c2874410d0..85b5a501fb96 100644 |--- a/include/linux/syscalls.h |+++ b/include/linux/syscalls.h -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 4132 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/kernel/fork.c b/kernel/fork.c |index b4386ff6a641..f3f98e197fb6 100644 |--- a/kernel/fork.c |+++ b/kernel/fork.c -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored patching file kernel/futex2.c