mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frederic Weisbecker <frederic@kernel.org>
To: Kunwu Chan <kunwu.chan@gmail.com>
Cc: arnd@arndb.de, anna-maria@linutronix.de, mingo@kernel.org,
	tglx@kernel.org, linux-arch@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] timers/nohz: Mark got_idle_tick accesses as same-CPU races
Date: Mon, 5 Oct 2026 16:54:14 +0200	[thread overview]
Message-ID: <asO6FntKFaxnTYX2@localhost.localdomain> (raw)
In-Reply-To: <20261002151757.3605081-3-kunwu.chan@gmail.com>

Le Fri, Oct 02, 2026 at 11:17:56PM +0800, Kunwu Chan a écrit :
> got_idle_tick is a per-CPU flag set by the tick interrupt handler in
> tick_sched_do_timer() and read and cleared by the idle path in
> tick_nohz_idle_got_tick().  The flag is intentionally accessed without
> ordering or locking; a concurrent set can be overwritten by the clear.
> 
> Use WRITE_ONCE_THIS_CPU() and READ_ONCE_THIS_CPU() to identify these
> as intentional races between execution contexts on the same CPU,
> rather than accesses that may race across CPUs.
> 
> Suggested-by: Thomas Gleixner <tglx@kernel.org>
> Signed-off-by: Kunwu Chan <kunwu.chan@gmail.com>

Reviewed-by: Frederic Weisbecker <frederic@kernel.org>

-- 
Frederic Weisbecker
SUSE Labs

      reply	other threads:[~2026-10-05 14:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02 15:17 [PATCH v2 0/2] rwonce: Introduce {READ,WRITE}_ONCE_THIS_CPU() Kunwu Chan
2026-10-02 15:17 ` [PATCH v2 1/2] rwonce: Add READ_ONCE_THIS_CPU() and WRITE_ONCE_THIS_CPU() Kunwu Chan
2026-10-02 15:44   ` Paul E. McKenney
2026-10-05 14:47   ` Frederic Weisbecker
2026-10-07  2:17     ` KunWu Chan
2026-10-02 15:17 ` [PATCH v2 2/2] timers/nohz: Mark got_idle_tick accesses as same-CPU races Kunwu Chan
2026-10-05 14:54   ` Frederic Weisbecker [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=asO6FntKFaxnTYX2@localhost.localdomain \
    --to=frederic@kernel.org \
    --cc=anna-maria@linutronix.de \
    --cc=arnd@arndb.de \
    --cc=kunwu.chan@gmail.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@kernel.org \
    /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

all inboxes | Powered by JetHome®