From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B607E47DFBD for ; Tue, 19 May 2026 16:29:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779208162; cv=none; b=QLo6StFM8brTaOUGi4UYS7rL0tc/Ge/r6fyW082UqrdcJEF2L95AP99itDtuvGiJnENuar+nQTTx07z/5ex/R6IYVxvHhQM82UyBnC6FjBppaL8fcnYwz34BzTKm1ZrljjJDrhTg5SBC6OFQqg9FU35mztH4Hm0eDSlxOYok2WE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779208162; c=relaxed/simple; bh=17qEwLRrB80H0onuGvp2QfTf0cmXBW7soZ7svBQssJM=; h=Date:To:From:Subject:Message-Id; b=di0Hj96HqD9oJHE1MDQLZAd1072LsCBpVnuz84RXs2Li4YhKJsh7R3C6MWGWdBbnRLiXMKAbcvEccdGSHwsGhmwqC4y3JrORD1G0/AHqn8a+RgJYBMGLCbuwhHKFf/jqud6b4nYCIEYqCAE2aDG+26aVDuCf6JR/tqcuYmtbYkk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=jZWK2iag; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="jZWK2iag" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8DC13C2BCB3; Tue, 19 May 2026 16:29:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1779208162; bh=17qEwLRrB80H0onuGvp2QfTf0cmXBW7soZ7svBQssJM=; h=Date:To:From:Subject:From; b=jZWK2iagWfJ5RX3omzqZGZvKsKyFk8wdR0cemZXX9sOU7CPcC61y823qaG7PYG4WF YuwW7yQldbzpiWwTVJ4twqtRWz3A1HnoozEJk/nLQqkRWtqyCBg59CW7GRswrchDhm a10CwlyH21RP/6prnadD2eoV4hP/ygUWjWx6uvuU= Date: Tue, 19 May 2026 09:29:22 -0700 To: mm-commits@vger.kernel.org,ankur.a.arora@oracle.com,akpm@linux-foundation.org From: Andrew Morton Subject: [to-be-updated] atomic-add-atomic_cond_read__timeout.patch removed from -mm tree Message-Id: <20260519162922.8DC13C2BCB3@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The quilt patch titled Subject: atomic: add atomic_cond_read_*_timeout() has been removed from the -mm tree. Its filename was atomic-add-atomic_cond_read__timeout.patch This patch was dropped because an updated version will be issued ------------------------------------------------------ From: Ankur Arora Subject: atomic: add atomic_cond_read_*_timeout() Date: Wed, 8 Apr 2026 17:55:31 +0530 Add atomic load wrappers, atomic_cond_read_*_timeout() and atomic64_cond_read_*_timeout() for the cond-load timeout interfaces. Also add a short description for the atomic_cond_read_{relaxed,acquire}(), and the atomic_cond_read_{relaxed,acquire}_timeout() interfaces. Link: https://lore.kernel.org/20260408122538.3610871-8-ankur.a.arora@oracle.com Signed-off-by: Ankur Arora Acked-by: Catalin Marinas Cc: Will Deacon Cc: Peter Zijlstra Cc: Boqun Feng Cc: Alexei Starovoitov Cc: Arnd Bergmann Cc: Bjorn Andersson Cc: Boqun Feng Cc: Christoph Lameter Cc: Daniel Lezcano Cc: David Gow Cc: Gary Guo Cc: Haris Okanovic Cc: Ingo Molnar Cc: Konrad Dybcio Cc: Kumar Kartikeya Dwivedi Cc: Mark Rutland Cc: Rafael J. Wysocki (Intel) Signed-off-by: Andrew Morton --- Documentation/atomic_t.txt | 14 +++++++++----- include/linux/atomic.h | 10 ++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) --- a/Documentation/atomic_t.txt~atomic-add-atomic_cond_read__timeout +++ a/Documentation/atomic_t.txt @@ -16,6 +16,10 @@ Non-RMW ops: atomic_read(), atomic_set() atomic_read_acquire(), atomic_set_release() +Non-RMW, non-atomic_t ops: + + atomic_cond_read_{relaxed,acquire}() + atomic_cond_read_{relaxed,acquire}_timeout() RMW atomic operations: @@ -79,11 +83,11 @@ SEMANTICS Non-RMW ops: -The non-RMW ops are (typically) regular LOADs and STOREs and are canonically -implemented using READ_ONCE(), WRITE_ONCE(), smp_load_acquire() and -smp_store_release() respectively. Therefore, if you find yourself only using -the Non-RMW operations of atomic_t, you do not in fact need atomic_t at all -and are doing it wrong. +The non-RMW ops are (typically) regular, or conditional LOADs and STOREs and +are canonically implemented using READ_ONCE(), WRITE_ONCE(), +smp_load_acquire() and smp_store_release() respectively. Therefore, if you +find yourself only using the Non-RMW operations of atomic_t, you do not in +fact need atomic_t at all and are doing it wrong. A note for the implementation of atomic_set{}() is that it must not break the atomicity of the RMW ops. That is: --- a/include/linux/atomic.h~atomic-add-atomic_cond_read__timeout +++ a/include/linux/atomic.h @@ -31,6 +31,16 @@ #define atomic64_cond_read_acquire(v, c) smp_cond_load_acquire(&(v)->counter, (c)) #define atomic64_cond_read_relaxed(v, c) smp_cond_load_relaxed(&(v)->counter, (c)) +#define atomic_cond_read_acquire_timeout(v, c, e, t) \ + smp_cond_load_acquire_timeout(&(v)->counter, (c), (e), (t)) +#define atomic_cond_read_relaxed_timeout(v, c, e, t) \ + smp_cond_load_relaxed_timeout(&(v)->counter, (c), (e), (t)) + +#define atomic64_cond_read_acquire_timeout(v, c, e, t) \ + smp_cond_load_acquire_timeout(&(v)->counter, (c), (e), (t)) +#define atomic64_cond_read_relaxed_timeout(v, c, e, t) \ + smp_cond_load_relaxed_timeout(&(v)->counter, (c), (e), (t)) + /* * The idea here is to build acquire/release variants by adding explicit * barriers on top of the relaxed variant. In the case where the relaxed _ Patches currently in -mm which might be from ankur.a.arora@oracle.com are locking-atomic-scripts-build-atomic_long_cond_read__timeout.patch bpf-rqspinlock-switch-check_timeout-to-a-clock-interface.patch bpf-rqspinlock-use-smp_cond_load_acquire_timeout.patch sched-add-need-resched-timed-wait-interface.patch cpuidle-poll_state-wait-for-need-resched-via-tif_need_resched_relaxed_wait.patch kunit-enable-testing-smp_cond_load_relaxed_timeout.patch kunit-add-tests-for-smp_cond_load_relaxed_timeout.patch