All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] virtio-balloon: fix internal stat name array to match Linux kernel
@ 2018-05-04 16:30 ` Jonathan Helman
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Helman @ 2018-05-04 16:30 UTC (permalink / raw)
  To: mst
  Cc: jasowang, virtio-dev, qemu-devel, Jonathan Helman, Rob Gardner,
	Thomas Tai

The Linux kernel commit b40000325044 ("virtio_balloon: add array
of stat names") defines an array of stat name strings for consumers
of the virtio interface to use via the virtio_balloon.h header
file, rather than requiring each consumer to define its own. But at
present, the stat names defined in this array by the Linux kernel
do not match up with those defined internally by QEMU. This patch
fixes this inconsistency by changing the QEMU stat names to match
those defined by the Linux kernel.

Signed-off-by: Jonathan Helman <jonathan.helman@oracle.com>
Cc: Rob Gardner <rob.gardner@oracle.com>
Cc: Thomas Tai <thomas.tai@oracle.com>
---
 docs/virtio-balloon-stats.txt | 4 ++--
 hw/virtio/virtio-balloon.c    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/docs/virtio-balloon-stats.txt b/docs/virtio-balloon-stats.txt
index 9985e1d..7c69fdb 100644
--- a/docs/virtio-balloon-stats.txt
+++ b/docs/virtio-balloon-stats.txt
@@ -34,8 +34,8 @@ which will return a dictionary containing:
       - stat-total-memory
       - stat-available-memory
       - stat-disk-caches
-      - stat-htlb-pgalloc
-      - stat-htlb-pgfail
+      - stat-hugetlb-allocations
+      - stat-hugetlb-failures
 
   o A key named last-update, which contains the last stats update
     timestamp in seconds. Since this timestamp is generated by the host,
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index 1f7a87f..8421d9f 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -52,8 +52,8 @@ static const char *balloon_stat_names[] = {
    [VIRTIO_BALLOON_S_MEMTOT] = "stat-total-memory",
    [VIRTIO_BALLOON_S_AVAIL] = "stat-available-memory",
    [VIRTIO_BALLOON_S_CACHES] = "stat-disk-caches",
-   [VIRTIO_BALLOON_S_HTLB_PGALLOC] = "stat-htlb-pgalloc",
-   [VIRTIO_BALLOON_S_HTLB_PGFAIL] = "stat-htlb-pgfail",
+   [VIRTIO_BALLOON_S_HTLB_PGALLOC] = "stat-hugetlb-allocations",
+   [VIRTIO_BALLOON_S_HTLB_PGFAIL] = "stat-hugetlb-failures",
    [VIRTIO_BALLOON_S_NR] = NULL
 };
 
-- 
1.8.3.1

Based-on: <1524799751-151698-5-git-send-email-mst@redhat.com>
([PULL 4/4] virtio-balloon: add hugetlb page allocation counts)

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [virtio-dev] [PATCH] virtio-balloon: fix internal stat name array to match Linux kernel
@ 2018-05-04 16:30 ` Jonathan Helman
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Helman @ 2018-05-04 16:30 UTC (permalink / raw)
  To: mst
  Cc: jasowang, virtio-dev, qemu-devel, Jonathan Helman, Rob Gardner,
	Thomas Tai

