The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Xavier Xia <xavier_qy@163.com>,
	anna-maria@linutronix.de, frederic@kernel.org
Cc: linux-kernel@vger.kernel.org, Xavier Xia <xavier_qy@163.com>
Subject: Re: [PATCH v1] hrtimer: Simplify the logic of __hrtimer_get_next_event
Date: Fri, 16 May 2025 12:50:56 +0200	[thread overview]
Message-ID: <87ecwoj0bz.ffs@tglx> (raw)
In-Reply-To: <20250516070153.2410363-1-xavier_qy@163.com>

On Fri, May 16 2025 at 15:01, Xavier Xia wrote:
> Currently, __hrtimer_get_next_event makes two separate calls to
> __hrtimer_next_event_base for HRTIMER_ACTIVE_SOFT and HRTIMER_ACTIVE_HARD
> respectively to obtain expires_next. However, __hrtimer_next_event_base is
> capable of traversing all timer types simultaneously by simply controlling
> the active mask. There is no need to distinguish the order of traversal
> between soft and hard timers, as the sole purpose is to find the earliest
> expiration time.
> Therefore, the code can be simplified by reducing the two calls to a single
> invocation of __hrtimer_next_event_base, making the code more
> straightforward and easier to understand.

... and broken

> -		cpu_base->softirq_next_timer = NULL;
> -		next_timer = cpu_base->softirq_next_timer;
> -		cpu_base->next_timer = next_timer;

because you removed the cpu_base::[softirq_]next_timer update logic.

Thanks,

        tglx

  reply	other threads:[~2025-05-16 10:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-16  7:01 [PATCH v1] hrtimer: Simplify the logic of __hrtimer_get_next_event Xavier Xia
2025-05-16 10:50 ` Thomas Gleixner [this message]
2025-05-16 16:40   ` Xavier

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=87ecwoj0bz.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=anna-maria@linutronix.de \
    --cc=frederic@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xavier_qy@163.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox