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

From: Hagen Paul Pfeifer <[email-masked]>
Date: Thu, 14 Apr 2011 16:55:49 +0200

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

> Have you considered putting the compiler in userspace?

Kernelspace (modules, threads, etc) can register BPF filters too. It is

possible that there is no userspace involved at all.

> 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.

BPF is another domain. Standard compiler optimization are not comparable

to BPF optimizations so there is no gain there. Maybe writing a gcc front

_and_ back-end may gain some valuable advantages.

Hagen