All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislav Meduna <stano@meduna.org>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Shawn Guo <shawn.guo@linaro.org>
Cc: "linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: scheduler clock for MXS
Date: Tue, 06 Nov 2012 23:30:44 +0100	[thread overview]
Message-ID: <50998F94.8000908@meduna.org> (raw)
In-Reply-To: <20121106202038.GB32398@n2100.arm.linux.org.uk>

On 06.11.2012 21:20, Russell King - ARM Linux wrote:

>> With the change, it still wraps at 2 seconds.
> 
> And there's no way that such a change could ever go into mainline; it
> can mean that the timer is registered into the timer subsystem before
> the timer subsystem has been initialised.  That's why we postpone that
> part to time_init().

Sure, I just wanted to quick-check whether it helps or not, this was
not meant as a solution for anything.

This gets interesting. The same code on slightly different hardware
(but using same source files), just 32-bits so it wraps around after
~1,5 days:

sched_clock: 32 bits at 32kHz, resolution 31250ns,
  wraps every 134217727ms

works without problem here:
  [134919.008468] PHY: imx28-fec-1:00 - Link is Up - 100/Full

(134919 > 134217).

The only difference is 32 bits instead of 16 and a different
function to read the hardware.

> Well.  I just tried an experiment with OMAP4:
> [    0.000000] sched_clock: 16 bits at 32kHz, resolution 30517ns,
wraps every 1999ms
> ...
> [    3.070404] Freeing init memory: 192K


OK, so it is not a 16-bit problem either. So where is the
difference? Could it be that HZ / NO_HZ is playing some
tricks here and need to be taken into consideration?

I'll try to artificially limit the counter-reading function
on my hardware to 16 bits and look whether I can also
reproduce this - probably on Thursday or Friday earliest
(busy with other tasks now).

If it works I'll resubmit for only the iMX.28 and someone
who actually has the iMX.23 hardware to experiment with has
to look at it; the best start is probably to start with
comparing it to the working OMAP4. If it does not I'll
try to find the culprit.

Thanks
-- 
                                    Stano


WARNING: multiple messages have this Message-ID (diff)
From: stano@meduna.org (Stanislav Meduna)
To: linux-arm-kernel@lists.infradead.org
Subject: scheduler clock for MXS
Date: Tue, 06 Nov 2012 23:30:44 +0100	[thread overview]
Message-ID: <50998F94.8000908@meduna.org> (raw)
In-Reply-To: <20121106202038.GB32398@n2100.arm.linux.org.uk>

On 06.11.2012 21:20, Russell King - ARM Linux wrote:

>> With the change, it still wraps at 2 seconds.
> 
> And there's no way that such a change could ever go into mainline; it
> can mean that the timer is registered into the timer subsystem before
> the timer subsystem has been initialised.  That's why we postpone that
> part to time_init().

Sure, I just wanted to quick-check whether it helps or not, this was
not meant as a solution for anything.

This gets interesting. The same code on slightly different hardware
(but using same source files), just 32-bits so it wraps around after
~1,5 days:

sched_clock: 32 bits at 32kHz, resolution 31250ns,
  wraps every 134217727ms

works without problem here:
  [134919.008468] PHY: imx28-fec-1:00 - Link is Up - 100/Full

(134919 > 134217).

The only difference is 32 bits instead of 16 and a different
function to read the hardware.

> Well.  I just tried an experiment with OMAP4:
> [    0.000000] sched_clock: 16 bits at 32kHz, resolution 30517ns,
wraps every 1999ms
> ...
> [    3.070404] Freeing init memory: 192K


OK, so it is not a 16-bit problem either. So where is the
difference? Could it be that HZ / NO_HZ is playing some
tricks here and need to be taken into consideration?

I'll try to artificially limit the counter-reading function
on my hardware to 16 bits and look whether I can also
reproduce this - probably on Thursday or Friday earliest
(busy with other tasks now).

If it works I'll resubmit for only the iMX.28 and someone
who actually has the iMX.23 hardware to experiment with has
to look at it; the best start is probably to start with
comparing it to the working OMAP4. If it does not I'll
try to find the culprit.

Thanks
-- 
                                    Stano

  reply	other threads:[~2012-11-06 22:31 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-31 21:41 Wakeup latency measured with SCHED_TRACER depends on HZ Stanislav Meduna
2012-11-02 14:29 ` Stanislav Meduna
2012-11-05  2:57   ` Shawn Guo
2012-11-05  9:14     ` scheduler clock for MXS [Was: Re: Wakeup latency measured with SCHED_TRACER depends on HZ] Stanislav Meduna
2012-11-05  9:14       ` Stanislav Meduna
2012-11-05 13:46       ` Shawn Guo
2012-11-05 13:46         ` Shawn Guo
2012-11-05 16:09         ` Stanislav Meduna
2012-11-05 16:09           ` Stanislav Meduna
2012-11-05 22:28           ` Russell King - ARM Linux
2012-11-05 22:28             ` Russell King - ARM Linux
2012-11-06  2:40             ` Shawn Guo
2012-11-06  2:40               ` Shawn Guo
2012-11-06 10:12               ` Russell King - ARM Linux
2012-11-06 10:12                 ` Russell King - ARM Linux
2012-11-06 13:49                 ` Shawn Guo
2012-11-06 13:49                   ` Shawn Guo
2012-11-06 20:04                   ` Russell King - ARM Linux
2012-11-06 20:04                     ` Russell King - ARM Linux
2012-11-06  8:34             ` scheduler clock for MXS Stanislav Meduna
2012-11-06  8:34               ` Stanislav Meduna
2012-11-06  9:45               ` Russell King - ARM Linux
2012-11-06  9:45                 ` Russell King - ARM Linux
2012-11-06 13:46               ` Shawn Guo
2012-11-06 13:46                 ` Shawn Guo
2012-11-06 20:20                 ` Russell King - ARM Linux
2012-11-06 20:20                   ` Russell King - ARM Linux
2012-11-06 22:30                   ` Stanislav Meduna [this message]
2012-11-06 22:30                     ` Stanislav Meduna
2012-11-06 22:46                     ` Russell King - ARM Linux
2012-11-06 22:46                       ` Russell King - ARM Linux
2012-11-07  7:13                       ` Shawn Guo
2012-11-07  7:13                         ` Shawn Guo
2012-11-08 21:27                       ` Stanislav Meduna
2012-11-08 21:27                         ` Stanislav Meduna
2012-11-08 22:11                         ` Russell King - ARM Linux
2012-11-08 22:11                           ` Russell King - ARM Linux
2012-11-08 22:45                 ` [PATCH] ARM: mxs: Setup scheduler clock Stanislav Meduna
2012-11-08 22:45                   ` Stanislav Meduna
2012-11-12  1:54                   ` Shawn Guo
2012-11-12  1:54                     ` Shawn Guo

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=50998F94.8000908@meduna.org \
    --to=stano@meduna.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=shawn.guo@linaro.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 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.