tech-net archive

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

Re: bpf jit



>> Are there measurements supporting the idea that the BPF pcode engine
>> is a performance bottleneck?
> I didn't do any measurements myself of the whole system because I
> don't have access to any test [network] but jitted code is 3-5 times
> faster in my benchmark.  In absolute values it's IIRC 30ns per packet
> on my amd64 and 150-200ns on my Tegra-250 arm.

Then it comes down to, is saving 30ns worh the code size and complexity
(and thus exposure)?  I don't know how large a fraction of the cost of
packet handling 30ns is; I suspect it's small enough that I don't
consider it worth the costs.  (To pick a number out of thin air, is
handling a packet in 970ns instead of 1us worth it?  I think it's not,
and I suspect 1us to handle a packet is highly optimistic, though I
haven't measured that either.)

>> Particularly since it seems to me that the CPUs it supports are the
>> ones least in need of a performance boost?
> Mine supports several cpu types.  Or do they all fall into "least in
> need of a performance boost"?

Most of them certainly do.  The ones that most need a performance boost
are things like acorn26, sun2, hp300, vax, the slower pmax and
sparc....

>> Compilers are, in general, full of subtle corner cases; jitters,
>> even more so.
> Why do you think that jitters are more full of subtle corner cases?

They've got most of the complexities of all compilers, plus a bunch
more all their own.  It's uncomfortably close to "so complex there are
no obvious defects" rather than "so simple there are obviously no
defects".

>> And BPF is highly privileged, highly exposed, and security critical;
>> it seems to me that all the indications are against putting a jitter
>> there.
> Yes, I'm aware it's highly exposed code but I'm not pushing it to
> NetBSD-6.

I'm not sure how that makes it any more appropriate to put it into the
main tree at this stage, but it doesn't really matter.  I won't be
running -6 myself (for plenty of other reasons); I've pointed out my
concerns, and if NetBSD wants to ignore them, it's NetBSD's decision,
and NetBSD's security on the line.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index