lkml.org 
[lkml]   [2022]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 1/1] Create debugfs file with virtio balloon usage information
From
Hello,

On 28/06/2022 15:55, Vasily Averin wrote:
> On 6/28/22 12:23, Alexander Atanasov wrote:
>> +static int virtio_balloon_debug_show(struct seq_file *f, void *offset)
>> +{
>> + struct virtio_balloon *b = f->private;
>> + u32 num_pages;
>> + struct sysinfo i;
>> +
>> + si_meminfo(&i);
>> +
>> + seq_printf(f, "%-22s: %d\n", "page_size", 4096);
> This output of the constant looks strange for me.
> Could you please explain why this is required?

Ballon driver always works in 4K page units. The values in the file are in the driver units.
Guests need it to be able to perform calculations of actual values.
In the case of virtio_balloon it is always 4K but other balloon drivers can have different page_sizes.


--
Regards,
Alexander Atanasov

\
 
 \ /
  Last update: 2022-06-28 15:05    [W:0.048 / U:1.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site