From: David Hildenbrand <david@redhat.com>
To: Alexander Duyck <alexander.duyck@gmail.com>,
jasowang@redhat.com, mst@redhat.com
Cc: virtio-dev@lists.oasis-open.org,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH v2] virtio-balloon: Avoid using the word 'report' when referring to free page hinting
Date: Wed, 15 Apr 2020 20:57:04 +0200 [thread overview]
Message-ID: <bf63301f-5eeb-42cf-8209-4e9300c4a226@redhat.com> (raw)
In-Reply-To: <20200415183524.14402.24934.stgit@localhost.localdomain>
On 15.04.20 20:35, Alexander Duyck wrote:
> From: Alexander Duyck <alexander.h.duyck@linux.intel.com>
>
> It can be confusing to have multiple features within the same driver that
> are using the same verbage. As such this patch is creating a union of
> free_page_report_cmd_id with free_page_hint_cmd_id so that we can clean-up
> the userspace code a bit in terms of readability while maintaining the
> functionality of legacy code.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
> ---
> drivers/virtio/virtio_balloon.c | 2 +-
> include/uapi/linux/virtio_balloon.h | 13 ++++++++++---
> 2 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
> index 0ef16566c3f3..95d9c2f0a7be 100644
> --- a/drivers/virtio/virtio_balloon.c
> +++ b/drivers/virtio/virtio_balloon.c
> @@ -580,7 +580,7 @@ static u32 virtio_balloon_cmd_id_received(struct virtio_balloon *vb)
> if (test_and_clear_bit(VIRTIO_BALLOON_CONFIG_READ_CMD_ID,
> &vb->config_read_bitmap))
> virtio_cread(vb->vdev, struct virtio_balloon_config,
> - free_page_report_cmd_id,
> + free_page_hint_cmd_id,
> &vb->cmd_id_received_cache);
>
> return vb->cmd_id_received_cache;
> diff --git a/include/uapi/linux/virtio_balloon.h b/include/uapi/linux/virtio_balloon.h
> index 19974392d324..3ce64f72bd09 100644
> --- a/include/uapi/linux/virtio_balloon.h
> +++ b/include/uapi/linux/virtio_balloon.h
> @@ -34,7 +34,7 @@
> #define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */
> #define VIRTIO_BALLOON_F_STATS_VQ 1 /* Memory Stats virtqueue */
> #define VIRTIO_BALLOON_F_DEFLATE_ON_OOM 2 /* Deflate balloon on OOM */
> -#define VIRTIO_BALLOON_F_FREE_PAGE_HINT 3 /* VQ to report free pages */
> +#define VIRTIO_BALLOON_F_FREE_PAGE_HINT 3 /* Free page hinting VQ and config */
> #define VIRTIO_BALLOON_F_PAGE_POISON 4 /* Guest is using page poisoning */
> #define VIRTIO_BALLOON_F_REPORTING 5 /* Page reporting virtqueue */
>
> @@ -48,8 +48,15 @@ struct virtio_balloon_config {
> __u32 num_pages;
> /* Number of pages we've actually got in balloon. */
> __u32 actual;
> - /* Free page report command id, readonly by guest */
> - __u32 free_page_report_cmd_id;
> + /*
> + * Free page hint command id, readonly by guest.
> + * Was previously named free_page_report_cmd_id so we
> + * need to carry that name for legacy support.
> + */
> + union {
> + __u32 free_page_hint_cmd_id;
> + __u32 free_page_report_cmd_id; /* deprecated */
> + };
> /* Stores PAGE_POISON if page poisoning is in use */
> __u32 poison_val;
> };
>
Thanks Alex!
Acked-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
prev parent reply other threads:[~2020-04-15 18:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-15 18:35 [PATCH v2] virtio-balloon: Avoid using the word 'report' when referring to free page hinting Alexander Duyck
2020-04-15 18:57 ` David Hildenbrand [this message]
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=bf63301f-5eeb-42cf-8209-4e9300c4a226@redhat.com \
--to=david@redhat.com \
--cc=alexander.duyck@gmail.com \
--cc=jasowang@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox