From: Andrew Morton <akpm@osdl.org>
To: Petr Vandrovec <vandrove@vc.cvut.cz>
Cc: torvalds@osdl.org, linux-kernel@vger.kernel.org,
Shaohua Li <shaohua.li@intel.com>,
Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Subject: Re: [PATCH 2.6.13-rc5-gitNOW] msleep() cannot be used from interrupt
Date: Fri, 5 Aug 2005 11:53:29 -0700 [thread overview]
Message-ID: <20050805115329.45889ef8.akpm@osdl.org> (raw)
In-Reply-To: <20050805135007.GA6985@vana.vc.cvut.cz>
Petr Vandrovec <vandrove@vc.cvut.cz> wrote:
>
> Since beginning of July my Opteron box was randomly crashing and being rebooted
> by hardware watchdog. Today it finally did it in front of me, and this patch
> will hopefully fix it.
>
> Problem is that at the end of June (28th, commit
> 47f176fdaf8924bc83fddcf9658f2fd3ef60d573, [PATCH] Using msleep() instead of HZ)
> rtc_get_rtc_time was converted to use msleep() instead of busy waiting. But
> rtc_get_rtc_time is used by hpet_rtc_interrupt, and scheduling is not allowed
> during interrupt. So I'm reverting this part of original change, replacing
> msleep() back with busy loop.
>
> Original old code was busy waiting for 20ms, while on my hardware in the worst
> case update-in-progress bit was asserted for at most 363 passes through loop
> (on 2GHz dual Opteron), much less than even one jiffie, not even talking
> about 20ms. So I changed code to just wait only as long as necessary. Otherwise
> when RTC was set to generate 8192Hz timer, it stopped doing anything for
> 20ms (160 pulses were skipped!) from time to time, and this is rather suboptimal
> as far as I can tell.
That's all pretty sad stuff. I guess for now we can go back to the busy
loop. Longer-term it would be nice if we could tune up the HPET driver in
some manner so we can avoid this busy-wait-in-interrupt.
I'm not sure who the HPET maintainer/expert is nowadays. Robert Picco did
the original work but I haven't seen Robert around for a long time?
next prev parent reply other threads:[~2005-08-05 18:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-05 13:50 [PATCH 2.6.13-rc5-gitNOW] msleep() cannot be used from interrupt Petr Vandrovec
2005-08-05 14:03 ` linux-os (Dick Johnson)
2005-08-05 14:39 ` Petr Vandrovec
2005-08-05 15:08 ` linux-os (Dick Johnson)
2005-08-05 18:53 ` Andrew Morton [this message]
2005-08-05 19:23 ` Venkatesh Pallipadi
2005-08-05 19:37 ` linux-os (Dick Johnson)
2005-08-05 20:38 ` Andrew Morton
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=20050805115329.45889ef8.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shaohua.li@intel.com \
--cc=torvalds@osdl.org \
--cc=vandrove@vc.cvut.cz \
--cc=venkatesh.pallipadi@intel.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.