tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: patch make struct protosw pr_input non-variadic



On Fri, May 13, 2016 at 11:14:13PM +0000, Christos Zoulas wrote:
> >
> >This patch:
> >* moves pr_input out of struct protosw and places it into <proto>sw
> >  specitic structure.
> >* converts domain::dom_protosw to an array of pointers
> 
> Why? What's the point of the extra indirection? You could just stick
> and & in front of the array element assignment.

I want to reemphasize the potentially negative performance impact of
this kind of change.  It turns the branch into a computed branch in a
way that will defeat branch prediction on many CPUs and thus cause
stalls.  Don't call through pointers if you don't have to.

-- 
  Thor Lancelot Simon	                                     tls%panix.com@localhost

  "We cannot usually in social life pursue a single value or a single moral
   aim, untroubled by the need to compromise with others."      - H.L.A. Hart


Home | Main Index | Thread Index | Old Index