From: Oleg Nesterov <oleg@redhat.com>
To: Frederic Weisbecker <frederic@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Anna-Maria Behnsen <anna-maria@linutronix.de>,
Ingo Molnar <mingo@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tick: shift tick_nohz_switch_to_nohz() from tick_check_oneshot_change() to hrtimer_run_queues()
Date: Sat, 1 Jun 2024 16:56:52 +0200 [thread overview]
Message-ID: <20240601145651.GB3758@redhat.com> (raw)
In-Reply-To: <ZliaSISeFxx_FQ6O@localhost.localdomain>
On 05/30, Frederic Weisbecker wrote:
>
> tick_nohz_switch_to_nohz() is only built with CONFIG_NO_HZ_COMMON
>
> You will have a build issue with CONFIG_HIGH_RES_TIMER && !CONFIG_NO_HZ_COMMON
Thanks again.
At first glance this patch needs a simple fixup below. I'll recheck and
send V2.
NO_HZ_COMMON selects TICK_ONESHOT. But even if it didn't,
tick_check_oneshot_change() is dummy inline "return 0" without
CONFIG_TICK_ONESHOT, hrtimer_run_queues() will never try to
call tick_nohz_switch_to_nohz().
Oleg.
--- a/kernel/time/tick-internal.h
+++ b/kernel/time/tick-internal.h
@@ -112,7 +112,6 @@ static inline bool tick_oneshot_possible(void) { return true; }
extern int tick_oneshot_mode_active(void);
extern void tick_clock_notify(void);
extern int tick_check_oneshot_change(void);
-extern void tick_nohz_switch_to_nohz(void);
extern int tick_init_highres(void);
#else /* !CONFIG_TICK_ONESHOT: */
static inline
@@ -126,7 +125,6 @@ static inline bool tick_oneshot_possible(void) { return false; }
static inline int tick_oneshot_mode_active(void) { return 0; }
static inline void tick_clock_notify(void) { }
static inline int tick_check_oneshot_change(void) { return 0; }
-static inline void tick_nohz_switch_to_nohz(void) { }
#endif /* !CONFIG_TICK_ONESHOT */
/* Functions related to oneshot broadcasting */
@@ -159,6 +157,7 @@ static inline void tick_nohz_init(void) { }
#endif
#ifdef CONFIG_NO_HZ_COMMON
+extern void tick_nohz_switch_to_nohz(void);
extern unsigned long tick_nohz_active;
extern void timers_update_nohz(void);
extern u64 get_jiffies_update(unsigned long *basej);
@@ -173,6 +172,7 @@ extern bool timer_base_is_idle(void);
extern void timer_expire_remote(unsigned int cpu);
# endif
#else /* CONFIG_NO_HZ_COMMON */
+static inline void tick_nohz_switch_to_nohz(void) { }
static inline void timers_update_nohz(void) { }
#define tick_nohz_active (0)
#endif
next prev parent reply other threads:[~2024-06-01 14:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-30 12:42 [PATCH] tick: shift tick_nohz_switch_to_nohz() from tick_check_oneshot_change() to hrtimer_run_queues() Oleg Nesterov
2024-05-30 15:24 ` Frederic Weisbecker
2024-05-30 17:12 ` Oleg Nesterov
2024-06-01 14:56 ` Oleg Nesterov [this message]
2024-05-31 0:28 ` kernel test robot
2024-05-31 1:21 ` kernel test robot
2024-06-02 10:20 ` [PATCH v2] " Oleg Nesterov
2024-06-03 8:14 ` Thomas Gleixner
2024-06-03 13:41 ` Oleg Nesterov
2024-06-03 15:03 ` Oleg Nesterov
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=20240601145651.GB3758@redhat.com \
--to=oleg@redhat.com \
--cc=anna-maria@linutronix.de \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--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 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.