From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: Muchun Song <smuchun@gmail.com>
Cc: joel@joelfernandes.org, tglx@linutronix.de, mingo@kernel.org,
rostedt@goodmis.org, frederic@kernel.org,
alexander.levin@verizon.com, peterz@infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] softirq: Replace this_cpu_write with __this_cpu_write if irq is disabled
Date: Mon, 24 Jun 2019 16:04:49 -0700 [thread overview]
Message-ID: <20190624230449.GO26519@linux.ibm.com> (raw)
In-Reply-To: <20190618143305.2038-1-smuchun@gmail.com>
On Tue, Jun 18, 2019 at 10:33:05PM +0800, Muchun Song wrote:
> Irq is disabled before this_cpu_write(), so we can Replace this_cpu_write()
> with __this_cpu_write().
>
> Signed-off-by: Muchun Song <smuchun@gmail.com>
This passes light rcutorture testing, and looks rather low risk.
Tested-by: Paul E. McKenney <paulmck@linux.ibm.com>
> ---
> kernel/softirq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/softirq.c b/kernel/softirq.c
> index 2c3382378d94..eaf3bdf7c749 100644
> --- a/kernel/softirq.c
> +++ b/kernel/softirq.c
> @@ -650,7 +650,7 @@ static int takeover_tasklets(unsigned int cpu)
> /* Find end, append list for that CPU. */
> if (&per_cpu(tasklet_vec, cpu).head != per_cpu(tasklet_vec, cpu).tail) {
> *__this_cpu_read(tasklet_vec.tail) = per_cpu(tasklet_vec, cpu).head;
> - this_cpu_write(tasklet_vec.tail, per_cpu(tasklet_vec, cpu).tail);
> + __this_cpu_write(tasklet_vec.tail, per_cpu(tasklet_vec, cpu).tail);
> per_cpu(tasklet_vec, cpu).head = NULL;
> per_cpu(tasklet_vec, cpu).tail = &per_cpu(tasklet_vec, cpu).head;
> }
> --
> 2.17.1
>
prev parent reply other threads:[~2019-06-24 23:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-18 14:33 Muchun Song
2019-06-23 16:19 ` [tip:irq/core] softirq: Use __this_cpu_write() in takeover_tasklets() tip-bot for Muchun Song
2019-06-24 23:04 ` Paul E. McKenney [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=20190624230449.GO26519@linux.ibm.com \
--to=paulmck@linux.ibm.com \
--cc=alexander.levin@verizon.com \
--cc=frederic@kernel.org \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=smuchun@gmail.com \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome