Re: [PATCH 2/2] util: numa: Stub out hugepage code on non-Linux platforms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]