From: "Kok, Auke" <auke-jan.h.kok@intel.com>
To: Arjan van de Ven <arjan@linux.intel.com>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>,
parag.warudkar@gmail.com, netdev@vger.kernel.org,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sky2: Use deferrable timer for watchdog
Date: Thu, 20 Dec 2007 11:22:45 -0800 [thread overview]
Message-ID: <476AC105.9090206@intel.com> (raw)
In-Reply-To: <476ABE7D.60901@linux.intel.com>
Arjan van de Ven wrote:
>
>>>> My interpretation of the api is:
>>>> * round_jiffies() - timer wants to wakeup but isn't precise
>>>> about when so schedule
>>>> on next second when system will wake up anyway;
>>>> e.g why meetings are usually scheduled on
>>>> the hour
>>>>
>>>> * deferrable - timer doesn't have to really wakeup but
>>>> wants to happen near
>>>> a particular time. e.g. "I'll meet you at
>>>> the pub around 8pm"
>
> this is not correct.
>
> deferrable means "if you're busy wake me up at this time. But if not,
> don't bother waking up for me, get to it
> later".
>
> The "later" can be a LONG time later, several seconds easily, if not more.
> (timers are on a per cpu bases, and you may end up with a several-core
> system where the common timers are all on another cpu
> than this one)
>
>
>
>>> If this is the case then the whole usage of round_jiffies() is bogus.
>>> All users of round_jiffies()
>>> should just be converted to deferrable?? I am a bit concerned that
>>> if deferrable gets used everywhere
>>> then a strange situation would occur where all timers were waiting
>>> for some other timer to finally
>>> happen, kind of a wierd timelock situation. Like the old chip/dale
>>> cartoon:
>>> "you first, no you first, after you mister chip, no after you mister
>>> dale,..."
>>
>>
>>
>> that's a dangerous situation indeed and I'd really like to know what
>> the limits
>> are for deferring deferrable timers.... Arjan, do you know? Anyone?
>
> there is NO limit to deferring a timer. Do NOT use a deferrable timer if
> you can't afford the timer to not happen
> within.. 10 to 100 seconds! (or more)
> They are really meant for things where you CAN afford for it to not
> happen when you're idle....
ok, that's just bad and if there's no user-defineable limit to the deferral I
definately don't like this change.
Can I safely assume that any irq will cause all deferred timers to run?
If this is the case then for e1000 this patch is still OK since the watchdog needs
to run (1) after a link up/down interrupt or (2) to update statistics. Those
statistics won't increase if there is no traffic of course...
Auke
next prev parent reply other threads:[~2007-12-20 19:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-19 1:13 [PATCH] sky2: Use deferrable timer for watchdog Parag Warudkar
2007-12-20 17:16 ` Stephen Hemminger
[not found] ` <823114761-1198171803-cardhu_decombobulator_blackberry.rim.net-937108990-@bxe019.bisx.prod.on.blackberry>
2007-12-20 17:51 ` Stephen Hemminger
2007-12-20 18:05 ` Parag Warudkar
2007-12-20 19:09 ` Kok, Auke
2007-12-20 19:11 ` Arjan van de Ven
2007-12-20 19:22 ` Kok, Auke [this message]
2007-12-20 19:42 ` Arjan van de Ven
2007-12-20 20:00 ` Parag Warudkar
2007-12-20 20:04 ` Arjan van de Ven
2007-12-20 20:36 ` Parag Warudkar
2007-12-20 21:08 ` Stephen Hemminger
2007-12-20 21:24 ` Kok, Auke
2007-12-20 20:17 ` Krzysztof Oledzki
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=476AC105.9090206@intel.com \
--to=auke-jan.h.kok@intel.com \
--cc=akpm@linux-foundation.org \
--cc=arjan@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=parag.warudkar@gmail.com \
--cc=shemminger@linux-foundation.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).