[libvirt] [PATCH 2/2] util: numa: Stub out hugepage code on non-Linux platforms
Peter Krempa
pkrempa at redhat.com
Mon Jun 23 12:10:38 UTC 2014
On 06/23/14 13:49, Michal Privoznik wrote:
> On 23.06.2014 09:29, Peter Krempa wrote:
>> The hugepage sizing and counting code gathers the information from sysfs
>> and thus isn't portable. Stub it out for non-Linux so that we can report
>> a better error. This patch also avoids calling sysinfo() on Mingw where
>> it isn't supported.
>> ---
>> src/util/virnuma.c | 46 ++++++++++++++++++++++++++++++++++++++--------
>> 1 file changed, 38 insertions(+), 8 deletions(-)
>>
>> +int
>> +virNumaGetPages(int node ATTRIBUTE_UNUSED,
>> + unsigned int **pages_size ATTRIBUTE_UNUSED,
>> + unsigned int **pages_avail ATTRIBUTE_UNUSED,
>> + unsigned int **pages_free ATTRIBUTE_UNUSED,
>> + size_t *npages ATTRIBUTE_UNUSED)
>> +{
>> + virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
>> + _("system page size are not supported for this
>> platform"));
>> + return -1;
>> +}
>> +#endif /* #if WITH_LINUX */
>>
>
> These two APIs are intended to get info for all page sizes, not only the
> ordinary system ones.
>
> ACK with the error message changed to reflect that.
I'm going with "page info is not supported on this platform" and
VIR_ERR_OPERATION_UNSUPPORTED code.
>
> Michal
>
And pushing shortly.
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140623/f62d9494/attachment-0001.sig>
More information about the libvir-list
mailing list