virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* Re: [RFC PATCH 2/2] virtio-balloon: Add Working Set reporting
       [not found] ` <20230509185419.1088297-3-yuanchu@google.com>
@ 2023-05-09 20:50   ` Michael S. Tsirkin
  0 siblings, 0 replies; 2+ messages in thread
From: Michael S. Tsirkin @ 2023-05-09 20:50 UTC (permalink / raw)
  To: Yuanchu Xie
  Cc: Roman Gushchin, Michal Hocko, Yosry Ahmed, linux-mm, kai.huang,
	hch, Yu Zhao, Aneesh Kumar K V, Rafael J. Wysocki,
	Matthew Wilcox (Oracle), talumbau, Sudarshan Rajagopalan (QUIC),
	Shakeel Butt, cgroups, virtualization, jon, SeongJae Park,
	Greg Kroah-Hartman, Muchun Song, linux-kernel, Johannes Weiner,
	Andrew Morton, Vasily Averin

On Wed, May 10, 2023 at 02:54:19AM +0800, Yuanchu Xie wrote:
> diff --git a/include/uapi/linux/virtio_balloon.h b/include/uapi/linux/virtio_balloon.h
> index ddaa45e723c4..06d0683d8d8c 100644
> --- a/include/uapi/linux/virtio_balloon.h
> +++ b/include/uapi/linux/virtio_balloon.h

Any changes to this have to be documented in the virtio spec
and be sent to virtio TC.

> @@ -37,6 +37,7 @@
>  #define VIRTIO_BALLOON_F_FREE_PAGE_HINT	3 /* VQ to report free pages */
>  #define VIRTIO_BALLOON_F_PAGE_POISON	4 /* Guest is using page poisoning */
>  #define VIRTIO_BALLOON_F_REPORTING	5 /* Page reporting virtqueue */
> +#define VIRTIO_BALLOON_F_WS_REPORTING 6 /* Working Set Size reporting */
>  
>  /* Size of a PFN in the balloon interface. */
>  #define VIRTIO_BALLOON_PFN_SHIFT 12
> @@ -59,6 +60,8 @@ struct virtio_balloon_config {
>  	};
>  	/* Stores PAGE_POISON if page poisoning is in use */
>  	__le32 poison_val;
> +	/* Number of bins for Working Set report if in use. */
> +	__le32 ws_num_bins;

working_set_ pls. eschew abbreviation.
Really __le32? Is 4G bins reasonable? what if it's 0?

>  };
>  
>  #define VIRTIO_BALLOON_S_SWAP_IN  0   /* Amount of memory swapped in */
> @@ -116,4 +119,22 @@ struct virtio_balloon_stat {
>  	__virtio64 val;
>  } __attribute__((packed));
>  
> +enum virtio_balloon_ws_op {
> +	VIRTIO_BALLOON_WS_REQUEST = 1,
> +	VIRTIO_BALLOON_WS_CONFIG = 2,
> +};


what's this?

> +
> +struct virtio_balloon_ws {

document fields.

> +#define VIRTIO_BALLOON_WS_RECLAIMABLE 0
> +#define VIRTIO_BALLOON_WS_DISCARDABLE 1

what are these?

> +	/* TODO: Provide additional detail on memory, e.g. reclaimable. */

Well? If we don't now hypervisors will come to depend on
this being broken.

> +	__virtio16 tag;
> +	/* TODO: Support per-NUMA node reports. */

Same. This is ABI we can't merge with unaddressed TODO items.

> +	__virtio16 node_id;
> +	uint8_t reserved[4];
> +	__virtio64 idle_age_ms;
> +	/* Track separately for ANON_AND_FILE. */

What does this mean?

> +	__virtio64 memory_size_bytes[2];




> +};
> +
>  #endif /* _LINUX_VIRTIO_BALLOON_H */

Use LE for new features please.

-- 
MST

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

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

* Re: [RFC PATCH 1/2] mm: multigen-LRU: working set reporting
       [not found] ` <20230509185419.1088297-2-yuanchu@google.com>
@ 2023-05-10  8:25   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2023-05-10  8:25 UTC (permalink / raw)
  To: Yuanchu Xie
  Cc: Michael S. Tsirkin, Roman Gushchin, Michal Hocko, Yosry Ahmed,
	linux-mm, kai.huang, hch, Yu Zhao, Aneesh Kumar K V,
	Matthew Wilcox (Oracle), talumbau, Sudarshan Rajagopalan (QUIC),
	Shakeel Butt, cgroups, virtualization, jon, SeongJae Park,
	Muchun Song, linux-kernel, Johannes Weiner, Rafael J. Wysocki,
	Andrew Morton, Vasily Averin

On Wed, May 10, 2023 at 02:54:18AM +0800, Yuanchu Xie wrote:
> From: talumbau <talumbau@google.com>

Please fix the name here.

> 
> A single patch to be broken up into multiple patches.

What does this mean?

> - Add working set reporting structure.
> - Add per-node and per-memcg interfaces for working set reporting.
> - Implement working set backend for MGLRU.

Please break it up to be reviewable, otherwise no one will review it.

thanks,

greg k-h
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

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

end of thread, other threads:[~2023-05-10  8:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230509185419.1088297-1-yuanchu@google.com>
     [not found] ` <20230509185419.1088297-3-yuanchu@google.com>
2023-05-09 20:50   ` [RFC PATCH 2/2] virtio-balloon: Add Working Set reporting Michael S. Tsirkin
     [not found] ` <20230509185419.1088297-2-yuanchu@google.com>
2023-05-10  8:25   ` [RFC PATCH 1/2] mm: multigen-LRU: working set reporting Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).