Re: Inlined functions in network code

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

 



Hi :)

On Sat, Mar 10, 2012 at 01:41, Łukasz Czyż <perlowy.dzem@xxxxxxxxx> wrote:
> Hello
>
> I implemented stateful IPv6-IPv4 NAT translator which works on top of
> netfilter. It is fully functional now,

congratulations! A nice achievement IMHO.... :) is it merged with
linux kernel mainline?

>I only have a doubt about
> criterion when to declare function as inline. Should all functions
> which are used during packet translation (so they may be called very
> frequently) be inlined?

perhaps network guys know better, but I think inlining as we all know,
prevent code path to do jumps. And that will code execution faster,
especially when it happen many many times (read: millions or more).
And likely they will stay at the same L1 i-cache or at least
nearby...so that's nice too :)

IIRC too, "jmp" will screw branch prediction and sometimes will make
pipeline stall.....So, all in all, it's a matter about speeding about
code path, especially fast path like what you do.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux