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



   Date: Mon, 16 May 2016 10:03:18 +0700
   From: Robert Elz <kre%munnari.OZ.AU@localhost>

   If a system is receiving alternating v4 & v6 packets (say), now, as I
   understand the patch, the v4 will all be referencing one field, and the
   v6 a different one, whereas before they were all accessing the same one.
   That makes it more likely in the earlier code that the data would be
   cached, and less likely that someone else's data would be being flushed.

IPv4 packets go through inetsw; IPv6 through inet6sw, a different
table altogether.  The only change is that the structure members in
inetsw are reordered -- though I believe the only one that is used in
the packet-processing path is pr_input.

It's true that the reordering of the structure members may conceivably
affect performance by changing which cache line is used.  But the work
that Ozaki-san and Nakahara-san are doing to parallelize the network
stack have much greater impact on performance (measured by Ozaki-san),
and some of their work has been hindered by the lack of the
compiler-assisted refactoring that true prototypes enable.


Home | Main Index | Thread Index | Old Index