linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Kelley <mikelley@microsoft.com>
To: Sunil Muthuswamy <sunilmut@microsoft.com>,
	Matheus Castello <matheus@castello.eng.br>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Wei Liu <liuwe@microsoft.com>,
	Tianyu Lan <Tianyu.Lan@microsoft.com>,
	Wei Liu <wei.liu@kernel.org>, vkuznets <vkuznets@redhat.com>
Cc: KY Srinivasan <kys@microsoft.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v3] x86/Hyper-V: Support for free page reporting
Date: Fri, 5 Feb 2021 14:56:36 +0000	[thread overview]
Message-ID: <MWHPR21MB15937CBA4514849A40D53FAED7B29@MWHPR21MB1593.namprd21.prod.outlook.com> (raw)
In-Reply-To: <MWHPR21MB159313CE5C5ACEC4F94D8090D7B39@MWHPR21MB1593.namprd21.prod.outlook.com>

From: Michael Kelley <mikelley@microsoft.com> Sent: Thursday, February 4, 2021 3:36 PM
> 
> From: Sunil Muthuswamy <sunilmut@microsoft.com> Sent: Wednesday, January 6, 2021
> 3:21 PM
> >
> > Linux has support for free page reporting now (36e66c554b5c) for
> > virtualized environment. On Hyper-V when virtually backed VMs are
> > configured, Hyper-V will advertise cold memory discard capability,
> > when supported. This patch adds the support to hook into the free
> > page reporting infrastructure and leverage the Hyper-V cold memory
> > discard hint hypercall to report/free these pages back to the host.
> >
> > Signed-off-by: Sunil Muthuswamy <sunilmut@microsoft.com>
> > Tested-by: Matheus Castello <matheus@castello.eng.br>
> > ---
> > In V2:
> > - Addressed feedback comments
> > - Added page reporting config option tied to hyper-v balloon config
> >
> > In V3:
> > - Addressed feedback from Vitaly
> > ---
> >  arch/x86/hyperv/hv_init.c         | 31 +++++++++++
> >  arch/x86/kernel/cpu/mshyperv.c    |  6 +-
> >  drivers/hv/Kconfig                |  1 +
> >  drivers/hv/hv_balloon.c           | 93 +++++++++++++++++++++++++++++++
> >  include/asm-generic/hyperv-tlfs.h | 32 ++++++++++-
> >  include/asm-generic/mshyperv.h    |  2 +
> >  6 files changed, 162 insertions(+), 3 deletions(-)
> >

[snip]

> > +
> > +	BUILD_BUG_ON(PAGE_REPORTING_CAPACITY > HV_MEMORY_HINT_MAX_GPA_PAGE_RANGES);
> > +	dm_device.pr_dev_info.report = hv_free_page_report;
> > +	ret = page_reporting_register(&dm_device.pr_dev_info);
> > +	if (ret < 0) {
> > +		dm_device.pr_dev_info.report = NULL;
> > +		pr_err("Failed to enable cold memory discard: %d\n", ret);
> > +	} else {
> > +		pr_info("Cold memory discard hint enabled\n");
> > +	}
> 
> Should the above two messages be prefixed with "Hyper-V: "?

Ignore the above comment.  The lines will get prefixed with
"hv_balloon:", which is fine.

Michael

  reply	other threads:[~2021-02-05 22:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06 23:20 [PATCH v3] x86/Hyper-V: Support for free page reporting Sunil Muthuswamy
2021-01-26 17:11 ` Wei Liu
2021-02-04 23:35 ` Michael Kelley
2021-02-05 14:56   ` Michael Kelley [this message]
2021-03-17 20:30   ` Sunil Muthuswamy

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=MWHPR21MB15937CBA4514849A40D53FAED7B29@MWHPR21MB1593.namprd21.prod.outlook.com \
    --to=mikelley@microsoft.com \
    --cc=Tianyu.Lan@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuwe@microsoft.com \
    --cc=matheus@castello.eng.br \
    --cc=sthemmin@microsoft.com \
    --cc=sunilmut@microsoft.com \
    --cc=vkuznets@redhat.com \
    --cc=wei.liu@kernel.org \
    /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).