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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 6C85AC04FFE for ; Wed, 8 May 2024 10:11:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8lA6uNj0qI2+N3LWFOFaiopiLK3rxCI1u8VL7DR7TKw=; b=TEQrZXuT0ylmvZ Jz5g8P1bS4oD88U2Ms7zky+MqWsiAjHV8Y3p4VasB5+HuJoIxqBZN9kXxPgT3n8V74g8WTugvOl+y P8O2m2eh92/6Oh9xhO7JtAsWZ8B9qzcx7G7JCZsSGiQMfTOYD7Y10VgtjukuS3qJfKDsG2sIUWykL whuH0M05jyIjN1TcXYTM1i1Oj4sWgDR5qgL5VyA3BQ65DZtauDadLbczhowgHUFIPQ5hAGL+zoXeq OEvxk8mTnJC5/4NDD8qhcvnAuk8fi5TafFgjO9CyRdU0IYHLswXOk2U2OyPYzbYC4MwjqRH1CMaOO ybacer04UHITKXr/nKFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4eGp-0000000Ev6m-1HLD; Wed, 08 May 2024 10:11:31 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4eGm-0000000Ev5k-1aIh for linux-arm-kernel@lists.infradead.org; Wed, 08 May 2024 10:11:30 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 7948261B50; Wed, 8 May 2024 10:11:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1EEFC4AF17; Wed, 8 May 2024 10:11:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715163087; bh=O01+4OxDhqfAMNBJajyRNazF4RaEhwcQwMkJgUw3EWY=; h=From:To:Subject:In-Reply-To:References:Date:From; b=Zh/RcZaGT6E7lVROM1Ix/WzyM9U1WHn89iH+ECtYZyPi325pd5UBnddq6OsgQKhGj dtgp1emBDcRguH+li8+LQOsvCJHPDTzLgdhPEnO6o2x9HZhEu0bjP2FV3Co8XIFCye zN4xGHE8nKwPbF0b+AXMC9mFzQqGUrhGjtblR5TjB5mb2wy78uePKX7yUX6LcmK+Bj EchcG9cYgys2zvHpPQstcBiSX9NWznB/RttR2UazhmwjIa9ODcL4uU00iHqmG+2hdb wzt2m24Re/wGc58B9JxIG00Be3CU853Cea4h9d6mKsUD2Cdk99oG0QBZqNID/djXMX O53MvfdTHggLA== From: Puranjay Mohan To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Zi Shen Lim , Catalin Marinas , Will Deacon , Mykola Lysenko , Shuah Khan , bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH bpf-next] bpf, arm64: Add support for lse atomics in bpf_arena In-Reply-To: <20240426161116.441-1-puranjay@kernel.org> References: <20240426161116.441-1-puranjay@kernel.org> Date: Wed, 08 May 2024 10:11:23 +0000 Message-ID: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240508_031128_547520_8B2A6D2D X-CRM114-Status: UNSURE ( 8.52 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Puranjay Mohan writes: > When LSE atomics are available, BPF atomic instructions are implemented > as single ARM64 atomic instructions, therefore it is easy to enable > these in bpf_arena using the currently available exception handling > setup. > > LL_SC atomics use loops and therefore would need more work to enable in > bpf_arena. > > Enable LSE atomics based instructions in bpf_arena and use the > bpf_jit_supports_insn() callback to reject atomics in bpf_arena if LSE > atomics are not available. > > All atomics and arena_atomics selftests are passing: > > [root@ip-172-31-2-216 bpf]# ./test_progs -a atomics,arena_atomics > #3/1 arena_atomics/add:OK > #3/2 arena_atomics/sub:OK > #3/3 arena_atomics/and:OK > #3/4 arena_atomics/or:OK > #3/5 arena_atomics/xor:OK > #3/6 arena_atomics/cmpxchg:OK > #3/7 arena_atomics/xchg:OK > #3 arena_atomics:OK > #10/1 atomics/add:OK > #10/2 atomics/sub:OK > #10/3 atomics/and:OK > #10/4 atomics/or:OK > #10/5 atomics/xor:OK > #10/6 atomics/cmpxchg:OK > #10/7 atomics/xchg:OK > #10 atomics:OK > Summary: 2/14 PASSED, 0 SKIPPED, 0 FAILED Gentle ping about this, Thanks, Puranjay _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel