lkml.org 
[lkml]   [2021]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v3] x86/Hyper-V: Support for free page reporting
Date
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

\
 
 \ /
  Last update: 2021-02-05 23:39    [W:0.096 / U:1.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site