Re: CHANGE_PV_LIST_LOCK_TO_PHYS is not correct when !NUMA ?

From: Konstantin Belousov <kostikbel_at_gmail.com>
Date: Sun, 10 May 2020 00:25:12 +0300
On Sun, May 10, 2020 at 12:02:19AM +0300, Andriy Gapon wrote:
> On 09/05/2020 23:47, Konstantin Belousov wrote:
> > Might be not, might be it would help due to pmap_delayed_invl_genp().
> > But I would more worry about this 'already started' issue, because
> > this must not happen.  Can you remove the assert from the macro and
> > provide backtrace of 'DI already started' panic ?
> 
> Oh, now that you asked for it, I see that it was a secondary panic (through vt,
> fb, drm code path).
> The first panic was still the same "address %lx beyond the last segment".
> I'll test your suggestion tomorrow.
Yes, the backtrace is reasonable in the sense that VM was recursed due to
panic while already in DI section.  So pmap_remove() from inside panic
handler indeed triggered the right assert.

> 
> 
> #10 0xffffffff8080340e in vpanic (fmt=<optimized out>, ap=<optimized out>) at
> /usr/devel/git/motil/sys/kern/kern_shutdown.c:902
> #11 0xffffffff808031a3 in panic (fmt=0xffffffff8119a998 <cnputs_mtx>
> "\265\001ʀ\377\377\377\377") at /usr/devel/git/motil/sys/kern/kern_shutdown.c:839
> #12 0xffffffff80bb4c05 in pmap_delayed_invl_start_u () at
> /usr/devel/git/motil/sys/amd64/amd64/pmap.c:783
> #13 0xffffffff80bb8ede in pmap_remove (pmap=0xffffffff812ee930
> <kernel_pmap_store>, sva=18446741877558251520, eva=<optimized out>) at
> /usr/devel/git/motil/sys/amd64/amd64/pmap.c:5418
> #14 0xffffffff80b2b6ad in _kmem_unback (object=<optimized out>,
> addr=18446741877558251520, size=102400) at /usr/devel/git/motil/sys/vm/vm_kern.c:574
> #15 0xffffffff80b2b7dd in kmem_free (addr=18446741877558251520, size=102400) at
> /usr/devel/git/motil/sys/vm/vm_kern.c:614
> #16 0xffffffff807db77b in free_large (addr=0xfffffe00ab2e9000, size=102400) at
> /usr/devel/git/motil/sys/kern/kern_malloc.c:599
> #17 free (addr=0xfffffe00ab2e9000, mtp=0xffffffff825f90c0 <M_KMALLOC>) at
> /usr/devel/git/motil/sys/kern/kern_malloc.c:818
> #18 0xffffffff82444922 in dc_gamma_release (gamma=<optimized out>) at
> /usr/home/avg/devel/kms-drm/drivers/gpu/drm/amd/display/dc/core/dc_surface.c:162
> #19 destruct (plane_state=0xfffff800080ef800) at
> /usr/home/avg/devel/kms-drm/drivers/gpu/drm/amd/display/dc/core/dc_surface.c:53
> #20 dc_plane_state_free (kref=<optimized out>) at
> /usr/home/avg/devel/kms-drm/drivers/gpu/drm/amd/display/dc/core/dc_surface.c:140
> #21 kref_put (kref=<optimized out>, rel=<optimized out>) at
> /usr/devel/git/motil/sys/compat/linuxkpi/common/include/linux/kref.h:74
> #22 dc_plane_state_release (plane_state=<optimized out>) at
> /usr/home/avg/devel/kms-drm/drivers/gpu/drm/amd/display/dc/core/dc_surface.c:146
> #23 0xffffffff82442de9 in dc_resource_state_destruct
> (context=0xfffffe00a2af0000) at
> /usr/home/avg/devel/kms-drm/drivers/gpu/drm/amd/display/dc/core/dc_resource.c:2295
> #24 0xffffffff824355d2 in dc_state_free (kref=<optimized out>) at
> /usr/home/avg/devel/kms-drm/drivers/gpu/drm/amd/display/dc/core/dc.c:1152
> #25 kref_put (kref=<optimized out>, rel=<optimized out>) at
> /usr/devel/git/motil/sys/compat/linuxkpi/common/include/linux/kref.h:74
> #26 dc_release_state (context=<optimized out>) at
> /usr/home/avg/devel/kms-drm/drivers/gpu/drm/amd/display/dc/core/dc.c:1158
> #27 0xffffffff8241f6cc in dm_atomic_destroy_state (obj=<optimized out>,
> state=0xfffff80020465550) at
> /usr/home/avg/devel/kms-drm/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:1667
> #28 0xffffffff82569734 in drm_atomic_state_default_clear
> (state=0xfffff80008274a00) at
> /usr/home/avg/devel/kms-drm/drivers/gpu/drm/drm_atomic.c:202
> #29 0xffffffff82569827 in drm_atomic_state_clear (state=<optimized out>) at
> /usr/home/avg/devel/kms-drm/drivers/gpu/drm/drm_atomic.c:240
> #30 __drm_atomic_state_free (ref=0xfffff80008274a00) at
> /usr/home/avg/devel/kms-drm/drivers/gpu/drm/drm_atomic.c:256
> #31 0xffffffff825998d8 in kref_put (kref=0xfffff80008274a00, rel=<optimized
> out>) at /usr/devel/git/motil/sys/compat/linuxkpi/common/include/linux/kref.h:74
> #32 drm_atomic_state_put (state=0xfffff80008274a00) at
> /usr/home/avg/devel/kms-drm/include/drm/drm_atomic.h:385
> #33 restore_fbdev_mode_atomic (fb_helper=<optimized out>, active=true) at
> /usr/home/avg/devel/kms-drm/drivers/gpu/drm/drm_fb_helper.c:461
> #34 0xffffffff8259567a in drm_fb_helper_restore_fbdev_mode_unlocked
> (fb_helper=0xfffff8002096d800) at
> /usr/home/avg/devel/kms-drm/drivers/gpu/drm/drm_fb_helper.c:549
> #35 0xffffffff825bcc8a in vt_kms_postswitch (arg=0xfffff800027c52c0) at
> /usr/home/avg/devel/kms-drm/drivers/gpu/drm/linux_fb.c:97
> #36 0xffffffff806b04b2 in vt_window_switch (vw=0xffffffff80e999a8
> <vt_conswindow>) at /usr/devel/git/motil/sys/dev/vt/vt_core.c:603
> #37 0xffffffff806ada0f in vtterm_cngrab (tm=<optimized out>) at
> /usr/devel/git/motil/sys/dev/vt/vt_core.c:1612
> #38 0xffffffff8079f776 in cngrab () at /usr/devel/git/motil/sys/kern/kern_cons.c:397
> #39 0xffffffff8080335c in vpanic (fmt=0xffffffff80cc257f "address %lx beyond the
> last segment", ap=0xfffffe009e18c890) at
> /usr/devel/git/motil/sys/kern/kern_shutdown.c:887
> #40 0xffffffff808031a3 in panic (fmt=0xffffffff8119a998 <cnputs_mtx>
> "\265\001ʀ\377\377\377\377") at /usr/devel/git/motil/sys/kern/kern_shutdown.c:839
> #41 0xffffffff80bc2ac3 in pmap_remove_pte (pmap=0xfffffe00a4cdbb08,
> ptq=0xfffff800cd2b4000, va=34523316224, ptepde=3442163815,
> free=0xfffffe009e18c9a0, lockp=0xfffffe009e18c9b8) at
> /usr/devel/git/motil/sys/amd64/amd64/pmap.c:3599
> #42 0xffffffff80bba98c in pmap_remove_ptes (pmap=0xfffffe00a4cdbb08,
> sva=34523316224, eva=34525413376, pde=0xfffff800b2515270,
> free=0xfffffe009e18c9a0, lockp=0xfffffe009e18c9b8) at
> /usr/devel/git/motil/sys/amd64/amd64/pmap.c:5378
> #43 0xffffffff80bb921c in pmap_remove (pmap=<optimized out>, sva=34523316224,
> eva=<optimized out>) at /usr/devel/git/motil/sys/amd64/amd64/pmap.c:5506
> #44 0xffffffff80b301a0 in vm_map_delete (map=0xfffffe00a4cdb9e8,
> start=<optimized out>, end=<optimized out>) at
> /usr/devel/git/motil/sys/vm/vm_map.c:3804
> #45 0xffffffff80b3856e in kern_munmap (td=0xfffffe009c7be800, addr0=<optimized
> out>, size=2097152) at /usr/devel/git/motil/sys/vm/vm_mmap.c:624
> #46 0xffffffff80bcff00 in syscallenter (td=<optimized out>) at
> /usr/devel/git/motil/sys/amd64/amd64/../../kern/subr_syscall.c:162
> #47 amd64_syscall (td=0xfffffe009c7be800, traced=0) at
> /usr/devel/git/motil/sys/amd64/amd64/trap.c:1161
> 
> -- 
> Andriy Gapon
Received on Sat May 09 2020 - 19:25:23 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:24 UTC