From nobody Fri Jan 2 15:31:20 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63105CD691F for ; Tue, 10 Oct 2023 09:54:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230021AbjJJJyD (ORCPT ); Tue, 10 Oct 2023 05:54:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230446AbjJJJxz (ORCPT ); Tue, 10 Oct 2023 05:53:55 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A0F593 for ; Tue, 10 Oct 2023 02:53:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1696931631; bh=4A4lQw0bzjvSp3inwHoIDBZkp/sk/XTofAR80wJXCrI=; h=From:Date:Subject:To:Cc:From; b=MrPL7c5VVMa1tNrZbRrspP5Wp26n6h9sxp5FQGqLzjW+ntk0S/Y+Caatlye6iWUyX 4RIR26CEtRgngBY0jxtrAxtGQREVTfzmKtn046zW8/lGMSUb2J0ez7gpCHL+nl5DWv sZgkyUgxasGI+1/9M9ti1XlKAVRxHv+q/MySFdRE= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Tue, 10 Oct 2023 11:53:42 +0200 Subject: [PATCH] locking/osq: remove spin node definition from header MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20231010-osq-header-v1-1-d68fbc1bf1cf@weissschuh.net> X-B4-Tracking: v=1; b=H4sIACUfJWUC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDI2NDA0MD3fziQt2M1MSU1CJdy8TkRHNzCyDb2EAJqKGgKDUtswJsWHRsbS0 Ay+m2UVwAAAA= To: Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1696931630; l=1776; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=4A4lQw0bzjvSp3inwHoIDBZkp/sk/XTofAR80wJXCrI=; b=5kSfQw2XT7Svl8Az/t3Y8YX5Vbsgd+NBLz/Etj4dXt94v7PgBGKJLTabpBpqlTrPY8ss9stq1 P+9lxQHnVX8A+saRK57qQnrWPNne9QGS7GFwat+iMYgvtbiMQDPakv5 X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This structure is an implementation detail of osq_lock.c, and there are no external users. Also drop the redundant overview comment from osq_lock.c. Signed-off-by: Thomas Wei=C3=9Fschuh --- include/linux/osq_lock.h | 5 ----- kernel/locking/osq_lock.c | 9 ++++++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/include/linux/osq_lock.h b/include/linux/osq_lock.h index 5581dbd3bd34..ea8fb31379e3 100644 --- a/include/linux/osq_lock.h +++ b/include/linux/osq_lock.h @@ -6,11 +6,6 @@ * An MCS like lock especially tailored for optimistic spinning for sleepi= ng * lock implementations (mutex, rwsem, etc). */ -struct optimistic_spin_node { - struct optimistic_spin_node *next, *prev; - int locked; /* 1 if lock acquired */ - int cpu; /* encoded CPU # + 1 value */ -}; =20 struct optimistic_spin_queue { /* diff --git a/kernel/locking/osq_lock.c b/kernel/locking/osq_lock.c index d5610ad52b92..918866edbc30 100644 --- a/kernel/locking/osq_lock.c +++ b/kernel/locking/osq_lock.c @@ -3,10 +3,13 @@ #include #include =20 +struct optimistic_spin_node { + struct optimistic_spin_node *next, *prev; + int locked; /* 1 if lock acquired */ + int cpu; /* encoded CPU # + 1 value */ +}; + /* - * An MCS like lock especially tailored for optimistic spinning for sleepi= ng - * lock implementations (mutex, rwsem, etc). - * * Using a single mcs node per CPU is safe because sleeping locks should n= ot be * called from interrupt context and we have preemption disabled while * spinning. --- base-commit: 94f6f0550c625fab1f373bb86a6669b45e9748b3 change-id: 20231010-osq-header-9aca778ade30 Best regards, --=20 Thomas Wei=C3=9Fschuh