linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Dexuan Cui <decui@microsoft.com>
Cc: Michael Kelley <mikelley@microsoft.com>,
	Wei Hu <weh@microsoft.com>, KY Srinivasan <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	"sashal@kernel.org" <sashal@kernel.org>,
	"hch@lst.de" <hch@lst.de>,
	"m.szyprowski@samsung.com" <m.szyprowski@samsung.com>,
	"mchehab+samsung@kernel.org" <mchehab+samsung@kernel.org>,
	"sam@ravnborg.org" <sam@ravnborg.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>,
	"info@metux.net" <info@metux.net>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	kbuild test robot <lkp@intel.com>
Subject: Re: [PATCH v4] video: hyperv: hyperv_fb: Use physical memory for fb on HyperV Gen 1 VMs.
Date: Wed, 15 Jan 2020 16:16:44 +0100	[thread overview]
Message-ID: <5a58696d-7f23-a577-c25e-ebe748b1aef0@samsung.com> (raw)
In-Reply-To: <HK0P153MB0148F18913BEA45144AF8443BF3C0@HK0P153MB0148.APCP153.PROD.OUTLOOK.COM>


On 1/6/20 11:37 PM, Dexuan Cui wrote:
>> From: Michael Kelley <mikelley@microsoft.com>
>> Sent: Monday, December 9, 2019 8:33 AM
>> To: Wei Hu <weh@microsoft.com>; b.zolnierkie@samsung.com; KY
>> Srinivasan <kys@microsoft.com>; Haiyang Zhang <haiyangz@microsoft.com>;
>> Stephen Hemminger <sthemmin@microsoft.com>; sashal@kernel.org;
>> hch@lst.de; m.szyprowski@samsung.com; mchehab+samsung@kernel.org;
>> sam@ravnborg.org; gregkh@linuxfoundation.org;
>> alexandre.belloni@bootlin.com; info@metux.net; arnd@arndb.de;
>> dri-devel@lists.freedesktop.org; linux-fbdev@vger.kernel.org;
>> linux-kernel@vger.kernel.org; linux-hyperv@vger.kernel.org; Dexuan Cui
>> <decui@microsoft.com>
>> Cc: kbuild test robot <lkp@intel.com>
>> Subject: RE: [PATCH v4] video: hyperv: hyperv_fb: Use physical memory for
>> fb on HyperV Gen 1 VMs.
>>
>> From: Wei Hu <weh@microsoft.com> Sent: Sunday, December 8, 2019 11:58
>> PM
>>>
>>> On Hyper-V, Generation 1 VMs can directly use VM's physical memory for
>>> their framebuffers. This can improve the efficiency of framebuffer and
>>> overall performance for VM. The physical memory assigned to framebuffer
>>> must be contiguous. We use CMA allocator to get contiguous physicial
>>> memory when the framebuffer size is greater than 4MB. For size under
>>> 4MB, we use alloc_pages to achieve this.
>>>
>>> To enable framebuffer memory allocation from CMA, supply a kernel
>>> parameter to give enough space to CMA allocator at boot time. For
>>> example:
>>>     cma=130m
>>> This gives 130MB memory to CAM allocator that can be allocated to
>>> framebuffer. If this fails, we fall back to the old way of using
>>> mmio for framebuffer.
>>>
>>> Reported-by: kbuild test robot <lkp@intel.com>
>>> Signed-off-by: Wei Hu <weh@microsoft.com>
>>> ---
>>>     v2: Incorporated review comments form hch@lst.de, Michael Kelley
>> and
>>>     Dexuan Cui
>>>     - Use dma_alloc_coherent to allocate large contiguous memory
>>>     - Use phys_addr_t for physical addresses
>>>     - Corrected a few spelling errors and minor cleanups
>>>     - Also tested on 32 bit Ubuntu guest
>>>     v3: Fixed a build issue reported by kbuild test robot and incorported
>>>     some review comments from Michael Kelley
>>>     - Add CMA check to avoid link failure
>>>     - Fixed small memory leak introduced by alloc_apertures
>>>     - Cleaned up so code
>>>     v4: Removed request_pages variable as it is no longer needed
>>>
>>>  drivers/video/fbdev/Kconfig     |   1 +
>>>  drivers/video/fbdev/hyperv_fb.c | 182
>> +++++++++++++++++++++++++-------
>>>  2 files changed, 144 insertions(+), 39 deletions(-)
>>>
>>
>> Reviewed-by: Michael Kelley <mikelley@microsoft.com>
> 
> Tested-by: Dexuan Cui <decui@microsoft.com>
> 
> For a Gen-1 VM running on recent Hyper-V hosts, this patch can greatly 
> reduce the CPU utilization because it avoids the slow data copy from the 
> shadow framebuffer to the MMIO framebuffer, and hence it resolves the
> "blurred screen" issue when we output a lot of characters on the text-mode
> ternimal (e.g. "dmesg").

Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

      reply	other threads:[~2020-01-15 15:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-09  7:57 [PATCH v4] video: hyperv: hyperv_fb: Use physical memory for fb on HyperV Gen 1 VMs Wei Hu
2019-12-09 16:32 ` Michael Kelley
2020-01-06 22:37   ` Dexuan Cui
2020-01-15 15:16     ` Bartlomiej Zolnierkiewicz [this message]

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=5a58696d-7f23-a577-c25e-ebe748b1aef0@samsung.com \
    --to=b.zolnierkie@samsung.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=arnd@arndb.de \
    --cc=decui@microsoft.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=haiyangz@microsoft.com \
    --cc=hch@lst.de \
    --cc=info@metux.net \
    --cc=kys@microsoft.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=m.szyprowski@samsung.com \
    --cc=mchehab+samsung@kernel.org \
    --cc=mikelley@microsoft.com \
    --cc=sam@ravnborg.org \
    --cc=sashal@kernel.org \
    --cc=sthemmin@microsoft.com \
    --cc=weh@microsoft.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).