public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: James Hogan <james.hogan@imgtec.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: <linux-kernel@vger.kernel.org>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Ian Pozella <Ian.Pozella@imgtec.com>,
	James Hartley <James.Hartley@imgtec.com>,
	Matt Redfearn <Matt.Redfearn@imgtec.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>
Subject: Re: [PATCH] clockevents: Retry programming min delta up to 10 times
Date: Mon, 13 Mar 2017 15:33:00 +0000	[thread overview]
Message-ID: <20170313153300.GL996@jhogan-linux.le.imgtec.org> (raw)
In-Reply-To: <1461321611-6159-1-git-send-email-james.hogan@imgtec.com>

[-- Attachment #1: Type: text/plain, Size: 1446 bytes --]

Hi,

On Fri, Apr 22, 2016 at 11:40:11AM +0100, James Hogan wrote:
> Under virtualisation it is possible to get unexpected latency during a
> clockevent device's set_next_event() callback which can make it return
> -ETIME even for a delta based on min_delta_ns.
> 
> The clockevents_program_min_delta() implementation for
> CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=n doesn't handle retries when this
> happens, nor does clockevents_program_event() or its callers when force
> is true (for example hrtimer_reprogram()). This can result in hangs
> until the clock event device does a full period.
> 
> It isn't appropriate to use MIN_ADJUST in this case as occasional
> hypervisor induced high latency will cause min_delta_ns to quickly
> increase to the maximum.
> 
> Instead, borrow the retry pattern from the MIN_ADJUST case, but without
> making adjustments. We retry up to 10 times before giving up.
> 
> Signed-off-by: James Hogan <james.hogan@imgtec.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>

This is still an issue, both under virtualization and on
hardware-multi-threaded MIPS cores with the mips-gic driver where
general latency can by impacted by the behaviour of software running on
other hardware threads (which are seen as other CPUs from Linux' point
of view) in the same core.

Does anybody have any more feedback about this patch?

Thanks
James

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

      parent reply	other threads:[~2017-03-13 15:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-22 10:40 [PATCH] clockevents: Retry programming min delta up to 10 times James Hogan
2016-04-25 13:48 ` Martin Schwidefsky
2016-04-25 15:51   ` James Hogan
2017-03-13 15:33 ` James Hogan [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=20170313153300.GL996@jhogan-linux.le.imgtec.org \
    --to=james.hogan@imgtec.com \
    --cc=Ian.Pozella@imgtec.com \
    --cc=James.Hartley@imgtec.com \
    --cc=Matt.Redfearn@imgtec.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.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