Re: [PATCH net] x86: bpf_jit: fix compilation of large bpf programs

2015-05-26 Thread Eric Dumazet
On Tue, 2015-05-26 at 13:40 +, David Laight wrote: If the JIT compiler is only changing the encoding of the constants in the x86 instructions (rather than changing the instructions themselves) then there is likely to me an unmeasurable change in the execution time. For instance I don't

RE: [PATCH net] x86: bpf_jit: fix compilation of large bpf programs

2015-05-26 Thread David Laight
From: Alexei Starovoitov Sent: 22 May 2015 23:43 x86 has variable length encoding. x86 JIT compiler is trying to pick the shortest encoding for given bpf instruction. While doing so the jump targets are changing, so JIT is doing multiple passes over the program. Typical program needs 3

RE: [PATCH net] x86: bpf_jit: fix compilation of large bpf programs

2015-05-26 Thread David Laight
From: Eric Dumazet Sent: 26 May 2015 15:35 On Tue, 2015-05-26 at 13:40 +, David Laight wrote: If the JIT compiler is only changing the encoding of the constants in the x86 instructions (rather than changing the instructions themselves) then there is likely to me an unmeasurable

Re: [PATCH net] x86: bpf_jit: fix compilation of large bpf programs

2015-05-26 Thread Eric Dumazet
On Tue, 2015-05-26 at 15:13 +, David Laight wrote: Yes, interesting, a benchmark that manages to run a lot of code 'cold cache'. We have binaries here at Google with 400 or 500 MBytes of text. Not benchmark, super real workloads you know. -- To unsubscribe from this list: send the line

RE: [PATCH net] x86: bpf_jit: fix compilation of large bpf programs

2015-05-26 Thread David Laight
From: Eric Dumazet Sent: 26 May 2015 16:30 Yes, interesting, a benchmark that manages to run a lot of code 'cold cache'. We have binaries here at Google with 400 or 500 MBytes of text. Not benchmark, super real workloads you know. Indeed, and a lot of the code is likely to be

Re: [PATCH net] x86: bpf_jit: fix compilation of large bpf programs

2015-05-24 Thread David Miller
From: Alexei Starovoitov a...@plumgrid.com Date: Fri, 22 May 2015 15:42:55 -0700 x86 has variable length encoding. x86 JIT compiler is trying to pick the shortest encoding for given bpf instruction. While doing so the jump targets are changing, so JIT is doing multiple passes over the

Re: [PATCH net] x86: bpf_jit: fix compilation of large bpf programs

2015-05-22 Thread Daniel Borkmann
On 05/23/2015 12:42 AM, Alexei Starovoitov wrote: x86 has variable length encoding. x86 JIT compiler is trying to pick the shortest encoding for given bpf instruction. While doing so the jump targets are changing, so JIT is doing multiple passes over the program. Typical program needs 3 passes.