From: Jonathan Helman <jonathan.helman@oracle.com>
To: Jason Wang <jasowang@redhat.com>
Cc: mst@redhat.com, virtualization@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, virtio-dev@lists.oasis-open.org
Subject: Re: [PATCH v2] virtio_balloon: export hugetlb page allocation counts
Date: Mon, 19 Mar 2018 21:26:41 -0700 [thread overview]
Message-ID: <6ED6CAC9-FAD9-4A27-A9B1-C6EFC7627D68@oracle.com> (raw)
In-Reply-To: <db6371af-f93d-4409-c910-2ff712196c5b@redhat.com>
> On Mar 19, 2018, at 7:31 PM, Jason Wang <jasowang@redhat.com> wrote:
>
>
>
> On 2018年03月20日 06:14, Jonathan Helman wrote:
>> Export the number of successful and failed hugetlb page
>> allocations via the virtio balloon driver. These 2 counts
>> come directly from the vm_events HTLB_BUDDY_PGALLOC and
>> HTLB_BUDDY_PGALLOC_FAIL.
>>
>> Signed-off-by: Jonathan Helman <jonathan.helman@oracle.com>
>
> Reviewed-by: Jason Wang <jasowang@redhat.com>
Thanks.
>
>> ---
>> drivers/virtio/virtio_balloon.c | 6 ++++++
>> include/uapi/linux/virtio_balloon.h | 4 +++-
>> 2 files changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
>> index dfe5684..6b237e3 100644
>> --- a/drivers/virtio/virtio_balloon.c
>> +++ b/drivers/virtio/virtio_balloon.c
>> @@ -272,6 +272,12 @@ static unsigned int update_balloon_stats(struct virtio_balloon *vb)
>> pages_to_bytes(events[PSWPOUT]));
>> update_stat(vb, idx++, VIRTIO_BALLOON_S_MAJFLT, events[PGMAJFAULT]);
>> update_stat(vb, idx++, VIRTIO_BALLOON_S_MINFLT, events[PGFAULT]);
>> +#ifdef CONFIG_HUGETLB_PAGE
>> + update_stat(vb, idx++, VIRTIO_BALLOON_S_HTLB_PGALLOC,
>> + events[HTLB_BUDDY_PGALLOC]);
>> + update_stat(vb, idx++, VIRTIO_BALLOON_S_HTLB_PGFAIL,
>> + events[HTLB_BUDDY_PGALLOC_FAIL]);
>> +#endif
>> #endif
>> update_stat(vb, idx++, VIRTIO_BALLOON_S_MEMFREE,
>> pages_to_bytes(i.freeram));
>> diff --git a/include/uapi/linux/virtio_balloon.h b/include/uapi/linux/virtio_balloon.h
>> index 4e8b830..40297a3 100644
>> --- a/include/uapi/linux/virtio_balloon.h
>> +++ b/include/uapi/linux/virtio_balloon.h
>> @@ -53,7 +53,9 @@ struct virtio_balloon_config {
>> #define VIRTIO_BALLOON_S_MEMTOT 5 /* Total amount of memory */
>> #define VIRTIO_BALLOON_S_AVAIL 6 /* Available memory as in /proc */
>> #define VIRTIO_BALLOON_S_CACHES 7 /* Disk caches */
>> -#define VIRTIO_BALLOON_S_NR 8
>> +#define VIRTIO_BALLOON_S_HTLB_PGALLOC 8 /* Hugetlb page allocations */
>> +#define VIRTIO_BALLOON_S_HTLB_PGFAIL 9 /* Hugetlb page allocation failures */
>> +#define VIRTIO_BALLOON_S_NR 10
>> /*
>> * Memory statistics structure.
>
> Not for this patch, but it looks to me that exporting such nr through uapi is fragile.
Sorry, can you explain what you mean here?
Jon
>
> Thanks
WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Helman <jonathan.helman@oracle.com>
To: Jason Wang <jasowang@redhat.com>
Cc: virtio-dev@lists.oasis-open.org,
virtualization@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, mst@redhat.com
Subject: Re: [PATCH v2] virtio_balloon: export hugetlb page allocation counts
Date: Mon, 19 Mar 2018 21:26:41 -0700 [thread overview]
Message-ID: <6ED6CAC9-FAD9-4A27-A9B1-C6EFC7627D68@oracle.com> (raw)
In-Reply-To: <db6371af-f93d-4409-c910-2ff712196c5b@redhat.com>
> On Mar 19, 2018, at 7:31 PM, Jason Wang <jasowang@redhat.com> wrote:
>
>
>
> On 2018年03月20日 06:14, Jonathan Helman wrote:
>> Export the number of successful and failed hugetlb page
>> allocations via the virtio balloon driver. These 2 counts
>> come directly from the vm_events HTLB_BUDDY_PGALLOC and
>> HTLB_BUDDY_PGALLOC_FAIL.
>>
>> Signed-off-by: Jonathan Helman <jonathan.helman@oracle.com>
>
> Reviewed-by: Jason Wang <jasowang@redhat.com>
Thanks.
>
>> ---
>> drivers/virtio/virtio_balloon.c | 6 ++++++
>> include/uapi/linux/virtio_balloon.h | 4 +++-
>> 2 files changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
>> index dfe5684..6b237e3 100644
>> --- a/drivers/virtio/virtio_balloon.c
>> +++ b/drivers/virtio/virtio_balloon.c
>> @@ -272,6 +272,12 @@ static unsigned int update_balloon_stats(struct virtio_balloon *vb)
>> pages_to_bytes(events[PSWPOUT]));
>> update_stat(vb, idx++, VIRTIO_BALLOON_S_MAJFLT, events[PGMAJFAULT]);
>> update_stat(vb, idx++, VIRTIO_BALLOON_S_MINFLT, events[PGFAULT]);
>> +#ifdef CONFIG_HUGETLB_PAGE
>> + update_stat(vb, idx++, VIRTIO_BALLOON_S_HTLB_PGALLOC,
>> + events[HTLB_BUDDY_PGALLOC]);
>> + update_stat(vb, idx++, VIRTIO_BALLOON_S_HTLB_PGFAIL,
>> + events[HTLB_BUDDY_PGALLOC_FAIL]);
>> +#endif
>> #endif
>> update_stat(vb, idx++, VIRTIO_BALLOON_S_MEMFREE,
>> pages_to_bytes(i.freeram));
>> diff --git a/include/uapi/linux/virtio_balloon.h b/include/uapi/linux/virtio_balloon.h
>> index 4e8b830..40297a3 100644
>> --- a/include/uapi/linux/virtio_balloon.h
>> +++ b/include/uapi/linux/virtio_balloon.h
>> @@ -53,7 +53,9 @@ struct virtio_balloon_config {
>> #define VIRTIO_BALLOON_S_MEMTOT 5 /* Total amount of memory */
>> #define VIRTIO_BALLOON_S_AVAIL 6 /* Available memory as in /proc */
>> #define VIRTIO_BALLOON_S_CACHES 7 /* Disk caches */
>> -#define VIRTIO_BALLOON_S_NR 8
>> +#define VIRTIO_BALLOON_S_HTLB_PGALLOC 8 /* Hugetlb page allocations */
>> +#define VIRTIO_BALLOON_S_HTLB_PGFAIL 9 /* Hugetlb page allocation failures */
>> +#define VIRTIO_BALLOON_S_NR 10
>> /*
>> * Memory statistics structure.
>
> Not for this patch, but it looks to me that exporting such nr through uapi is fragile.
Sorry, can you explain what you mean here?
Jon
>
> Thanks
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Helman <jonathan.helman@oracle.com>
To: Jason Wang <jasowang@redhat.com>
Cc: mst@redhat.com, virtualization@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, virtio-dev@lists.oasis-open.org
Subject: [virtio-dev] Re: [PATCH v2] virtio_balloon: export hugetlb page allocation counts
Date: Mon, 19 Mar 2018 21:26:41 -0700 [thread overview]
Message-ID: <6ED6CAC9-FAD9-4A27-A9B1-C6EFC7627D68@oracle.com> (raw)
In-Reply-To: <db6371af-f93d-4409-c910-2ff712196c5b@redhat.com>
> On Mar 19, 2018, at 7:31 PM, Jason Wang <jasowang@redhat.com> wrote:
>
>
>
> On 2018年03月20日 06:14, Jonathan Helman wrote:
>> Export the number of successful and failed hugetlb page
>> allocations via the virtio balloon driver. These 2 counts
>> come directly from the vm_events HTLB_BUDDY_PGALLOC and
>> HTLB_BUDDY_PGALLOC_FAIL.
>>
>> Signed-off-by: Jonathan Helman <jonathan.helman@oracle.com>
>
> Reviewed-by: Jason Wang <jasowang@redhat.com>
Thanks.
>
>> ---
>> drivers/virtio/virtio_balloon.c | 6 ++++++
>> include/uapi/linux/virtio_balloon.h | 4 +++-
>> 2 files changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
>> index dfe5684..6b237e3 100644
>> --- a/drivers/virtio/virtio_balloon.c
>> +++ b/drivers/virtio/virtio_balloon.c
>> @@ -272,6 +272,12 @@ static unsigned int update_balloon_stats(struct virtio_balloon *vb)
>> pages_to_bytes(events[PSWPOUT]));
>> update_stat(vb, idx++, VIRTIO_BALLOON_S_MAJFLT, events[PGMAJFAULT]);
>> update_stat(vb, idx++, VIRTIO_BALLOON_S_MINFLT, events[PGFAULT]);
>> +#ifdef CONFIG_HUGETLB_PAGE
>> + update_stat(vb, idx++, VIRTIO_BALLOON_S_HTLB_PGALLOC,
>> + events[HTLB_BUDDY_PGALLOC]);
>> + update_stat(vb, idx++, VIRTIO_BALLOON_S_HTLB_PGFAIL,
>> + events[HTLB_BUDDY_PGALLOC_FAIL]);
>> +#endif
>> #endif
>> update_stat(vb, idx++, VIRTIO_BALLOON_S_MEMFREE,
>> pages_to_bytes(i.freeram));
>> diff --git a/include/uapi/linux/virtio_balloon.h b/include/uapi/linux/virtio_balloon.h
>> index 4e8b830..40297a3 100644
>> --- a/include/uapi/linux/virtio_balloon.h
>> +++ b/include/uapi/linux/virtio_balloon.h
>> @@ -53,7 +53,9 @@ struct virtio_balloon_config {
>> #define VIRTIO_BALLOON_S_MEMTOT 5 /* Total amount of memory */
>> #define VIRTIO_BALLOON_S_AVAIL 6 /* Available memory as in /proc */
>> #define VIRTIO_BALLOON_S_CACHES 7 /* Disk caches */
>> -#define VIRTIO_BALLOON_S_NR 8
>> +#define VIRTIO_BALLOON_S_HTLB_PGALLOC 8 /* Hugetlb page allocations */
>> +#define VIRTIO_BALLOON_S_HTLB_PGFAIL 9 /* Hugetlb page allocation failures */
>> +#define VIRTIO_BALLOON_S_NR 10
>> /*
>> * Memory statistics structure.
>
> Not for this patch, but it looks to me that exporting such nr through uapi is fragile.
Sorry, can you explain what you mean here?
Jon
>
> Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
next prev parent reply other threads:[~2018-03-20 4:26 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-19 22:14 [PATCH v2] virtio_balloon: export hugetlb page allocation counts Jonathan Helman
2018-03-19 22:14 ` [virtio-dev] " Jonathan Helman
2018-03-20 2:31 ` Jason Wang
2018-03-20 2:31 ` [virtio-dev] " Jason Wang
2018-03-20 2:31 ` Jason Wang
2018-03-20 4:26 ` Jonathan Helman [this message]
2018-03-20 4:26 ` [virtio-dev] " Jonathan Helman
2018-03-20 4:26 ` Jonathan Helman
2018-03-22 1:52 ` [virtio-dev] " Jason Wang
2018-03-22 1:52 ` Jason Wang
2018-03-22 3:10 ` Michael S. Tsirkin
2018-03-22 3:10 ` Michael S. Tsirkin
2018-03-23 2:38 ` Jason Wang
2018-03-23 2:38 ` Jason Wang
2018-03-23 2:38 ` Jason Wang
2018-04-09 21:11 ` Jonathan Helman
2018-04-09 21:11 ` Jonathan Helman
2018-04-11 3:12 ` Jason Wang
2018-04-11 3:12 ` Jason Wang
2018-04-11 3:12 ` Jason Wang
2018-04-12 0:24 ` Jonathan Helman
2018-04-12 0:24 ` Jonathan Helman
2018-04-12 0:24 ` Jonathan Helman
2018-04-13 7:01 ` Jason Wang
2018-04-13 7:01 ` Jason Wang
2018-04-13 13:44 ` Michael S. Tsirkin
2018-04-13 13:44 ` Michael S. Tsirkin
2018-04-13 17:10 ` Jonathan Helman
2018-04-13 17:10 ` Jonathan Helman
2018-04-13 21:51 ` Michael S. Tsirkin
2018-04-13 21:51 ` Michael S. Tsirkin
2018-04-13 22:03 ` Jonathan Helman
2018-04-13 22:03 ` Jonathan Helman
2018-04-13 22:03 ` Jonathan Helman
2018-04-13 21:51 ` Michael S. Tsirkin
2018-04-13 17:10 ` Jonathan Helman
2018-04-13 13:44 ` Michael S. Tsirkin
2018-04-13 7:01 ` Jason Wang
2018-04-09 21:11 ` Jonathan Helman
2018-03-22 3:10 ` Michael S. Tsirkin
2018-03-22 1:52 ` Jason Wang
-- strict thread matches above, loose matches on Subject: below --
2018-03-19 22:14 Jonathan Helman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6ED6CAC9-FAD9-4A27-A9B1-C6EFC7627D68@oracle.com \
--to=jonathan.helman@oracle.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=virtio-dev@lists.oasis-open.org \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.