[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47B95909.8060202@cdi.cz>
Date: Mon, 18 Feb 2008 11:08:09 +0100
From: Martin Devera <devik@....cz>
To: David Miller <davem@...emloft.net>
CC: linux-kernel@...r.kernel.org, kaber@...sh.net,
netdev@...r.kernel.org
Subject: Re: [PATCH 2.6.24 1/1] sch_htb: fix "too many events" situation
David Miller wrote:
> From: Martin Devera <devik@....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 ?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists