From patchwork Wed Oct 4 09:42:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 148208 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6359:6f87:b0:13f:353d:d1ed with SMTP id tl7csp2497742rwb; Wed, 4 Oct 2023 02:42:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEnAbgsyrv0Ow6KRcr8syZAH8aYxZ3WkQYQ94W/mes3jRUUbrUYBVc/VyYrwSaBlPUL2zB6 X-Received: by 2002:a05:6a20:138a:b0:159:c918:1016 with SMTP id hn10-20020a056a20138a00b00159c9181016mr1617975pzc.49.1696412540365; Wed, 04 Oct 2023 02:42:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696412540; cv=none; d=google.com; s=arc-20160816; b=sPh5YqjBic15RFqUtY0lBp7VDjiAb6BPVGuO1Su14vG5djj+pYesYqxWGdLv5qQwkD y6NpPIKfO9eCIQbftlKU5HbI9/9LBgRjBIT+QcJqRN7/9djM2b1dJ/lVECP9wF9JthZ9 gAH4dZef0JNpGd8EtW/tUzhp8zx8fGGtDjRIdsHiAMjcpgdqMyzZE8Dy67pKMjGE7RFe 0KSvYUQjqCtQuqHAZsuWB3nvFbPL8AQEFYOpf/bZQ4TiF+124epZVtlwEP1gD+f+Nny8 HlbYlPn78zvuoxWmdlqpUHJ/21JL1//dHiXkEedSn8jQu8r2bAXTzQt5LKveTGhzOaTE qoCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=NJiYFrvJON8gK8MTHd3O+emlPsMk3TFaqei9zpHXqGo=; fh=w9L63TJtWcF/5bKzSZuFYIwT7sumsER2vAsQ+1I9tJc=; b=EsbELQgbIEGyv/QAxxBbGPUVooZs90WALF94LqWzF6f1HeYhu6KUmAYFzMFUijGC0T rX6jrqFV91CMNDswWhbBM774tUtD9P5VcE7IywkXptm7QXreouHMqIKBoeRtUtE3GE7o +1bBP+E0e4TWDPrUi1P22egkbeohZsz0bMVQZ2Xt8hyR3EQO3O585ghKuc1o7gzE1S70 qbyormA2sthh2n/V75CHC/A7QRlL04tWlD0gy6N+sSMVJCRKiCv9/WvVlqwrbkQ2pD4b qfcXd+LlhQ0w2lKG+zyKGHVVL/w3Ve7sw3d4c5g+aGAcyRNuiyyM8GZmhrup/9cVxxpx jBlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=fV7c0KiL; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id bx33-20020a056a02052100b0058555ea0a23si3682093pgb.512.2023.10.04.02.42.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 02:42:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=fV7c0KiL; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id DE7B1816EBC5; Wed, 4 Oct 2023 02:42:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242027AbjJDJmL (ORCPT + 18 others); Wed, 4 Oct 2023 05:42:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232973AbjJDJmK (ORCPT ); Wed, 4 Oct 2023 05:42:10 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8ADE5C1; Wed, 4 Oct 2023 02:42:06 -0700 (PDT) Date: Wed, 04 Oct 2023 09:42:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1696412524; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NJiYFrvJON8gK8MTHd3O+emlPsMk3TFaqei9zpHXqGo=; b=fV7c0KiLnsz1pHeFI4BM0+mYXlB6FRZWfzrc6/wcOyZeKG2Ka6IoVpPEB9jyrbAdf/Z/CC pr9ma7Ue1Jl1DoUqvJaAcMo9k38fA5JLa5sszAsoXtiuxOnPSO/JXxts2AgBfJcg1R6Okf bxncTNkv+0ureqc8+7+i8QBfGlXeKJXR2TBXSS8sQ425Nq7hs3fE+sOuZpgS5Ew2agxT8W dGcC9w1UebR9TPmlrssUI0mAQxqpSlFR+z9UZAIuFuxykvLXO+Pm6TslYnu/vNUUH2Flb0 Xd4kHy1+x2KI3z+f1LfkT3HOLKI6LtK5dH/4eR8W9EBumZydUBbhgA+lDq52qw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1696412524; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NJiYFrvJON8gK8MTHd3O+emlPsMk3TFaqei9zpHXqGo=; b=Dam5xGTfsBGdUENbBg7ocpHBDm3wzZdyfqMZ0QC6eWFGPUZf0BMBvwMxdEVCA5lnmOHKZ7 8Q2nCfPTowyrJICw== From: "tip-bot2 for Ingo Molnar" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/core: Update stale comment in try_to_wake_up() Cc: Zhang Qiao , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230731085759.11443-1-zhangqiao22@huawei.com> References: <20230731085759.11443-1-zhangqiao22@huawei.com> MIME-Version: 1.0 Message-ID: <169641252378.3135.1619855657721221590.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Wed, 04 Oct 2023 02:42:17 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778817376934408806 X-GMAIL-MSGID: 1778817475581311173 The following commit has been merged into the sched/core branch of tip: Commit-ID: bdf85bec2b1ea852daf415cf6f1c9ef7d584c8c5 Gitweb: https://git.kernel.org/tip/bdf85bec2b1ea852daf415cf6f1c9ef7d584c8c5 Author: Ingo Molnar AuthorDate: Wed, 04 Oct 2023 11:33:36 +02:00 Committer: Ingo Molnar CommitterDate: Wed, 04 Oct 2023 11:34:34 +02:00 sched/core: Update stale comment in try_to_wake_up() The following commit: 9b3c4ab3045e ("sched,rcu: Rework try_invoke_on_locked_down_task()") ... renamed try_invoke_on_locked_down_task() to task_call_func(), but forgot to update the comment in try_to_wake_up(). But it turns out that the smp_rmb() doesn't live in task_call_func() either, it was moved to __task_needs_rq_lock() in: 91dabf33ae5d ("sched: Fix race in task_call_func()") Fix that now. Also fix the s/smb/smp typo while at it. Reported-by: Zhang Qiao Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230731085759.11443-1-zhangqiao22@huawei.com --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 65e10ac..f5783cb 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4237,7 +4237,7 @@ int try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags) * Pairs with the LOCK+smp_mb__after_spinlock() on rq->lock in * __schedule(). See the comment for smp_mb__after_spinlock(). * - * A similar smb_rmb() lives in try_invoke_on_locked_down_task(). + * A similar smp_rmb() lives in __task_needs_rq_lock(). */ smp_rmb(); if (READ_ONCE(p->on_rq) && ttwu_runnable(p, wake_flags))