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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C2A87CDB465 for ; Mon, 16 Oct 2023 12:29:17 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=iogearbox.net header.i=@iogearbox.net header.a=rsa-sha256 header.s=default2302 header.b=mgT5JJOA; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4S8Gd82zBNz3cbD for ; Mon, 16 Oct 2023 23:29:16 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=iogearbox.net header.i=@iogearbox.net header.a=rsa-sha256 header.s=default2302 header.b=mgT5JJOA; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=iogearbox.net (client-ip=213.133.104.62; helo=www62.your-server.de; envelope-from=daniel@iogearbox.net; receiver=lists.ozlabs.org) X-Greylist: delayed 1275 seconds by postgrey-1.37 at boromir; Mon, 16 Oct 2023 23:28:26 AEDT Received: from www62.your-server.de (www62.your-server.de [213.133.104.62]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4S8GcB0fTqz2yps for ; Mon, 16 Oct 2023 23:28:26 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=iogearbox.net; s=default2302; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=TEnSZIvpSmwaN7cCqVlIu4FsV7ACOF+OL3jC1tuaUH0=; b=mgT5JJOALKatilAZzAvSwnGGcO F1fn4cXst/MP3vXLygT0dFa0Vs1EV75pevRhCX7mfEXJ3C3g7fgrH8nmZE+FXVAIPbnrIMLqoadnC xmYQJOxvQvBsb+PU8orK1E4xDVMTQ7D1zeMXRabULVyuFn9uVENytWZKJQ+JUHCdnha6KbG46C37K nyVPRrs9r5ZxRV3Bue+ue12o3pZBmk+esjDRCfTsvWxUiiXnTuSD3S4ZuFZI8g+wAUwFkQUjizKFn ADS1r2HhxyyNyf+J4Uz+p0FaDTAtLYrPnewuHUrL/09rnXhoP+tRzV8RgrjQZBVKR6rN+QCAxwd8D 2mVxKTjw==; Received: from sslproxy03.your-server.de ([88.198.220.132]) by www62.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qsMND-000ALG-Pl; Mon, 16 Oct 2023 14:07:03 +0200 Received: from [85.1.206.226] (helo=linux.home) by sslproxy03.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qsMND-000F9v-E0; Mon, 16 Oct 2023 14:07:03 +0200 Subject: Re: [PATCH v6 0/5] powerpc/bpf: use BPF prog pack allocator To: Hari Bathini , linuxppc-dev , bpf@vger.kernel.org References: <20231012200310.235137-1-hbathini@linux.ibm.com> From: Daniel Borkmann Message-ID: <140a1e76-dfa4-d20e-fc10-09b4f3a85cb4@iogearbox.net> Date: Mon, 16 Oct 2023 14:07:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20231012200310.235137-1-hbathini@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.103.10/27063/Mon Oct 16 10:02:17 2023) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Song Liu , Alexei Starovoitov , Andrii Nakryiko , "Naveen N. Rao" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 10/12/23 10:03 PM, Hari Bathini wrote: > Most BPF programs are small, but they consume a page each. For systems > with busy traffic and many BPF programs, this may also add significant > pressure on instruction TLB. High iTLB pressure usually slows down the > whole system causing visible performance degradation for production > workloads. > > bpf_prog_pack, a customized allocator that packs multiple bpf programs > into preallocated memory chunks, was proposed [1] to address it. This > series extends this support on powerpc. > > Both bpf_arch_text_copy() & bpf_arch_text_invalidate() functions, > needed for this support depend on instruction patching in text area. > Currently, patch_instruction() supports patching only one instruction > at a time. The first patch introduces patch_instructions() function > to enable patching more than one instruction at a time. This helps in > avoiding performance degradation while JITing bpf programs. > > Patches 2 & 3 implement the above mentioned arch specific functions > using patch_instructions(). Patch 4 fixes a misnomer in bpf JITing > code. The last patch enables the use of BPF prog pack allocator on > powerpc and also, ensures cleanup is handled gracefully. > > [1] https://lore.kernel.org/bpf/20220204185742.271030-1-song@kernel.org/ > > Changes in v6: > * No changes in patches 2-5/5 except addition of Acked-by tags from Song. > * Skipped merging code path of patch_instruction() & patch_instructions() > to avoid performance overhead observed on ppc32 with that. I presume this will be routed via Michael? Thanks, Daniel