lkml.org 
[lkml]   [2019]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [RFC PATCH bpf-next] RV32G eBPF JIT
    On Mon, Jun 24, 2019 at 9:45 AM Jiong Wang <jiong.wang@netronome.com> wrote:
    >
    > Looks to me 32-bit optimization is not enabled.
    >
    > If you define bpf_jit_needs_zext to return true
    >
    > bool bpf_jit_needs_zext(void)
    > {
    > return true;
    > }
    >
    > Then you don't need to zero high 32-bit when writing 32-bit sub-register
    > and you just need to implement the explicit zero extension insn which is a
    > special variant of BPF_MOV. This can save quite a few instructions. RV64
    > and arches like arm has implemented this, please search
    > "aux->verifier_zext".
    >
    > And there is a doc for this optimization:
    >
    > https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/tree/Documentation/bpf/bpf_design_QA.rst#n168

    Thanks for the pointer. I'll add this optimization before sending out
    an updated version of the patch.

    – Luke

    \
     
     \ /
      Last update: 2019-06-25 22:28    [W:5.069 / U:0.376 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site