The Linux kernel commit b40000325044 ("virtio_balloon: add array
of stat names") defines an array of stat name strings for consumers
of the virtio interface to use via the virtio_balloon.h header
file, rather than requiring each consumer to define its own. But at
present, the stat names defined in this array by the Linux kernel
do not match up with those defined internally by QEMU. This patch
fixes this inconsistency by changing the QEMU stat names to match
those defined by the Linux kernel.

Signed-off-by: Jonathan Helman <jonathan.helman@oracle.com>
Cc: Rob Gardner <rob.gardner@oracle.com>
Cc: Thomas Tai <thomas.tai@oracle.com>
---
 docs/virtio-balloon-stats.txt | 4 ++--
 hw/virtio/virtio-balloon.c    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/docs/virtio-balloon-stats.txt b/docs/virtio-balloon-stats.txt
index 9985e1d..7c69fdb 100644
--- a/docs/virtio-balloon-stats.txt
+++ b/docs/virtio-balloon-stats.txt
@@ -34,8 +34,8 @@ which will return a dictionary containing:
       - stat-total-memory
       - stat-available-memory
       - stat-disk-caches
-      - stat-htlb-pgalloc
-      - stat-htlb-pgfail
+      - stat-hugetlb-allocations
+      - stat-hugetlb-failures
 
   o A key named last-update, which contains the last stats update
     timestamp in seconds. Since this timestamp is generated by the host,
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index 1f7a87f..8421d9f 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -52,8 +52,8 @@ static const char *balloon_stat_names[] = {
    [VIRTIO_BALLOON_S_MEMTOT] = "stat-total-memory",
    [VIRTIO_BALLOON_S_AVAIL] = "stat-available-memory",
    [VIRTIO_BALLOON_S_CACHES] = "stat-disk-caches",
-   [VIRTIO_BALLOON_S_HTLB_PGALLOC] = "stat-htlb-pgalloc",
-   [VIRTIO_BALLOON_S_HTLB_PGFAIL] = "stat-htlb-pgfail",
+   [VIRTIO_BALLOON_S_HTLB_PGALLOC] = "stat-hugetlb-allocations",
+   [VIRTIO_BALLOON_S_HTLB_PGFAIL] = "stat-hugetlb-failures",
    [VIRTIO_BALLOON_S_NR] = NULL
 };
 
-- 
1.8.3.1

Based-on: <1524799751-151698-5-git-send-email-mst@redhat.com>
([PULL 4/4] virtio-balloon: add hugetlb page allocation counts)

---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] virtio-balloon: fix internal stat name array to match Linux kernel
  2018-05-04 16:30 ` [virtio-dev] " Jonathan Helman
@ 2018-05-04 20:07   ` Michael S. Tsirkin
  -1 siblings, 0 replies; 5+ messages in thread
From: Michael S. Tsirkin @ 2018-05-04 20:07 UTC (permalink / raw)
  To: Jonathan Helman; +Cc: jasowang, virtio-dev, qemu-devel, Rob Gardner, Thomas Tai

