Subject: Re: [PATCH v2] net: filter: Just In Time compiler

From: Avi Kivity <[email-masked]>
Date: Thu, 14 Apr 2011 17:40:03 +0300

On 04/03/2011 04:56 PM, Eric Dumazet wrote:
> In order to speedup packet filtering, here is an implementation of a JIT
> compiler for x86_64
>

Have you considered putting the compiler in userspace?

You could have a trusted compile server waiting on a pipe and compiling 
programs sent to it by the kernel, sending the results back down.  Use 
the interpreter until the compiler returns; if it doesn't, use the 
interpreter forever.

The upside is that you can use established optimizing compilers like 
LLVM or GCC, which already support more target architectures.  It may 
not matter much for something simple like bpf, but other VMs may be a 
lot more complicated.

-- 
error compiling committee.c: too many arguments to function