mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frederic Weisbecker <frederic@kernel.org>
To: Usama Arif <usama.arif@linux.dev>
Cc: tglx@kernel.org, anna-maria@linutronix.de,
	linux-kernel@vger.kernel.org, mingo@kernel.org,
	hannes@cmpxchg.org, shakeel.butt@linux.dev, riel@surriel.com,
	kernel-team@meta.com
Subject: Re: [PATCH] tick/nohz: Remove redundant IRQ save/restore
Date: Wed, 16 Sep 2026 16:49:45 +0200	[thread overview]
Message-ID: <aqqsiSDCpvkfxFTI@localhost.localdomain> (raw)
In-Reply-To: <20260916141530.3423310-1-usama.arif@linux.dev>

Le Wed, Sep 16, 2026 at 07:15:30AM -0700, Usama Arif a écrit :
> tick_nohz_update_jiffies() is only reached through tick_irq_enter() from
> hard interrupt entry, where local interrupts are already disabled.
> 
> tick_do_update_jiffies64() requires interrupts to be disabled. The
> local_irq_save()/local_irq_restore() pair around it therefore provides no
> additional interrupt exclusion.
> 
> Remove it and assert the caller invariant instead.
> 
> On x86-64, this avoids the redundant RFLAGS save, CLI, saved-IF test and
> conditional branch on the tick-stopped path.
> 
> On a 252-CPU host running a Thrift RPC service, tick_irq_enter() ran
> 165,116 times/s out of 212-244k interrupts/s. Only calls with
> TS_FLAG_STOPPED reach the optimized path, so this is an upper bound on
> its execution rate.
> 
> Signed-off-by: Usama Arif <usama.arif@linux.dev>

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

-- 
Frederic Weisbecker
SUSE Labs

      reply	other threads:[~2026-09-16 14:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 14:15 Usama Arif
2026-09-16 14:49 ` 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=aqqsiSDCpvkfxFTI@localhost.localdomain \
    --to=frederic@kernel.org \
    --cc=anna-maria@linutronix.de \
    --cc=hannes@cmpxchg.org \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=riel@surriel.com \
    --cc=shakeel.butt@linux.dev \
    --cc=tglx@kernel.org \
    --cc=usama.arif@linux.dev \
    /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®