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 0F1E6C433F5 for ; Wed, 5 Oct 2022 15:10:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230330AbiJEPKr (ORCPT ); Wed, 5 Oct 2022 11:10:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230242AbiJEPKq (ORCPT ); Wed, 5 Oct 2022 11:10:46 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69BD86DFB1 for ; Wed, 5 Oct 2022 08:10:45 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id h10so12927818plb.2 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=QCkJWSfuvoNzj409nf5t6mb8hL6HZw6cMD0I+P3Q8YZ5eFan2Ed167HENPIaZzphAf ieYCJhilr+e0rG5ELA4aqSX1w3VBDG4gBHRjavdJ5FBTtEYQwntD4efAzxdV/JcnpbuH FjlRWNasdvN3f92RSYNXBDR6sTS9Juwq9SgQPIfVJiB5QAUgbSg5FK6bYvIz7QI94k/Z TqHdyQ5w1gAJ/UTjIQ9FC/E38FWbNkJDb2qCpFVvTNUsdlIARyLs/6qTJBoyAyBQqh/H tlXcsREnsRE2Z5JljoSvMygK8fU6vfECWri7XBBVGRIllcjeOwq+k4FgwcxCMkNdzhEf wUzg== X-Gm-Message-State: ACrzQf1WgpMR7PYVr7LOboWQC2sVdNC58XAHHqkog63up+I2hp+cSCf4 pswBtH+ytuMTrpG32g0axkiWogNoodiQXJ1YrVfQEw== 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: bpf@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.