From: michael <michael@panicking.kicks-ass.org>
To: Peter Barada <peterb@logicpd.com>
Cc: linux-omap <linux-omap@vger.kernel.org>
Subject: Re: hrtimer_nanosleep() weirdness...
Date: Sat, 17 Oct 2009 09:53:15 +0200 [thread overview]
Message-ID: <4AD977EB.8030004@panicking.kicks-ass.org> (raw)
In-Reply-To: <1255721867.19793.311.camel@blitz>
Hi,
Peter Barada wrote:
> I'm using an hrtimer in my tsc2004 touch driver to sleep between samples
> for 7.5mSec. Here's the essence of the inner loop that grabs samples:
>
> for (;;) {
> // Get a point, pass it to input_report_abs...
> pen_is_down = tsc2004_get_point(d);
>
> // If pen is up up, then break out
> if (!pen_is_down || signal_pending(tsk))
> break;
>
> {
> struct timespec timeout;
> // sleep for 7.5 mSec (giving max 133 touch/sec)
> timeout = ns_to_timespec(75 * 100 * 1000);
> hrtimer_nanosleep(&timeout, NULL, HRTIMER_MODE_REL, CLOCK_MONOTONIC);
> }
> }
>
> What's really strange is when I use ts_test to measure sample rate, I
> see:
> OMAP-Torpedo# export TSLIB_TSDEVICE=/dev/input/event0
> OMAP-Torpedo# export TSLIB_CONSOLEDEVICE=none
> OMAP-Torpedo# ts_test
> 717.804687: 176 161 234
> 717.813446: 176 161 234
> 717.822265: 176 160 234
> 717.993255: 178 159 234
> 718.002014: 179 158 234
> 718.188537: 180 158 234
> 719.015441: 181 157 234
> 719.165100: 181 157 234
> 719.360412: 182 157 234
> 719.369079: 182 157 234
> 719.438537: 182 156 234
> 719.555725: 182 156 234
> 719.564392: 182 156 234
> 719.751037: 180 155 234
> 719.768432: 179 155 234
> 719.777099: 178 154 234
> 719.946350: 174 150 234
> 720.000976: 175 144 234
> 720.141662: 184 140 234
> 720.336975: 189 138 234
> 720.490722: 195 137 234
> 720.499420: 198 138 234
> 720.858123: 198 139 234
> 720.922912: 198 139 234
> 721.126922: 198 139 234
> 721.135620: 198 139 234
> 721.144317: 198 139 234
> 721.152984: 198 139 234
> 721.161682: 198 139 234
> 721.313537: 198 139 234
> 721.438537: 198 138 0
>
> Which shows over 3.63 seconds 33 samples, or only 9.08 samples/second,
> including a max delay of .827 seconds (719.015441 - 718.188537).
>
> But if I "ifup eth0" to bring the networking up (and nothing else is
> running), I get:
Not sure,
but I think that you have introduced a new interrupt source and you have
a pickahed of hrtimer in the irq_exit path that run sofirq.
Michael
prev parent reply other threads:[~2009-10-17 7:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-16 19:37 hrtimer_nanosleep() weirdness Peter Barada
2009-10-17 7:53 ` michael [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=4AD977EB.8030004@panicking.kicks-ass.org \
--to=michael@panicking.kicks-ass.org \
--cc=linux-omap@vger.kernel.org \
--cc=peterb@logicpd.com \
/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.