Hi Dmitry, > ... > > There's little difference between the current event handling and the one > > where no vblanks have been set up. I suspect that the vblank timer > > callback interferes with the locking in atomic_flush. That would also > > explain why the fps drop at no clear pattern. > > > > Could you please test the attached patch? It enables/disables the vblank > > timer depending on the buffer resources; as you suggested before. Does > > this make a difference? > > The attached patch doesn't work, please see the trace below. > > @Vivek Please clarify whether you only see frames drop with your > multi-gpu guest-blob setup or with a usual virgl too. I haven't noticed Sorry, I should have mentioned this detail about setup. I only (tested and) see this frame drop in multi-gpu guest-blob scenarios.
Thanks, Vivek > problem with frames pacing for virgl and nctx modes yesterday, will > check again. > > [ 11.456513] ------------[ cut here ]------------ > [ 11.460050] driver forgot to call drm_crtc_vblank_off() > [ 11.461253] WARNING: CPU: 12 PID: 445 at > drivers/gpu/drm/drm_atomic_helper.c:1279 > drm_atomic_helper_commit_modeset_disables+0x6c6/0x6d0 > [ 11.461824] Modules linked in: > [ 11.461989] CPU: 12 UID: 0 PID: 445 Comm: Xorg Not tainted > 6.17.0-rc6-01184-ga95b3b198869 #174 PREEMPT(voluntary) > [ 11.462638] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS > rel-1.17.0-0-gb52ca86e094d-prebuilt.qemu.org 04/01/2014 > [ 11.463214] RIP: > 0010:drm_atomic_helper_commit_modeset_disables+0x6c6/0x6d0 > [ 11.463574] Code: 32 53 02 01 e8 4b d1 33 ff 0f 0b 48 8b 43 08 e9 ae > fb ff ff 48 c7 c7 30 9f c7 83 89 45 c8 c6 05 e8 31 53 02 01 e8 2a d1 33 > ff <0f> 0b 8b 45 c8 eb 9c 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 > [ 11.464613] RSP: 0018:ffffc90001007960 EFLAGS: 00010286 > [ 11.464906] RAX: 0000000000000000 RBX: ffff88810b24ff80 RCX: > 0000000000000000 > [ 11.465301] RDX: 0000000000000002 RSI: 0000000000000001 RDI: > 00000000ffffffff > [ 11.465706] RBP: ffffc900010079a8 R08: 0000000000000000 R09: > ffffc90001007790 > [ 11.466104] R10: 0000000000000001 R11: 6620726576697264 R12: > 0000000000000000 > [ 11.466495] R13: ffff888103920040 R14: 0000000000000000 R15: > 0000000000000000 > [ 11.467043] FS: 00007f8d2868dec0(0000) GS:ffff8888d66f7000(0000) > knlGS:0000000000000000 > [ 11.467415] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [ 11.467688] CR2: 00007f8d285b1000 CR3: 000000010109a000 CR4: > 0000000000750ef0 > [ 11.468023] PKRU: 55555554 > [ 11.468165] Call Trace: > [ 11.468286] <TASK> > [ 11.468405] drm_atomic_helper_commit_tail+0x1e/0x70 > [ 11.468635] commit_tail+0x112/0x180 > [ 11.468798] ? srso_alias_return_thunk+0x5/0xfbef5 > [ 11.469027] drm_atomic_helper_commit+0x126/0x150 > [ 11.469244] drm_atomic_commit+0xaa/0xe0 > [ 11.469432] ? __pfx___drm_printfn_info+0x10/0x10 > [ 11.469651] drm_atomic_helper_dirtyfb+0x1eb/0x2f0 > [ 11.469873] drm_mode_dirtyfb_ioctl+0xfd/0x1c0 > [ 11.470078] ? __pfx_drm_mode_dirtyfb_ioctl+0x10/0x10 > [ 11.470318] drm_ioctl_kernel+0xa3/0x100 > [ 11.470497] ? srso_alias_return_thunk+0x5/0xfbef5 > [ 11.470719] drm_ioctl+0x2be/0x570 > [ 11.470877] ? __pfx_drm_mode_dirtyfb_ioctl+0x10/0x10 > [ 11.471105] ? do_syscall_64+0x1e7/0x1f0 > [ 11.471302] ? srso_alias_return_thunk+0x5/0xfbef5 > [ 11.471529] ? __mark_inode_dirty+0xc5/0x340 > [ 11.471735] ? srso_alias_return_thunk+0x5/0xfbef5 > [ 11.471968] ? srso_alias_return_thunk+0x5/0xfbef5 > [ 11.472199] __x64_sys_ioctl+0x9a/0xf0 > [ 11.472377] x64_sys_call+0x1009/0x1d80 > [ 11.472565] do_syscall_64+0x6e/0x1f0 > [ 11.472731] ? srso_alias_return_thunk+0x5/0xfbef5 > [ 11.472946] ? __handle_mm_fault+0x92d/0xfa0 > [ 11.473157] ? srso_alias_return_thunk+0x5/0xfbef5 > [ 11.473381] ? debug_smp_processor_id+0x17/0x20 > [ 11.473596] ? srso_alias_return_thunk+0x5/0xfbef5 > [ 11.473813] ? count_memcg_events+0x93/0x230 > [ 11.474014] ? srso_alias_return_thunk+0x5/0xfbef5 > [ 11.474242] ? debug_smp_processor_id+0x17/0x20 > [ 11.474446] ? srso_alias_return_thunk+0x5/0xfbef5 > [ 11.474669] ? srso_alias_return_thunk+0x5/0xfbef5 > [ 11.474885] ? irqentry_exit_to_user_mode+0x18c/0x190 > [ 11.475111] ? srso_alias_return_thunk+0x5/0xfbef5 > [ 11.475338] ? irqentry_exit+0x3b/0x50 > [ 11.475515] ? srso_alias_return_thunk+0x5/0xfbef5 > [ 11.475730] ? exc_page_fault+0x86/0x180 > [ 11.475918] entry_SYSCALL_64_after_hwframe+0x76/0x7e > [ 11.476130] RIP: 0033:0x7f8d2891674d > > > -- > Best regards, > Dmitry
