[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20101119.092514.183050412.davem@davemloft.net>
Date: Fri, 19 Nov 2010 09:25:14 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: hagen@...u.net, netdev@...r.kernel.org, xiaosuo@...il.com
Subject: Re: [PATCH net-next-2.6] filter: optimize sk_run_filter
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Fri, 19 Nov 2010 18:16:24 +0100
> Le vendredi 19 novembre 2010 à 09:05 -0800, David Miller a écrit :
>> From: Eric Dumazet <eric.dumazet@...il.com>
>> Date: Fri, 19 Nov 2010 17:55:59 +0100
>>
>> > Unfortunatly on x86_32 it also chose that f_k was more valuable in a cpu
>> > register and accumulator A lost its register to get a stack slot
>> > instead.
>>
>> Ok that tradeoff is terrible, but it depends upon knowledge we haven't
>> given to the compiler (yet).
>>
>> Let me think about this a bit...
>
> By the way, I tried the 'register' keyword, and I knew it was a stupid
> idea before even trying, since compiler ignored me : "What the hell do
> you think you can tell me how to optimize this code ?"
>
> (I am quite sure my laptop even smiled and sent to his neighbours a
> broadcast saying "Hey buddies, this dumb guy tried the register C
> keyword, isnt it funny ?")
:-)
I wonder though, since "fentry" is const in your recent patch,
you might not even need that X86_32 ifdef thing. GCC should
actually now be able to see that fentry->k cannot change, even
when we make external function calls via load_pointer() and such.
--
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