Re: [PATCH v3 1/1] Create debugfs file with virtio balloon usage information

From: Alexander Atanasov
Date: Tue Jun 28 2022 - 09:04:04 EST


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