From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54354C61CE8 for ; Thu, 12 Jun 2025 07:25:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D1DA96B0089; Thu, 12 Jun 2025 03:25:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CCEBE6B008A; Thu, 12 Jun 2025 03:25:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BBDC76B008C; Thu, 12 Jun 2025 03:25:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 99E8A6B0089 for ; Thu, 12 Jun 2025 03:25:11 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 19DD0C058E for ; Thu, 12 Jun 2025 07:25:11 +0000 (UTC) X-FDA: 83545912422.08.7F5C665 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by imf13.hostedemail.com (Postfix) with ESMTP id B933820008 for ; Thu, 12 Jun 2025 07:25:08 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=qjHdRBmR; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=CMMSupme; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=qjHdRBmR; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=CMMSupme; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf13.hostedemail.com: domain of tzimmermann@suse.de designates 195.135.223.130 as permitted sender) smtp.mailfrom=tzimmermann@suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1749713109; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=OIFIbc2scGPWIlpVurAYWkEZOyPLXw9LExgLq86DRAo=; b=Yt13me/fWryGgd6U5+VVzbiX3EmK13WbApfQUFwP7Pn3SH6trFKg23VIERnv2H/Ys1nB5I OLxEYPESEZx861uEFajXyKSxZD1AJHeDarsw9fUaLzsaGIpDccN3gsKuaF+cgdDN74+KS5 1i1L9XfCRwFxUEvOrhLiS9bCFh3+7tU= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=qjHdRBmR; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=CMMSupme; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=qjHdRBmR; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=CMMSupme; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf13.hostedemail.com: domain of tzimmermann@suse.de designates 195.135.223.130 as permitted sender) smtp.mailfrom=tzimmermann@suse.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1749713109; a=rsa-sha256; cv=none; b=jAQNgW6UWzLBr7zJBcPVAeWHW7WU57SaU28o+rgdPwV2PhTTVDZ9HIt6x6fcMIkX06sXI/ LDbQX9KFu+z8cT05d+leXZeY6HBEHzxnghq5ziMOHAVyrJ8MFaoM0j4H8wJSY0voL2VbJU c3BpnaPW0JDb8Pov7ohveUswz2rL4NI= Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 24601211D0; Thu, 12 Jun 2025 07:25:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1749713107; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=OIFIbc2scGPWIlpVurAYWkEZOyPLXw9LExgLq86DRAo=; b=qjHdRBmRxnhUwh7+X0EdINyLt2jJwiW7NNeIP70Sc2UA4gYS3JXXUMip8oKSnw4d/7oWn8 XzH1kfo162/VJfQHeR7M2FC7EbUB7Ql5qR8OulMMz1GZo5NlsSedOV7SX5rFX9JtJdbhrE wW5HiNl+7pDlgA0PkKxb0saignEoxGw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1749713107; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=OIFIbc2scGPWIlpVurAYWkEZOyPLXw9LExgLq86DRAo=; b=CMMSupmeFjHp1XgbAgaYoRKEBgHLBhd2BU3lcTyt4IopnW5PW7m/Jvy4t4HPhOg+CicP/s Dks+nNZFqumN5CAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1749713107; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=OIFIbc2scGPWIlpVurAYWkEZOyPLXw9LExgLq86DRAo=; b=qjHdRBmRxnhUwh7+X0EdINyLt2jJwiW7NNeIP70Sc2UA4gYS3JXXUMip8oKSnw4d/7oWn8 XzH1kfo162/VJfQHeR7M2FC7EbUB7Ql5qR8OulMMz1GZo5NlsSedOV7SX5rFX9JtJdbhrE wW5HiNl+7pDlgA0PkKxb0saignEoxGw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1749713107; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=OIFIbc2scGPWIlpVurAYWkEZOyPLXw9LExgLq86DRAo=; b=CMMSupmeFjHp1XgbAgaYoRKEBgHLBhd2BU3lcTyt4IopnW5PW7m/Jvy4t4HPhOg+CicP/s Dks+nNZFqumN5CAA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id A8C78139E2; Thu, 12 Jun 2025 07:25:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 8gIMKNKASmgYGgAAD6G6ig (envelope-from ); Thu, 12 Jun 2025 07:25:06 +0000 Message-ID: <370634b8-b872-4bdb-8514-4f011a4a1a46@suse.de> Date: Thu, 12 Jun 2025 09:25:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 3/4] fbdev/deferred-io: Support contiguous kernel memory framebuffers To: Michael Kelley , Simona Vetter Cc: David Hildenbrand , "simona@ffwll.ch" , "deller@gmx.de" , "haiyangz@microsoft.com" , "kys@microsoft.com" , "wei.liu@kernel.org" , "decui@microsoft.com" , "akpm@linux-foundation.org" , "weh@microsoft.com" , "hch@lst.de" , "dri-devel@lists.freedesktop.org" , "linux-fbdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "linux-mm@kvack.org" References: <20250523161522.409504-1-mhklinux@outlook.com> <20250523161522.409504-4-mhklinux@outlook.com> <9a93813c-4d7c-45ef-b5a2-0ad37e7a078a@suse.de> <154aa365-0e27-458c-b801-62fd1cbfa169@suse.de> Content-Language: en-US From: Thomas Zimmermann Autocrypt: addr=tzimmermann@suse.de; keydata= xsBNBFs50uABCADEHPidWt974CaxBVbrIBwqcq/WURinJ3+2WlIrKWspiP83vfZKaXhFYsdg XH47fDVbPPj+d6tQrw5lPQCyqjwrCPYnq3WlIBnGPJ4/jreTL6V+qfKRDlGLWFjZcsrPJGE0 BeB5BbqP5erN1qylK9i3gPoQjXGhpBpQYwRrEyQyjuvk+Ev0K1Jc5tVDeJAuau3TGNgah4Yc hdHm3bkPjz9EErV85RwvImQ1dptvx6s7xzwXTgGAsaYZsL8WCwDaTuqFa1d1jjlaxg6+tZsB 9GluwvIhSezPgnEmimZDkGnZRRSFiGP8yjqTjjWuf0bSj5rUnTGiyLyRZRNGcXmu6hjlABEB AAHNJ1Rob21hcyBaaW1tZXJtYW5uIDx0emltbWVybWFubkBzdXNlLmRlPsLAjgQTAQgAOAIb AwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgBYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJftODH AAoJEGgNwR1TC3ojx1wH/0hKGWugiqDgLNXLRD/4TfHBEKmxIrmfu9Z5t7vwUKfwhFL6hqvo lXPJJKQpQ2z8+X2vZm/slsLn7J1yjrOsoJhKABDi+3QWWSGkaGwRJAdPVVyJMfJRNNNIKwVb U6B1BkX2XDKDGffF4TxlOpSQzdtNI/9gleOoUA8+jy8knnDYzjBNOZqLG2FuTdicBXblz0Mf vg41gd9kCwYXDnD91rJU8tzylXv03E75NCaTxTM+FBXPmsAVYQ4GYhhgFt8S2UWMoaaABLDe 7l5FdnLdDEcbmd8uLU2CaG4W2cLrUaI4jz2XbkcPQkqTQ3EB67hYkjiEE6Zy3ggOitiQGcqp j//OwE0EWznS4AEIAMYmP4M/V+T5RY5at/g7rUdNsLhWv1APYrh9RQefODYHrNRHUE9eosYb T6XMryR9hT8XlGOYRwKWwiQBoWSDiTMo/Xi29jUnn4BXfI2px2DTXwc22LKtLAgTRjP+qbU6 3Y0xnQN29UGDbYgyyK51DW3H0If2a3JNsheAAK+Xc9baj0LGIc8T9uiEWHBnCH+RdhgATnWW GKdDegUR5BkDfDg5O/FISymJBHx2Dyoklv5g4BzkgqTqwmaYzsl8UxZKvbaxq0zbehDda8lv hFXodNFMAgTLJlLuDYOGLK2AwbrS3Sp0AEbkpdJBb44qVlGm5bApZouHeJ/+n+7r12+lqdsA EQEAAcLAdgQYAQgAIAIbDBYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJftOH6AAoJEGgNwR1T C3ojVSkIALpAPkIJPQoURPb1VWjh34l0HlglmYHvZszJWTXYwavHR8+k6Baa6H7ufXNQtThR yIxJrQLW6rV5lm7TjhffEhxVCn37+cg0zZ3j7zIsSS0rx/aMwi6VhFJA5hfn3T0TtrijKP4A SAQO9xD1Zk9/61JWk8OysuIh7MXkl0fxbRKWE93XeQBhIJHQfnc+YBLprdnxR446Sh8Wn/2D Ya8cavuWf2zrB6cZurs048xe0UbSW5AOSo4V9M0jzYI4nZqTmPxYyXbm30Kvmz0rYVRaitYJ 4kyYYMhuULvrJDMjZRvaNe52tkKAvMevcGdt38H4KSVXAylqyQOW5zvPc4/sq9c= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: B933820008 X-Stat-Signature: 19c7agb3uemh886qu5gpf9dwitcjzoak X-Rspam-User: X-HE-Tag: 1749713108-558510 X-HE-Meta: U2FsdGVkX19r7rHvBqumPe3HibwLh6UbEtjR/x5ASaryjULq/eIoipPdPkdbvw8Rv8PsWy5g0oJb8/fQzTCHQ133KH6FMNjcaabuocELAC+9EZcdC+cPuAciNkDyhE8NH1DN/SJNtSFLE7EKLe8gORRRvQcL1YRwTUeZbXr1p36YJ8A3rvP8hNG1M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WQZEE2gIH35M3nyO9Amu5OT9xw/kPcCwCQjGTUpp7hCkEPb9m5INCBabRoIg9SjvTDhCRQogmCfxLA+QP8J8sEI5PiUkRCUhl6vkuv8L9bXlxFm2xcuA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi Am 12.06.25 um 01:18 schrieb Michael Kelley: > From: Michael Kelley Sent: Thursday, June 5, 2025 10:39 AM >> From: Thomas Zimmermann Sent: Thursday, June 5, 2025 >> 8:36 AM >>> Hi >>> >>> Am 04.06.25 um 23:43 schrieb Michael Kelley: >>> [...] >>>> Nonetheless, there's an underlying issue. A main cause of the difference >>>> is the number of messages to Hyper-V to update dirty regions. With >>>> hyperv_fb using deferred I/O, the messages are limited 20/second, so >>>> the total number of messages to Hyper-V is about 480. But hyperv_drm >>>> appears to send 3 messages to Hyper-V for each line of output, or a total of >>>> about 3,000,000 messages (~90K/second). That's a lot of additional load >>>> on the Hyper-V host, and it adds the 10 seconds of additional elapsed >>>> time seen in the guest. There also this ugly output in dmesg because the >>>> ring buffer for sending messages to the Hyper-V host gets full -- Hyper-V >>>> doesn't always keep up, at least not on my local laptop where I'm >>>> testing: >>>> >>>> [12574.327615] hyperv_drm 5620e0c7-8062-4dce-aeb7-520c7ef76171: [drm] >>> *ERROR* Unable to send packet via vmbus; error -11 >>>> [12574.327684] hyperv_drm 5620e0c7-8062-4dce-aeb7-520c7ef76171: [drm] >>> *ERROR* Unable to send packet via vmbus; error -11 >>>> [12574.327760] hyperv_drm 5620e0c7-8062-4dce-aeb7-520c7ef76171: [drm] >>> *ERROR* Unable to send packet via vmbus; error -11 >>>> [12574.327841] hyperv_drm 5620e0c7-8062-4dce-aeb7-520c7ef76171: [drm] >>> *ERROR* Unable to send packet via vmbus; error -11 >>>> [12597.016128] hyperv_sendpacket: 6211 callbacks suppressed >>>> [12597.016133] hyperv_drm 5620e0c7-8062-4dce-aeb7-520c7ef76171: [drm] >>> *ERROR* Unable to send packet via vmbus; error -11 >>>> [12597.016172] hyperv_drm 5620e0c7-8062-4dce-aeb7-520c7ef76171: [drm] >>> *ERROR* Unable to send packet via vmbus; error -11 >>>> [12597.016220] hyperv_drm 5620e0c7-8062-4dce-aeb7-520c7ef76171: [drm] >>> *ERROR* Unable to send packet via vmbus; error -11 >>>> [12597.016267] hyperv_drm 5620e0c7-8062-4dce-aeb7-520c7ef76171: [drm] >>> *ERROR* Unable to send packet via vmbus; error -11 >>>> hyperv_drm could be fixed to not output the ugly messages, but there's >>>> still the underlying issue of overrunning the ring buffer, and excessively >>>> hammering on the host. If we could get hyperv_drm doing deferred I/O, I >>>> would feel much better about going full-on with deprecating hyperv_fb. >>> I try to address the problem with the patches at >>> >>> https://lore.kernel.org/dri-devel/20250605152637.98493-1- >> tzimmermann@suse.de/ >>> Testing and feedback is much appreciated. >>> >> Nice! >> >> I ran the same test case with your patches, and everything works well. The >> hyperv_drm numbers are now pretty much the same as the hyperv_fb >> numbers for both elapsed time and system CPU time -- within a few percent. >> For hyperv_drm, there's no longer a gap in the elapsed time and system >> CPU time. No errors due to the guest-to-host ring buffer being full. Total >> messages to Hyper-V for hyperv_drm are now a few hundred instead of 3M. >> The hyperv_drm message count is still a little higher than for hyperv_fb, >> presumably because the simulated vblank rate in hyperv_drm is higher than >> the 20 Hz rate used by hyperv_fb deferred I/O. But the overall numbers are >> small enough that the difference is in the noise. Question: what is the default >> value for the simulated vblank rate? Just curious ... >> > FYI, I'm seeing this message occasionally when running with your simulated > vblank code and hyperv_drm: > > [90920.128278] hyperv_drm 5620e0c7-8062-4dce-aeb7-520c7ef76171: [drm] vblank timer overrun > > "Occasionally" is about a dozen occurrences over the last day or so. I can't > yet correlate to any particular activity in the VM. The graphics console has > not been very busy. Thanks for the report. It can happen that the vblank timer is handled late. It's not strictly an error as the whole thing is best-effort anyway. Maybe the timeout could be adjusted. Best regards Thomas > > Michael > -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)