linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolai Stange <nicstange@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Nicolai Stange <nicstange@gmail.com>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, John Stultz <john.stultz@linaro.org>,
	Borislav Petkov <bp@suse.de>, Paolo Bonzini <pbonzini@redhat.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>,
	"Peter Zijlstra \(Intel\)" <peterz@infradead.org>,
	"Christopher S. Hall" <christopher.s.hall@intel.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/4] kernel/time/clockevents: compensate for monotonic clock's dynamic frequency
Date: Wed, 13 Jul 2016 15:08:33 +0200	[thread overview]
Message-ID: <871t2xy9bi.fsf@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1607121651580.4083@nanos> (Thomas Gleixner's message of "Tue, 12 Jul 2016 17:04:17 +0200 (CEST)")

Thomas Gleixner <tglx@linutronix.de> writes:

> On Tue, 12 Jul 2016, Nicolai Stange wrote:
>> Another issue is that ->min_delta_ns and ->max_delta_ns are measured in
>> raw clock time while the delta in clockevents_program_event() would now
>> be interpreted as being in monotonic clock time:
>>   clc = ((unsigned long long) delta * dev->mult_mono) >> dev->shift;
>
> Does that really matter much?
>
>> Ideally, I'd like to get rid of ->min_delta_ns and ->max_delta_ns
>> alltogether and consistently use the ->min_delta_ticks and
>> ->max_delta_ticks instead. AFAICS, ->min_delta_ns is really needed only
>> for setting dev->next_event in clockevents_program_min_delta().
>> dev->next_event is read only from __clockevents_update_freq() for
>> reprogramming purposes and thus, assuming 0 for ->delta_min_ns in
>> clockevents_program_min_delta() would probably work: a reprogramming
>> would invoke clockevents_program_min_delta() once again.
>
> I completely fail to parse the above paragraph. 
>  
>> The downside of this approach is that a quick grep reveals 40 clockevent
>> device drivers whose initialization code would need to get touched in
>> order to convert them from min_delta_ns/max_delta_ns to
>> min_delta_ticks/max_delta_ticks.
>> 
>> So, the question is whether I should do all of this or whether the
>> doubled timer interrupts aren't annoying enough to justify such a big
>> change?
>
> Can you provide an initial patch which does the adjustment w/o all the related
> churn so we can see how intrusive that gets?

Please see the RFC tagged series at
  http://lkml.kernel.org/g/20160713130017.8202-1-nicstange@gmail.com
I tried to answer/address your above questions in the cover letter.

Note that I split the x86 TSC related patches off:
  http://lkml.kernel.org/g/20160713130344.8319-1-nicstange@gmail.com

Thanks,

Nicolai

      reply	other threads:[~2016-07-13 13:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-10 19:30 [PATCH v2 0/4] avoid double timer interrupt with nohz and Intel TSC Nicolai Stange
2016-07-10 19:30 ` [PATCH v2 1/4] arch, x86, tsc deadline clockevent dev: reduce frequency roundoff error Nicolai Stange
2016-07-10 19:30 ` [PATCH v2 2/4] arch, x86, tsc deadline clockevent dev: reduce TSC_DIVISOR to 2 Nicolai Stange
2016-07-10 19:30 ` [PATCH v2 3/4] arch, x86, tsc: inform TSC deadline clockevent device about recalibration Nicolai Stange
2016-07-10 19:30 ` [PATCH v2 4/4] kernel/time/clockevents: compensate for monotonic clock's dynamic frequency Nicolai Stange
2016-07-11  6:32   ` Nicolai Stange
2016-07-11  8:32     ` Thomas Gleixner
2016-07-12 11:10       ` Nicolai Stange
2016-07-12 15:04         ` Thomas Gleixner
2016-07-13 13:08           ` Nicolai Stange [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=871t2xy9bi.fsf@gmail.com \
    --to=nicstange@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=bp@suse.de \
    --cc=christopher.s.hall@intel.com \
    --cc=hidehiro.kawai.ez@hitachi.com \
    --cc=hpa@zytor.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=viresh.kumar@linaro.org \
    --cc=x86@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).