All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Qiang" <Qiang.Zhang@windriver.com>
To: "valentin.schneider@arm.com" <valentin.schneider@arm.com>
Cc: "peterz@infradead.org" <peterz@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: 回复: [PATCH] sched/core: add rcu_read_lock/unlock() protection
Date: Tue, 26 Jan 2021 09:23:11 +0000	[thread overview]
Message-ID: <BYAPR11MB263266B77CE79F2B9780817FFFBC9@BYAPR11MB2632.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210126084651.32277-1-qiang.zhang@windriver.com>



________________________________________
发件人: Zhang, Qiang <qiang.zhang@windriver.com>
发送时间: 2021年1月26日 16:29
收件人: valentin.schneider@arm.com
抄送: peterz@infradead.org; linux-kernel@vger.kernel.org
主题: [PATCH] sched/core: add rcu_read_lock/unlock() protection

>From: Zqiang <qiang.zhang@windriver.com>

>Due to for_each_process_thread belongs to RCU read operation,
>need to add rcu_read_lock/unlock() protection.

  Sorry to disturb you
  I find it's already in the RCU critical zone
  Please ignore this change


>Signed-off-by: Zqiang <qiang.zhang@windriver.com>
>---
> kernel/sched/core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/kernel/sched/core.c b/kernel/sched/core.c
>index 8c5481077c9c..c3f0103fdf53 100644
>--- a/kernel/sched/core.c
>+++ b/kernel/sched/core.c
>@@ -7738,6 +7738,7 @@ static void dump_rq_tasks(struct rq *rq, const char *loglvl)
>        lockdep_assert_held(&rq->lock);
>
>        printk("%sCPU%d enqueued tasks (%u total):\n", loglvl, cpu, rq->nr_running);
>+       rcu_read_lock();
>        for_each_process_thread(g, p) {
>                if (task_cpu(p) != cpu)
>                        continue;
>@@ -7747,6 +7748,7 @@ static void dump_rq_tasks(struct rq *rq, const char *loglvl)
>
>                printk("%s\tpid: %d, name: %s\n", loglvl, p->pid, p->comm);
>        }
>+       rcu_read_unlock();
> }
>
> int sched_cpu_dying(unsigned int cpu)
--
2.17.1


      parent reply	other threads:[~2021-01-26 18:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-26  8:46 [PATCH] sched/core: add rcu_read_lock/unlock() protection qiang.zhang
2021-01-26  9:20 ` Peter Zijlstra
2021-01-26  9:23 ` Zhang, Qiang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BYAPR11MB263266B77CE79F2B9780817FFFBC9@BYAPR11MB2632.namprd11.prod.outlook.com \
    --to=qiang.zhang@windriver.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=valentin.schneider@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.