From: khilman@deeprootsystems.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] arm: sched: stop sched_clock() during suspend
Date: Tue, 23 Oct 2012 07:14:48 -0700 [thread overview]
Message-ID: <87mwzdcm1z.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1350971854-9161-1-git-send-email-balbi@ti.com> (Felipe Balbi's message of "Tue, 23 Oct 2012 08:57:34 +0300")
Felipe Balbi <balbi@ti.com> writes:
> The scheduler imposes a requirement to sched_clock()
> which is to stop the clock during suspend, if we don't
> do that any RT thread will be rescheduled in the future
> which might cause any sort of problems.
>
> This became an issue on OMAP when we converted omap-i2c.c
> to use threaded IRQs, it turned out that depending on how
> much time we spent on suspend, the I2C IRQ thread would
> end up being rescheduled so far in the future that I2C
> transfers would timeout and, because omap_hsmmc depends
> on an I2C-connected device to detect if an MMC card is
> inserted in the slot, our rootfs would just vanish.
>
> arch/arm/kernel/sched_clock.c already had an optional
> implementation (sched_clock_needs_suspend()) which would
> handle scheduler's requirement properly, what this patch
> does is simply to make that implementation non-optional.
>
> Note that this has the side-effect that printk timings
> won't reflect the actual time spent on suspend so other
> methods to measure that will have to be used.
>
> This has been tested with beagleboard XM (OMAP3630) and
> pandaboard rev A3 (OMAP4430). Suspend to RAM is now working
> after this patch.
>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
Acked-by: Kevin Hilman <khilman@ti.com>
next prev parent reply other threads:[~2012-10-23 14:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-22 11:54 [PATCH] arm: sched: stop sched_clock() during suspend Felipe Balbi
2012-10-22 12:07 ` Felipe Balbi
2012-10-22 17:05 ` Kevin Hilman
2012-10-22 22:28 ` Linus Walleij
2012-10-23 9:22 ` Russell King - ARM Linux
2012-10-23 14:17 ` Kevin Hilman
2012-10-23 16:03 ` Russell King - ARM Linux
2012-10-23 17:24 ` Felipe Balbi
2012-10-23 5:57 ` [PATCH v2] " Felipe Balbi
2012-10-23 14:14 ` Kevin Hilman [this message]
2012-10-23 10:11 ` [PATCH] " Linus Walleij
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=87mwzdcm1z.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=linux-arm-kernel@lists.infradead.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).