[Top] [All Lists]

Re: [PATCH] loop unrolling in net/sched/sch_generic.c

To: Eric Dumazet <dada1@xxxxxxxxxxxxx>
Subject: Re: [PATCH] loop unrolling in net/sched/sch_generic.c
From: Thomas Graf <tgraf@xxxxxxx>
Date: Tue, 5 Jul 2005 13:51:08 +0200
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <42CA390C.9000801@xxxxxxxxxxxxx>
References: <20050704.154712.63128211.davem@xxxxxxxxxxxxx> <42C9BE69.2070008@xxxxxxxxxxxxx> <42C9BEF6.4080402@xxxxxxxxxxxxx> <20050704.160140.21591849.davem@xxxxxxxxxxxxx> <42CA390C.9000801@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
* Eric Dumazet <42CA390C.9000801@xxxxxxxxxxxxx> 2005-07-05 09:38
> [NET] : unroll a small loop in pfifo_fast_dequeue(). Compiler generates 
> better code.
>       (Using skb_queue_empty() to test the queue is faster than trying to 
>       __skb_dequeue())
>       oprofile says this function uses now 0.29% instead of 1.22 %, on a 
>       x86_64 target.

I think this patch is pretty much pointless. __skb_dequeue() and
!skb_queue_empty() should produce almost the same code and as soon
as you disable profiling and debugging you'll see that the compiler
unrolls the loop itself if possible.

<Prev in Thread] Current Thread [Next in Thread>