[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070508.233630.35664266.davem@davemloft.net>
Date: Tue, 08 May 2007 23:36:30 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: krkumar2@...ibm.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] sched: Optimize return value of qdisc_restart
From: Krishna Kumar2 <krkumar2@...ibm.com>
Date: Wed, 9 May 2007 10:05:57 +0530
> This change will not change existing behavior in case there are
> packets in the queue, it will return -1 each time as does the
> original code. But when there are no packets, the original
> qdisc_restart returns -1 and the caller will unnecessarily call
> qdisc_restart which branches to the bottom and returns 0
> (qlen). This call can be avoided if we had returned 0 in the
> previous iteration. Branching to the bottom cannot be done since it
> breaks the "packets present" case, as it will return a positive
> number and the caller will assume that the queue is throttled.
Ok, thanks for the explanation.
But this only makes sense for the second hunk you changed.
The first hunk is a bug case, an improper looping device
decapsulation condition, and we do want to always return
-1 in that case in order to break out of the loop.
Your change will make the kernel essentially hang instead
when this bug check is triggered.
-
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