On Fri, May 04, 2018 at 09:30:45AM -0700, Jonathan Helman wrote:
> The Linux kernel commit b40000325044 ("virtio_balloon: add array
> of stat names") defines an array of stat name strings for consumers
> of the virtio interface to use via the virtio_balloon.h header
> file, rather than requiring each consumer to define its own. But at
> present, the stat names defined in this array by the Linux kernel
> do not match up with those defined internally by QEMU. This patch
> fixes this inconsistency by changing the QEMU stat names to match
> those defined by the Linux kernel.
> 
> Signed-off-by: Jonathan Helman <jonathan.helman@oracle.com>
> Cc: Rob Gardner <rob.gardner@oracle.com>
> Cc: Thomas Tai <thomas.tai@oracle.com>

So pls import the header from Linux so we can stop maintaining it
in QEMU.

> ---
>  docs/virtio-balloon-stats.txt | 4 ++--
>  hw/virtio/virtio-balloon.c    | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/docs/virtio-balloon-stats.txt b/docs/virtio-balloon-stats.txt
> index 9985e1d..7c69fdb 100644
> --- a/docs/virtio-balloon-stats.txt
> +++ b/docs/virtio-balloon-stats.txt
> @@ -34,8 +34,8 @@ which will return a dictionary containing:
>        - stat-total-memory
>        - stat-available-memory
>        - stat-disk-caches
> -      - stat-htlb-pgalloc
> -      - stat-htlb-pgfail
> +      - stat-hugetlb-allocations
> +      - stat-hugetlb-failures
>  
>    o A key named last-update, which contains the last stats update
>      timestamp in seconds. Since this timestamp is generated by the host,
> diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
> index 1f7a87f..8421d9f 100644
> --- a/hw/virtio/virtio-balloon.c
> +++ b/hw/virtio/virtio-balloon.c
> @@ -52,8 +52,8 @@ static const char *balloon_stat_names[] = {
>     [VIRTIO_BALLOON_S_MEMTOT] = "stat-total-memory",
>     [VIRTIO_BALLOON_S_AVAIL] = "stat-available-memory",
>     [VIRTIO_BALLOON_S_CACHES] = "stat-disk-caches",
> -   [VIRTIO_BALLOON_S_HTLB_PGALLOC] = "stat-htlb-pgalloc",
> -   [VIRTIO_BALLOON_S_HTLB_PGFAIL] = "stat-htlb-pgfail",
> +   [VIRTIO_BALLOON_S_HTLB_PGALLOC] = "stat-hugetlb-allocations",
> +   [VIRTIO_BALLOON_S_HTLB_PGFAIL] = "stat-hugetlb-failures",
>     [VIRTIO_BALLOON_S_NR] = NULL
>  };
>  
> -- 
> 1.8.3.1
> 
> Based-on: <1524799751-151698-5-git-send-email-mst@redhat.com>
> ([PULL 4/4] virtio-balloon: add hugetlb page allocation counts)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [virtio-dev] Re: [PATCH] virtio-balloon: fix internal stat name array to match Linux kernel
@ 2018-05-04 20:07   ` Michael S. Tsirkin
  0 siblings, 0 replies; 5+ messages in thread
From: Michael S. Tsirkin @ 2018-05-04 20:07 UTC (permalink / raw)
  To: Jonathan Helman; +Cc: jasowang, virtio-dev, qemu-devel, Rob Gardner, Thomas Tai

On Fri, May 04, 2018 at 09:30:45AM -0700, Jonathan Helman wrote:
> The Linux kernel commit b40000325044 ("virtio_balloon: add array
> of stat names") defines an array of stat name strings for consumers
> of the virtio interface to use via the virtio_balloon.h header
> file, rather than requiring each consumer to define its own. But at
> present, the stat names defined in this array by the Linux kernel
> do not match up with those defined internally by QEMU. This patch
> fixes this inconsistency by changing the QEMU stat names to match
> those defined by the Linux kernel.
> 
> Signed-off-by: Jonathan Helman <jonathan.helman@oracle.com>
> Cc: Rob Gardner <rob.gardner@oracle.com>
> Cc: Thomas Tai <thomas.tai@oracle.com>

So pls import the header from Linux so we can stop maintaining it
in QEMU.

> ---
>  docs/virtio-balloon-stats.txt | 4 ++--
>  hw/virtio/virtio-balloon.c    | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/docs/virtio-balloon-stats.txt b/docs/virtio-balloon-stats.txt
> index 9985e1d..7c69fdb 100644
> --- a/docs/virtio-balloon-stats.txt
> +++ b/docs/virtio-balloon-stats.txt
> @@ -34,8 +34,8 @@ which will return a dictionary containing:
>        - stat-total-memory
>        - stat-available-memory
>        - stat-disk-caches
> -      - stat-htlb-pgalloc
> -      - stat-htlb-pgfail
> +      - stat-hugetlb-allocations
> +      - stat-hugetlb-failures
>  
>    o A key named last-update, which contains the last stats update
>      timestamp in seconds. Since this timestamp is generated by the host,
> diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
> index 1f7a87f..8421d9f 100644
> --- a/hw/virtio/virtio-balloon.c
> +++ b/hw/virtio/virtio-balloon.c
> @@ -52,8 +52,8 @@ static const char *balloon_stat_names[] = {
>     [VIRTIO_BALLOON_S_MEMTOT] = "stat-total-memory",
>     [VIRTIO_BALLOON_S_AVAIL] = "stat-available-memory",
>     [VIRTIO_BALLOON_S_CACHES] = "stat-disk-caches",
> -   [VIRTIO_BALLOON_S_HTLB_PGALLOC] = "stat-htlb-pgalloc",
> -   [VIRTIO_BALLOON_S_HTLB_PGFAIL] = "stat-htlb-pgfail",
> +   [VIRTIO_BALLOON_S_HTLB_PGALLOC] = "stat-hugetlb-allocations",
> +   [VIRTIO_BALLOON_S_HTLB_PGFAIL] = "stat-hugetlb-failures",
>     [VIRTIO_BALLOON_S_NR] = NULL
>  };
>  
> -- 
> 1.8.3.1
> 
> Based-on: <1524799751-151698-5-git-send-email-mst@redhat.com>
> ([PULL 4/4] virtio-balloon: add hugetlb page allocation counts)

---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] virtio-balloon: fix internal stat name array to match Linux kernel
  2018-05-04 20:07   ` [virtio-dev] " Michael S. Tsirkin
  (?)
@ 2018-05-07 18:42   ` Thomas Tai
  -1 siblings, 0 replies; 5+ messages in thread
From: Thomas Tai @ 2018-05-07 18:42 UTC (permalink / raw)
  To: Michael S. Tsirkin, Jonathan Helman
  Cc: jasowang, virtio-dev, qemu-devel, Rob Gardner



On 2018-05-04 04:07 PM, Michael S. Tsirkin wrote:
> On Fri, May 04, 2018 at 09:30:45AM -0700, Jonathan Helman wrote:
>> The Linux kernel commit b40000325044 ("virtio_balloon: add array
>> of stat names") defines an array of stat name strings for consumers
>> of the virtio interface to use via the virtio_balloon.h header
>> file, rather than requiring each consumer to define its own. But at
>> present, the stat names defined in this array by the Linux kernel
>> do not match up with those defined internally by QEMU. This patch
>> fixes this inconsistency by changing the QEMU stat names to match
>> those defined by the Linux kernel.
>>
>> Signed-off-by: Jonathan Helman <jonathan.helman@oracle.com>
>> Cc: Rob Gardner <rob.gardner@oracle.com>
>> Cc: Thomas Tai <thomas.tai@oracle.com>
> 
> So pls import the header from Linux so we can stop maintaining it
> in QEMU.

Hi Michael,
Thank you for your comment. Because Jonathan left the company last week, 
I hope to pick up what he left over. As far as the importing the header 
file, please let me look into it and get back to you.

Thank you,
Thomas


> 
>> ---
>>   docs/virtio-balloon-stats.txt | 4 ++--
>>   hw/virtio/virtio-balloon.c    | 4 ++--
>>   2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/docs/virtio-balloon-stats.txt b/docs/virtio-balloon-stats.txt
>> index 9985e1d..7c69fdb 100644
>> --- a/docs/virtio-balloon-stats.txt
>> +++ b/docs/virtio-balloon-stats.txt
>> @@ -34,8 +34,8 @@ which will return a dictionary containing:
>>         - stat-total-memory
>>         - stat-available-memory
>>         - stat-disk-caches
>> -      - stat-htlb-pgalloc
>> -      - stat-htlb-pgfail
>> +      - stat-hugetlb-allocations
>> +      - stat-hugetlb-failures
>>   
>>     o A key named last-update, which contains the last stats update
>>       timestamp in seconds. Since this timestamp is generated by the host,
>> diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
>> index 1f7a87f..8421d9f 100644
>> --- a/hw/virtio/virtio-balloon.c
>> +++ b/hw/virtio/virtio-balloon.c
>> @@ -52,8 +52,8 @@ static const char *balloon_stat_names[] = {
>>      [VIRTIO_BALLOON_S_MEMTOT] = "stat-total-memory",
>>      [VIRTIO_BALLOON_S_AVAIL] = "stat-available-memory",
>>      [VIRTIO_BALLOON_S_CACHES] = "stat-disk-caches",
>> -   [VIRTIO_BALLOON_S_HTLB_PGALLOC] = "stat-htlb-pgalloc",
>> -   [VIRTIO_BALLOON_S_HTLB_PGFAIL] = "stat-htlb-pgfail",
>> +   [VIRTIO_BALLOON_S_HTLB_PGALLOC] = "stat-hugetlb-allocations",
>> +   [VIRTIO_BALLOON_S_HTLB_PGFAIL] = "stat-hugetlb-failures",
>>      [VIRTIO_BALLOON_S_NR] = NULL
>>   };
>>   
>> -- 
>> 1.8.3.1
>>
>> Based-on: <1524799751-151698-5-git-send-email-mst@redhat.com>
>> ([PULL 4/4] virtio-balloon: add hugetlb page allocation counts)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-05-07 18:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-04 16:30 [Qemu-devel] [PATCH] virtio-balloon: fix internal stat name array to match Linux kernel Jonathan Helman
2018-05-04 16:30 ` [virtio-dev] " Jonathan Helman
2018-05-04 20:07 ` [Qemu-devel] " Michael S. Tsirkin
2018-05-04 20:07   ` [virtio-dev] " Michael S. Tsirkin
2018-05-07 18:42   ` [Qemu-devel] " Thomas Tai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.