[Bug 261338] [PATCH] kernel panic "bad pte" under heavy CPU load on 12.2 and 12.3 (i386)

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 19 Jan 2022 17:52:28 UTC

Andriy Gapon <avg@FreeBSD.org> changed:

           What    |Removed                     |Added
             Status|New                         |Open

--- Comment #4 from Andriy Gapon <avg@FreeBSD.org> ---
(In reply to Dmitry K. from comment #3)
Yes, I think that's the problem.
When creating a patch for stable/12 I totally missed the fact that in main the
smp_*_shootdown functions got split into i386 and amd64 variants.  The i386
smp_targeted_tlb_shootdown has a paired sched_pin / sched_unpin while the amd64
smp_targeted_tlb_shootdown has only sched_unpin and expects the current thread
to be already pinned.

So, I merged the amd64 variant into the shared x86 smp shootdown code of
stable/12.  That works well with the merged amd64 pmap code, but it broke the
i386 pmap code.

Let me think how to fix the breakage.
It seems that maybe it would be sufficient to make the sched_unpin calls in
smp_targeted_tlb_shootdown specific to amd64.  If I am not mistaken, on i386
smp_targeted_tlb_shootdown is always called with the current thread pinned, so
internal pinning (which got removed by me) and unpinning should be unnecessary.

You are receiving this mail because:
You are the assignee for the bug.