Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1451289

clocksource_watchdog causing scheduling of timers every second (was [v13] support "task_isolation" mode)

From Christoph Lameter <cl@linux.com>
Newsgroups linux.kernel
Subject clocksource_watchdog causing scheduling of timers every second (was [v13] support "task_isolation" mode)
Date 2016-07-27 16:00 +0200
Message-ID <rZxxo-6F-9@gated-at.bofh.it> (permalink)
References (1 earlier) <rXbAZ-17W-3@gated-at.bofh.it> <rXynT-7XR-9@gated-at.bofh.it> <rXynT-7XR-7@gated-at.bofh.it> <rYR58-6Qr-21@gated-at.bofh.it> <rYR58-6Qr-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 25 Jul 2016, Christoph Lameter wrote:

> Guess so. I will have a look at this when I get some time again.

Ok so the problem is the clocksource_watchdog() function in
kernel/time/clocksource.c. This function is active if
CONFIG_CLOCKSOURCE_WATCHDOG is defined. It will check the timesources of
each processor for being within bounds and then reschedule itself on the
next one.

The purpose of the function seems to be to determine *if* a clocksource is
unstable. It does not mean that the clocksource *is* unstable.

The critical piece of code is this:

        /*
         * Cycle through CPUs to check if the CPUs stay synchronized
         * to each other.
         */
        next_cpu = cpumask_next(raw_smp_processor_id(), cpu_online_mask);
        if (next_cpu >= nr_cpu_ids)
                next_cpu = cpumask_first(cpu_online_mask);
        watchdog_timer.expires += WATCHDOG_INTERVAL;
        add_timer_on(&watchdog_timer, next_cpu);


Should we just cycle through the cpus that are not isolated? Otherwise we
need to have some means to check the clocksources for accuracy remotely
(probably impossible for TSC etc).

The WATCHDOG_INTERVAL is 1 second so this causes an interrupt every
second.

Note that we are running with the patch that removes the 1 HZ mininum time
tick. With an older kernel code base (redhat) we can keep the kernel quiet
for minutes. The clocksource watchdog causes timers to fire again.

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

clocksource_watchdog causing scheduling of timers every second (was  [v13] support "task_isolation" mode) Christoph Lameter <cl@linux.com> - 2016-07-27 16:00 +0200
  Re: clocksource_watchdog causing scheduling of timers every second  (was [v13] support "task_isolation" mode) Christoph Lameter <cl@linux.com> - 2016-07-27 17:30 +0200
    Re: clocksource_watchdog causing scheduling of timers every second  (was [v13] support "task_isolation" mode) Christoph Lameter <cl@linux.com> - 2016-07-27 17:40 +0200
      Re: clocksource_watchdog causing scheduling of timers every second  (was [v13] support "task_isolation" mode) Christoph Lameter <cl@linux.com> - 2016-07-27 21:00 +0200
        Re: clocksource_watchdog causing scheduling of timers every second  (was [v13] support "task_isolation" mode) Christoph Lameter <cl@linux.com> - 2016-07-27 22:00 +0200
          Re: clocksource_watchdog causing scheduling of timers every second  (was [v13] support "task_isolation" mode) Francis Giraldeau <francis.giraldeau@gmail.com> - 2016-07-29 20:40 +0200

csiph-web