Message ID | 20230731085759.11443-1-zhangqiao22@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp1885053vqg; Mon, 31 Jul 2023 02:02:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlH1tLlPcptQ8b6SJahTty3E6UpdM8gT7HnVypm1izzTMyGhFELjFRcIHe/8UXrduRcksQdM X-Received: by 2002:a05:6a20:659:b0:137:6958:d517 with SMTP id 25-20020a056a20065900b001376958d517mr8696550pzm.24.1690794142396; Mon, 31 Jul 2023 02:02:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690794142; cv=none; d=google.com; s=arc-20160816; b=GRERVpKTJzSJ0UpndA/U2fOGa0Rqe4w67Pvp7/1A1tkMS/czV49BRMdtlWvemcxv13 Ii88mrpzSrCMNWRDD9qcUBwV7S16vBejsZFDUIMUQU50ymCHoFueb1DIlQVak7Gckucw On7P6YUptix6IK5pcdIOyo+6kjUpK+bZY1WEkApPIP1cFLk6onBw+EsPzS8o05015coA B/xEuXQq12LkZw6vifmujrsOb6xUwUTNo/4tmC5C/WHs0Lq988IQmuDc4xMqrcBIOv0k Tn3M5zijPUrVMX/qch7PZHsEnFV+/p0nWz4Mq4GC6ScNuxdMSJTPg4M8gKdynIYLmytb CAQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=HiYfwsP+WyB8f/BRPKhvY8aZ6UrV0V3+KGNMnjd+f6U=; fh=+Lb6Bj5yiaZ7I+jl57yAdfi8p6gCLj/9px3MCGZfHII=; b=L8QnRj7Q64baWWwzyXCV3kxafiLwcIz1rVvY9LBIlz4Kj6hHtviQhiqysoB7kMjmqG dmC1/RCxd5T1iR4fJ73EBglzZfPh4U6HRuf56Um3fOqjP09OCnpGfLlAsy5+98qeVMOO gOmgBptumQ8Hjxlpe3PDYWmghVDn92q98pwy/737Z00sjl32/UBjyT876hggw1u8WSoP 4/KlvJuMxdh0dcofTrhjGLx9CJAWRGK22cV4caWho2+8Pz3eMGlIvUYsY2SFDAAQIYs1 oPvYVRMP15p7MpawraH3FAPqKU4yGB22mDxj3bC4HWSRuzcEu5qJsfqnNgF1tVFZfzFv w/fw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w64-20020a638243000000b0055fde1eea55si3246843pgd.391.2023.07.31.02.02.08; Mon, 31 Jul 2023 02:02:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229573AbjGaI0a (ORCPT <rfc822;dengxinlin2429@gmail.com> + 99 others); Mon, 31 Jul 2023 04:26:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229469AbjGaI02 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 31 Jul 2023 04:26:28 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9611FA0 for <linux-kernel@vger.kernel.org>; Mon, 31 Jul 2023 01:26:26 -0700 (PDT) Received: from dggpeml500018.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4RDrsF6cDQz1GDH1; Mon, 31 Jul 2023 16:25:21 +0800 (CST) Received: from huawei.com (10.67.174.191) by dggpeml500018.china.huawei.com (7.185.36.186) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 31 Jul 2023 16:26:20 +0800 From: Zhang Qiao <zhangqiao22@huawei.com> To: <mingo@redhat.com>, <peterz@infradead.org>, <juri.lelli@redhat.com>, <vincent.guittot@linaro.org> CC: <dietmar.eggemann@arm.com>, <rostedt@goodmis.org>, <bsegall@google.com>, <mgorman@suse.de>, <bristot@redhat.com>, <vschneid@redhat.com>, <linux-kernel@vger.kernel.org>, Zhang Qiao <zhangqiao22@huawei.com> Subject: [PATCH] sched: Update comment of try_invoke_on_locked_down_task() Date: Mon, 31 Jul 2023 16:57:59 +0800 Message-ID: <20230731085759.11443-1-zhangqiao22@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.174.191] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500018.china.huawei.com (7.185.36.186) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772926158838498441 X-GMAIL-MSGID: 1772926158838498441 |
Series |
sched: Update comment of try_invoke_on_locked_down_task()
|
|
Commit Message
Zhang Qiao
July 31, 2023, 8:57 a.m. UTC
Since commit 9b3c4ab3045e ("sched,rcu: Rework
try_invoke_on_locked_down_task()") renamed
try_invoke_on_locked_down_task() to task_call_func().
Now, update some comment about it.
Signed-off-by: Zhang Qiao <zhangqiao22@huawei.com>
---
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
* Zhang Qiao <zhangqiao22@huawei.com> wrote: > Since commit 9b3c4ab3045e ("sched,rcu: Rework > try_invoke_on_locked_down_task()") renamed > try_invoke_on_locked_down_task() to task_call_func(). > Now, update some comment about it. > > Signed-off-by: Zhang Qiao <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 0d18c3969f90..540ac33ddb80 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -4186,7 +4186,7 @@ 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 smb_rmb() lives in task_call_func(). Except the matching smp_rmb() doesn't live in task_call_func() anymore, so you now turned a stale comment into a misleading one ... And how about fixing the obvious 'smb/smp' typo as well? Thanks, Ingo
On Wed, Oct 04, 2023 at 11:31:26AM +0200, Ingo Molnar wrote: > > * Zhang Qiao <zhangqiao22@huawei.com> wrote: > > > Since commit 9b3c4ab3045e ("sched,rcu: Rework > > try_invoke_on_locked_down_task()") renamed > > try_invoke_on_locked_down_task() to task_call_func(). > > Now, update some comment about it. > > > > Signed-off-by: Zhang Qiao <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 0d18c3969f90..540ac33ddb80 100644 > > --- a/kernel/sched/core.c > > +++ b/kernel/sched/core.c > > @@ -4186,7 +4186,7 @@ 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 smb_rmb() lives in task_call_func(). > > Except the matching smp_rmb() doesn't live in task_call_func() anymore, so > you now turned a stale comment into a misleading one ... It moved, *again*, it's now in __task_needs_rq_lock() :-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 0d18c3969f90..540ac33ddb80 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4186,7 +4186,7 @@ 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 smb_rmb() lives in task_call_func(). */ smp_rmb(); if (READ_ONCE(p->on_rq) && ttwu_runnable(p, wake_flags))