public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@linux.intel.com>
To: shrikanth hegde <sshegde@linux.vnet.ibm.com>, tglx@linutronix.de
Cc: peterz@infradead.org, mingo@kernel.org,
	Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
	svaidy@linux.ibm.com, linux-kernel@vger.kernel.org,
	bigeasy@linutronix.de
Subject: Re: [RFC PATCH] hrtimer: interleave timers for improved single thread performance at low utilization
Date: Tue, 31 Jan 2023 06:55:47 -0800	[thread overview]
Message-ID: <c6c106a2-b180-d3fd-5904-44f9b4949ddc@linux.intel.com> (raw)
In-Reply-To: <5ae3cb09-8c9a-11e8-75a7-cc774d9bc283@linux.vnet.ibm.com>


>   kernel/time/hrtimer.c | 11 +++++++++++
>   1 file changed, 11 insertions(+)
> 
> diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
> index 3ae661ab6260..d160f49f0cce 100644
> --- a/kernel/time/hrtimer.c
> +++ b/kernel/time/hrtimer.c
> @@ -1055,6 +1055,17 @@ u64 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval)
> 
>           orun = ktime_divns(delta, incr);
>           hrtimer_add_expires_ns(timer, incr * orun);
> +        /*
> +         * Avoid timer round-off, so that all cfs bandwidth timers
> +         * don't start at the same time

so while I applaud the final objective, I am sort of wondering if hrtimer.c is the right place in the kernel to fix a CFS/cgroup issue...
wouldn't it be better to solve such issues at the place we want this to happen, rather than for all timers in the whole system?

(also while for performance it might be better to spread out a bit, for power consumption it's obviously the other way around)



  parent reply	other threads:[~2023-01-31 14:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31  5:48 [RFC PATCH] hrtimer: interleave timers for improved single thread performance at low utilization shrikanth hegde
2023-01-31 10:37 ` Ingo Molnar
2023-01-31 12:09   ` shrikanth hegde
2023-01-31 11:08 ` Thomas Gleixner
2023-01-31 12:27   ` shrikanth hegde
2023-01-31 14:55 ` Arjan van de Ven [this message]
2023-01-31 15:50   ` shrikanth hegde

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=c6c106a2-b180-d3fd-5904-44f9b4949ddc@linux.intel.com \
    --to=arjan@linux.intel.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=srikar@linux.vnet.ibm.com \
    --cc=sshegde@linux.vnet.ibm.com \
    --cc=svaidy@linux.ibm.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