Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2470454rdg; Mon, 14 Aug 2023 03:47:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH2WNga2KFpEkvr9+Fj9XXCpO0swoyaPf+ltvSGeCJzpjzgJmpB8FHlFmAeGs50GCA8IQcP X-Received: by 2002:a17:90b:4c85:b0:26b:4a9e:3c7e with SMTP id my5-20020a17090b4c8500b0026b4a9e3c7emr3974218pjb.4.1692010068148; Mon, 14 Aug 2023 03:47:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692010068; cv=none; d=google.com; s=arc-20160816; b=Qkw7bx2iBnT8Knmbnn9ZME9R6zeviLiWaUgWfHdYuU9X+oc3KGm3ST5amPXxOef2Ed otHKu8SOSimcJJUnIama4Sf+HBmunqXTyFionQm127zoLmbpUKtMuLJ16QxlIASuSNAs C/jyMq9OUWZ9GxA+89kUDJdTsgBjO8P9dZ0b2G0oP79rNpqJvB8yo7h5r5UIc2/FzWQd ju7GNLPUVf4yjgId66Wnn+WPKWPz9hVxZKL5uaNM3k/FapdeIBM89/rzeIf1zlGcPicn VfAB1seda161naj/tiS18iaFPxzS6PhUnbk4/PKJ19U4S4xHXrOF+8R48TACgLuEbyhN c1WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=wUc+6W4u4Oi7XqZq+jpkayn3n0k4i9UZGvVSMS+j/BE=; fh=YUuUqizCY+aIjfD1Kvv4+iG3+Z7caSgkqffn0u9iKTA=; b=cQJwk6hQMdwzRvYD/ezrXzLcqWdx0oJmVnWt9zJVKNE8FKXtnL+USE0H4jn2IFgIoG UtCZF00AoAIQMxMCtRyAQDw54zerkDu3WKo89TL1B1RQ/d7s59DBgAmbmkBrQvoj0N4G K13WRHbHV3+9afHGPLGfOJUGL/BIf/4OGG1TiXaZ6wrJcKIlsjv1aXV02Tyy0NuSE/xI KarCx7sZ6k6F+9CcO0w+VJkk44dYQdzD7C9e5bk8rEZRbpjw1y9eyZLtKbxpBjJ9zoxo io1it9U3W4jprhnaRB/bsItevoYTrWas/1bpHng3omyWCz6FVL1Ns6JBt6H9Nvl4V0Nn +K8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D3Dg80dt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q7-20020a17090aa00700b00267ed1dd76esi9736204pjp.177.2023.08.14.03.47.36; Mon, 14 Aug 2023 03:47:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D3Dg80dt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235461AbjHNKHP (ORCPT + 99 others); Mon, 14 Aug 2023 06:07:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233081AbjHNKG6 (ORCPT ); Mon, 14 Aug 2023 06:06:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 454BF133 for ; Mon, 14 Aug 2023 03:06:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B6C60641F5 for ; Mon, 14 Aug 2023 10:06:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A46B3C433CA; Mon, 14 Aug 2023 10:06:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692007616; bh=sN0iD6JNy5wZ570D2k8jyG1PR68JPva0DnKLTcI1C7I=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=D3Dg80dtZZTq9erXMoT+6YtBIN3BZ57BZY6bA8WegqWx9oifPcLDD+AOSeBQICEB1 GuU1c+Edch0xl6HpVgqdKeFstHV68hvocCYdc/1IXZZKbqv6wT6HqEwToMLego7jYh aiar1N0lxiNLkst7pDOhChM7PuPZCB1lOnbTav/b33UOeAvRBvEu+zEIbpswz0VQ53 KF7n6zKUsABYsll+o3nDrjaok1jBT7PQOwyrPVv/jW37gwn/2izByzAz5V+IDlG49A arLYTX6ltPZCeyFPjNCGgwLjMW+FI9/OGJnd9nnTfHpjcngNikoTPKiBf6L8+34NyW u5SACaaaPUMuw== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: Puranjay Mohan Cc: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, pulehui@huawei.com, conor.dooley@microchip.com, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yhs@fb.com, kpsingh@kernel.org, bpf@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH bpf-next 0/2] bpf, riscv: use BPF prog pack allocator in BPF JIT In-Reply-To: References: <20230720154941.1504-1-puranjay12@gmail.com> <87pm3qt2c8.fsf@all.your.base.are.belong.to.us> Date: Mon, 14 Aug 2023 12:06:53 +0200 Message-ID: <871qg6gcoy.fsf@all.your.base.are.belong.to.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Puranjay Mohan writes: >> I get a hang for "test_tag", but it's not directly related to your >> series, but rather "remote fence.i". > > I was seeing some stalls like this even without my series but couldn't > debug them at that time. Yeah, I think it's not related to your series -- it's just a good reproducer. ;-) >> >> | rcu: INFO: rcu_sched detected stalls on CPUs/tasks: >> | rcu: 0-....: (1400 ticks this GP) idle=3Dd5e4/1/0x40000000000= 00000 softirq=3D5542/5542 fqs=3D1862 >> | rcu: (detected by 1, t=3D5252 jiffies, g=3D10253, q=3D195 ncp= us=3D4) >> | Task dump for CPU 0: >> | task:kworker/0:5 state:R running task stack:0 pid:319 = ppid:2 flags:0x00000008 >> | Workqueue: events bpf_prog_free_deferred >> | Call Trace: >> | [] __schedule+0x2d0/0x940 >> | watchdog: BUG: soft lockup - CPU#0 stuck for 21s! [kworker/0:5:319] >> | Modules linked in: nls_iso8859_1 drm fuse i2c_core drm_panel_orienta= tion_quirks backlight dm_mod configfs ip_tables x_tables >> | CPU: 0 PID: 319 Comm: kworker/0:5 Not tainted 6.5.0-rc5 #1 >> | Hardware name: riscv-virtio,qemu (DT) >> | Workqueue: events bpf_prog_free_deferred >> | epc : __sbi_rfence_v02_call.isra.0+0x74/0x11a >> | ra : __sbi_rfence_v02+0xda/0x1a4 >> | epc : ffffffff8000ab4c ra : ffffffff8000accc sp : ff20000001c9bbd0 >> | gp : ffffffff82078c48 tp : ff600000888e6a40 t0 : ff20000001c9bd44 >> | t1 : 0000000000000000 t2 : 0000000000000040 s0 : ff20000001c9bbf0 >> | s1 : 0000000000000010 a0 : 0000000000000000 a1 : 0000000000000000 >> | a2 : 0000000000000000 a3 : 0000000000000000 a4 : 0000000000000000 >> | a5 : 0000000000000000 a6 : 0000000000000000 a7 : 0000000052464e43 >> | s2 : 000000000000ffff s3 : 00000000ffffffff s4 : ffffffff81667528 >> | s5 : 0000000000000000 s6 : 0000000000000000 s7 : 0000000000000000 >> | s8 : 0000000000000001 s9 : 0000000000000003 s10: 0000000000000040 >> | s11: ffffffff8207d240 t3 : 000000000000000f t4 : 000000000000002a >> | t5 : ff600000872df140 t6 : ffffffff81e26828 >> | status: 0000000200000120 badaddr: 0000000000000000 cause: 8000000000= 000005 >> | [] __sbi_rfence_v02_call.isra.0+0x74/0x11a >> | [] __sbi_rfence_v02+0xda/0x1a4 >> | [] sbi_remote_fence_i+0x1e/0x26 >> | [] flush_icache_all+0x1a/0x48 >> | [] patch_text_nosync+0x6c/0x8c >> | [] bpf_arch_text_invalidate+0x62/0xac >> | [] bpf_prog_pack_free+0x9c/0x1b2 >> | [] bpf_jit_binary_pack_free+0x20/0x4a >> | [] bpf_jit_free+0x56/0x9e >> | [] bpf_prog_free_deferred+0x15a/0x182 >> | [] process_one_work+0x1b6/0x3d6 >> | [] worker_thread+0x84/0x378 >> | [] kthread+0xe8/0x108 >> | [] ret_from_fork+0xe/0x20 >> >> I'm digging into that now, and I would appreciate if you could run the >> test_tag on VF2 or similar (I'm missing that HW). > > Sure, I will try to run this on the board. > I will rebase my series(+ the patch from arm64 series) on the latest > bpf-next tree and try to run it. Thank you! > Let me know if I need to add: > + select HAVE_EFFICIENT_UNALIGNED_ACCESS if MMU && 64BIT I usually run with that *on*, for better coverage.=20 Bj=C3=B6rn