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 -------------------------- No file to patch. 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 -------------------------- No file to patch. 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 -------------------------- No file to patch. 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 -------------------------- No file to patch. 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 -------------------------- No file to patch. 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 -------------------------- No file to patch. 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 -------------------------- No file to patch. 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 -------------------------- No file to patch. 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 -------------------------- No file to patch. 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 -------------------------- No file to patch. 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 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored