Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp15326rdg; Tue, 10 Oct 2023 02:54:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHEl00SQ64ijHrohHCI4/S4v330hs7AmPdf7fzVxhvmgYeOtznFke9iVHoVC5MP88lOYuj2 X-Received: by 2002:a05:6358:e4aa:b0:143:9b25:c029 with SMTP id by42-20020a056358e4aa00b001439b25c029mr20829288rwb.2.1696931645906; Tue, 10 Oct 2023 02:54:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696931645; cv=none; d=google.com; s=arc-20160816; b=AYXsah+rnrqlwvaX++s5zG0GZrgLqcper4UjU4yBAkQENUrmFQUMGQIh1Pd4UflUU7 RS/ra9FxLPfztIHZ4OtTGATF6J2pgPGFepAQulLnjw4mCUarxDtbitxowA0P+4aDgS5q glt5nSN21vKnBDZ26wMMm3joNxvU+dopj9JiwQjSc0NEIYZAhjJFdU1DTa7hyiq5dbTW 6sJs97eTCYE05Rhv9ynICKBRongcQLBcwY/bS9Ijb8MgjG+YLctJxXNb72W50baT7/Ys cV05niAPFH4xBy46nHVg7NEim7OFSZdAG5XNRhWS8M6u4eqg0anb+DRxrdbZ6NXaXjxP QMLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=BN1O9YSCpiYRqBA6MB47WPD9/qkGd0KlmhUxpeocq7E=; fh=cQXHsYs3PjxW+wzFLCdpZ4OSNsEsWZvDMkIgDN++zlw=; b=XCt0zvoRo/fnyyMtJl9jbyD7x82VnbemWHFt236sDLjdb4CmvJtV82rs9RQ/62zffI a1eKNUSyuTahSAoPxs+dhyME9tA7Rj3Dn3sCO4rBLO0OelZ2qu2Kgcx30Kqwmo8Q2dGF N/6xvvXurXCU1g7XZk3yHodvw0TCEXrJ3PYhWg9Mz6jEXLG1mbf+MYvKfOPd8frKv2q5 mOh1LsQalMn1uMGIcKzvicUpyJ3EO36pKLtcI7FuZku/sJBZZefhoTwlAE7fCZRsMgtm 8dEs9SWe8MJoHGVOE2u1uWmSL9OWAZykKqbwcjboMxXvjWnRBBo9E+Zjj3iJHfU2dq9Q +3+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=MrPL7c5V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id r20-20020a6560d4000000b00588fa0def26si6907532pgv.765.2023.10.10.02.54.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 02:54:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=MrPL7c5V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id EFC2781393F9; Tue, 10 Oct 2023 02:54:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229975AbjJJJyD (ORCPT + 99 others); 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: 8bit 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= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 10 Oct 2023 02:54:05 -0700 (PDT) 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ßschuh --- 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 sleeping * 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 */ -}; 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 +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 sleeping - * lock implementations (mutex, rwsem, etc). - * * Using a single mcs node per CPU is safe because sleeping locks should not be * called from interrupt context and we have preemption disabled while * spinning. --- base-commit: 94f6f0550c625fab1f373bb86a6669b45e9748b3 change-id: 20231010-osq-header-9aca778ade30 Best regards, -- Thomas Weißschuh