From: Martin Devera <devik@cdi.cz>
To: David Miller <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org, kaber@trash.net, netdev@vger.kernel.org
Subject: Re: [PATCH 2.6.24 1/1] sch_htb: fix "too many events" situation
Date: Mon, 18 Feb 2008 11:08:09 +0100 [thread overview]
Message-ID: <47B95909.8060202@cdi.cz> (raw)
In-Reply-To: <20080218.001736.124204016.davem@davemloft.net>
David Miller wrote:
> From: Martin Devera <devik@cdi.cz>
> Date: Mon, 18 Feb 2008 09:03:52 +0100
>
>> aha, ok, I'm not so informed about crossplatform issues.
>> I was also thining about looking at jiffies value and stop once
>> it is startjiffy+2, but with NO_HZ introduction, are jiffies
>> still incremented ?
>
> There should always be at least once cpu tasked with incrementing
> jiffies. Lots of stuff would break if not :-)
>
Aha ok, so that when (at least one) cpu is busy then I can count on
jiffies incrementing via do_timer, can't I ?
So that I'd remove the loop limit altogether but limiting it to
1 or 2 jiffies to prevent livelock.
Like
max_jiff = jiffies+2; /* not +1 at we could be at +0.9999 now */
while (jiffies<max_jiff) do_hard_potentionaly_long_work();
if (more_work) schedule_to_next_jiffie();
This will keep event queue work load under 66% of system load which
seems reasonable to me.
Would you accept such solution ?
next prev parent reply other threads:[~2008-02-18 10:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-14 23:02 [PATCH 2.6.24 1/1] sch_htb: fix "too many events" situation Martin Devera
2008-02-18 7:28 ` David Miller
2008-02-18 8:03 ` Martin Devera
2008-02-18 8:17 ` David Miller
2008-02-18 10:08 ` Martin Devera [this message]
2008-02-18 10:43 ` David Miller
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=47B95909.8060202@cdi.cz \
--to=devik@cdi.cz \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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.