RE: [EXTERNAL] Re: [PATCH] x86/Hyper-V: Support for free page reporting

2020-05-22 Thread Michael Kelley
From: Sunil Muthuswamy Sent: Friday, May 22, 2020 9:40 AM > > > > + if (hv_do_hypercall(HV_EXT_CALL_QUERY_CAPABILITIES, NULL, cap) == > > > + HV_STATUS_SUCCESS) > > > > You're using the input page as the output parameter. Ideally we should > > introduce hyperv_pcpu_output_arg page, but that

Re: [EXTERNAL] Re: [PATCH] x86/Hyper-V: Support for free page reporting

2020-05-22 Thread Alexander Duyck
On Fri, May 22, 2020 at 9:42 AM Sunil Muthuswamy wrote: > [...] > > > > > + order = get_order(sg->length); > > > + range = &hint->ranges[i]; > > > + range->address_space = 0; > > > > I guess this means all address spaces? > > 'address_space' is being used here just

RE: [EXTERNAL] Re: [PATCH] x86/Hyper-V: Support for free page reporting

2020-05-22 Thread Sunil Muthuswamy
> As the only usage of this function looks like > if (!(hv_query_ext_cap() & HV_EXT_CAPABILITY_MEMORY_COLD_DISCARD_HINT)) > > I would've change the interface to > > bool hv_query_ext_cap(u64 cap) > > so the usage would look like > > if (!(hv_query_ext_cap(HV_EXT_CAPABILITY_MEMORY_COLD_DISCARD_H

RE: [EXTERNAL] Re: [PATCH] x86/Hyper-V: Support for free page reporting

2020-05-22 Thread Sunil Muthuswamy
> > + if (hv_do_hypercall(HV_EXT_CALL_QUERY_CAPABILITIES, NULL, cap) == > > + HV_STATUS_SUCCESS) > > You're using the input page as the output parameter. Ideally we should > introduce hyperv_pcpu_output_arg page, but that would waste one page per > cpu just for this one call. > > So for n