linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Björn Töpel" <bjorn@kernel.org>
To: Puranjay Mohan <puranjay12@gmail.com>
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
Date: Mon, 14 Aug 2023 12:06:53 +0200	[thread overview]
Message-ID: <871qg6gcoy.fsf@all.your.base.are.belong.to.us> (raw)
In-Reply-To: <CANk7y0jFHE7kX4LegSdoRrkLfWLwE0iawsAt6ktCniYCGbLdiQ@mail.gmail.com>

Puranjay Mohan <puranjay12@gmail.com> 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=d5e4/1/0x4000000000000000 softirq=5542/5542 fqs=1862
>>   | rcu:        (detected by 1, t=5252 jiffies, g=10253, q=195 ncpus=4)
>>   | 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:
>>   | [<ffffffff80cbc444>] __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_orientation_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: 8000000000000005
>>   | [<ffffffff8000ab4c>] __sbi_rfence_v02_call.isra.0+0x74/0x11a
>>   | [<ffffffff8000accc>] __sbi_rfence_v02+0xda/0x1a4
>>   | [<ffffffff8000a886>] sbi_remote_fence_i+0x1e/0x26
>>   | [<ffffffff8000cee2>] flush_icache_all+0x1a/0x48
>>   | [<ffffffff80007736>] patch_text_nosync+0x6c/0x8c
>>   | [<ffffffff8000f0f8>] bpf_arch_text_invalidate+0x62/0xac
>>   | [<ffffffff8016c538>] bpf_prog_pack_free+0x9c/0x1b2
>>   | [<ffffffff8016c84a>] bpf_jit_binary_pack_free+0x20/0x4a
>>   | [<ffffffff8000f198>] bpf_jit_free+0x56/0x9e
>>   | [<ffffffff8016b43a>] bpf_prog_free_deferred+0x15a/0x182
>>   | [<ffffffff800576c4>] process_one_work+0x1b6/0x3d6
>>   | [<ffffffff80057d52>] worker_thread+0x84/0x378
>>   | [<ffffffff8005fc2c>] kthread+0xe8/0x108
>>   | [<ffffffff80003ffa>] 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. 


Björn

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2023-08-14 10:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20 15:49 [PATCH bpf-next 0/2] bpf, riscv: use BPF prog pack allocator in BPF JIT Puranjay Mohan
2023-07-20 15:49 ` [PATCH bpf-next 1/2] riscv: Extend patch_text_nosync() for multiple pages Puranjay Mohan
2023-08-13 20:20   ` Björn Töpel
2023-07-20 15:49 ` [PATCH bpf-next 2/2] bpf, riscv: use prog pack allocator in the BPF JIT Puranjay Mohan
2023-07-22  9:24 ` [PATCH bpf-next 0/2] bpf, riscv: use BPF prog pack allocator in " Björn Töpel
2023-08-13 20:27 ` Björn Töpel
2023-08-14  6:14   ` Björn Töpel
2023-08-14  9:12 ` Björn Töpel
2023-08-14  9:42   ` Puranjay Mohan
2023-08-14 10:06     ` Björn Töpel [this message]
2023-08-14 10:40   ` Björn Töpel
2023-08-14 12:05     ` Puranjay Mohan
2023-08-14 14:29       ` Björn Töpel
2023-08-14 15:38         ` Puranjay Mohan
2023-08-14 18:30           ` Björn Töpel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qg6gcoy.fsf@all.your.base.are.belong.to.us \
    --to=bjorn@kernel.org \
    --cc=andrii@kernel.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=daniel@iogearbox.net \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=martin.lau@linux.dev \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=pulehui@huawei.com \
    --cc=puranjay12@gmail.com \
    --cc=song@kernel.org \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).