From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7E1AC433FE for ; Wed, 5 Oct 2022 15:10:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229928AbiJEPKs (ORCPT ); Wed, 5 Oct 2022 11:10:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbiJEPKq (ORCPT ); Wed, 5 Oct 2022 11:10:46 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 673EF6DFB0 for ; Wed, 5 Oct 2022 08:10:45 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id o9-20020a17090a0a0900b0020ad4e758b3so2030139pjo.4 for ; Wed, 05 Oct 2022 08:10:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=PvaSCkaPGAxkZorgrCwTUknSyqZlm4KrB/Urh29jNvQ=; b=O6XKHwdHXMLi59BL0KLLa1Ow02XVPqPDii7ceVObg8+/lzU9bep8SpuUWf/P6G1kZD usQ9qOKNqlGGZIsPv8GPzXNpnmLrIksKCuH8b/gqWT7Fkf9J9AYYooaxWnAxaXP65vV9 OmnXKvE5sknkQcFtvXLXSFo5i1xfpbBQmXN8Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=PvaSCkaPGAxkZorgrCwTUknSyqZlm4KrB/Urh29jNvQ=; b=kQdGWx9FulYkCJ8LQHbbKS9CteoYJ9IJKnNN0qSKRILMY6KjJTaMIcHDhT6+2JDc4t za9RHhqugLLgHhRbSkNLw+3cukofgUZXaeq/sPV9JbsosAaoRGVF4f17Kk79TFQM4hz7 jiy2eYScEU8UiJDAz2vg0hhBaquYH0i5ow8NcVYOo8FFrqaNaZZRPl3R0JAMzJqPhKBh 1E0SwccRYXB0Gr5sfXzBGIXX5efLZkEjlpbequKhcVBpp2EVIXI92X++bpSs8jo4hUyw xcWzdTy990LhFlChMsBewZuBnYkAJXJY7w9gS4me+u9690PDAw6k4yXH2NMfJLBQyjX+ iclw== X-Gm-Message-State: ACrzQf2pLKoT9xgwzxWHh4D3cIpRoBKdGsBPyeCaITMdm0xk/zpEDSvU 1gzTYJV5UJkg0Niv5aQcGZAKlt53H9BTO1O4ExA71xwv22kgsw== X-Google-Smtp-Source: AMsMyM5hifwOy6yqLAoPpdTkHGIwjL5zM2ptwqjbIimKXrl0RtaG91VVG9qMju5GQIqDbtANSizC2iI5k5jpUGDchRI= X-Received: by 2002:a17:90b:4c8b:b0:203:5db5:8b71 with SMTP id my11-20020a17090b4c8b00b002035db58b71mr210459pjb.51.1664982644827; Wed, 05 Oct 2022 08:10:44 -0700 (PDT) MIME-Version: 1.0 References: <20220913162732.163631-1-xukuohai@huaweicloud.com> <970a25e4-9b79-9e0c-b338-ed1a934f2770@huawei.com> <2cb606b4-aa8b-e259-cdfd-1bfc61fd7c44@huawei.com> <7f34d333-3b2a-aea5-f411-d53be2c46eee@huawei.com> <20221005110707.55bd9354@gandalf.local.home> In-Reply-To: <20221005110707.55bd9354@gandalf.local.home> From: Florent Revest Date: Wed, 5 Oct 2022 17:10:33 +0200 Message-ID: Subject: Re: [PATCH bpf-next v2 0/4] Add ftrace direct call for arm64 To: Steven Rostedt Cc: Xu Kuohai , Mark Rutland , Catalin Marinas , Daniel Borkmann , Xu Kuohai , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Will Deacon , Jean-Philippe Brucker , Ingo Molnar , Oleg Nesterov , Alexei Starovoitov , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Zi Shen Lim , Pasha Tatashin , Ard Biesheuvel , Marc Zyngier , Guo Ren , Masami Hiramatsu Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 5, 2022 at 5:07 PM Steven Rostedt wrote: > > On Wed, 5 Oct 2022 22:54:15 +0800 > Xu Kuohai wrote: > > > 1.3 attach bpf prog with with direct call, bpftrace -e 'kfunc:vfs_write {}' > > > > # dd if=/dev/zero of=/dev/null count=1000000 > > 1000000+0 records in > > 1000000+0 records out > > 512000000 bytes (512 MB, 488 MiB) copied, 1.72973 s, 296 MB/s > > > > > > 1.4 attach bpf prog with with indirect call, bpftrace -e 'kfunc:vfs_write {}' > > > > # dd if=/dev/zero of=/dev/null count=1000000 > > 1000000+0 records in > > 1000000+0 records out > > 512000000 bytes (512 MB, 488 MiB) copied, 1.99179 s, 257 MB/s Thanks for the measurements Xu! > Can you show the implementation of the indirect call you used? Xu used my development branch here https://github.com/FlorentRevest/linux/commits/fprobe-min-args As it stands, the performance impact of the fprobe based implementation would be too high for us. I wonder how much Mark's idea here https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm64/ftrace/per-callsite-ops would help but it doesn't work right now.