Skip to contentSkip to conversation

Buffers/caches in VirtIO Balloon driver stats

RFC Tomáš Golembiovský 3 participants 11 messages Aug 27, 2017 – Sep 15, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

We'd like to include information about reclaimable memory into the statistics in VirtiO Balloon driver. Namely, we'd like to include counters for bufferes and caches of Linux kernel. The patch itself is pretty trivial -- no problem there. But before we do that I'd like to get some input from the QEMU community.

1) Is there any reason not to have the stats there?

2) Considering the balloon device is multiplatform (Linux, BSD, Windows), is there a problem with including buffers/caches? These seem to be specific to the Linux virtual memory subsystem. Of course, other OSes could just report zeros. Are there some internal stats on those OSes that could be filled in? I don't now if such or similar statistic are available on BSD. On Windows only SystemCache stat looks like something relevant. Anyone familiar with those OSes has any suggestions?

Tomas

Signature · 1 line
Tomáš Golembiovský <[email protected]>
#1 lore raw
Quoted 1 line · Tomáš Golembiovský

Hi,

I have CCed the relevant mailing lists and people most recently involved in virtio-balloon discussions. Hopefully this will help get the right people to see your questions.

Quoted 16 lines

We'd like to include information about reclaimable memory into the statistics in VirtiO Balloon driver. Namely, we'd like to include counters for bufferes and caches of Linux kernel. The patch itself is pretty trivial -- no problem there. But before we do that I'd like to get some input from the QEMU community.

1) Is there any reason not to have the stats there?

2) Considering the balloon device is multiplatform (Linux, BSD, Windows), is there a problem with including buffers/caches? These seem to be specific to the Linux virtual memory subsystem. Of course, other OSes could just report zeros. Are there some internal stats on those OSes that could be filled in? I don't now if such or similar statistic are available on BSD. On Windows only SystemCache stat looks like something relevant. Anyone familiar with those OSes has any suggestions?

Quoted 5 lines

Tomas

Signature · 1 line
Tomáš Golembiovský <[email protected]>

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

#2 lore raw
In reply to Tomáš Golembiovský
Quoted 1 line · Tomáš Golembiovský

Hi,

I have CCed the relevant mailing lists and people most recently involved in virtio-balloon discussions. Hopefully this will help get the right people to see your questions.

Quoted 21 lines

We'd like to include information about reclaimable memory into the statistics in VirtiO Balloon driver. Namely, we'd like to include counters for bufferes and caches of Linux kernel. The patch itself is pretty trivial -- no problem there. But before we do that I'd like to get some input from the QEMU community.

1) Is there any reason not to have the stats there?

2) Considering the balloon device is multiplatform (Linux, BSD, Windows), is there a problem with including buffers/caches? These seem to be specific to the Linux virtual memory subsystem. Of course, other OSes could just report zeros. Are there some internal stats on those OSes that could be filled in? I don't now if such or similar statistic are available on BSD. On Windows only SystemCache stat looks like something relevant. Anyone familiar with those OSes has any suggestions?

Tomas

Signature · 1 line
Tomáš Golembiovský <[email protected]>
#3 lore raw
Quoted 13 lines · Stefan Hajnoczi
Quoted 1 line · Tomáš Golembiovský

Hi,

I have CCed the relevant mailing lists and people most recently involved in virtio-balloon discussions. Hopefully this will help get the right people to see your questions.

Quoted 7 lines

We'd like to include information about reclaimable memory into the statistics in VirtiO Balloon driver. Namely, we'd like to include counters for bufferes and caches of Linux kernel. The patch itself is pretty trivial -- no problem there. But before we do that I'd like to get some input from the QEMU community.

1) Is there any reason not to have the stats there?

Could you please share the usages of reclaimable memory via the stats?

Quoted 10 lines
Quoted 10 lines

2) Considering the balloon device is multiplatform (Linux, BSD, Windows), is there a problem with including buffers/caches? These seem to be specific to the Linux virtual memory subsystem. Of course, other OSes could just report zeros. Are there some internal stats on those OSes that could be filled in? I don't now if such or similar statistic are available on BSD. On Windows only SystemCache stat looks like something relevant. Anyone familiar with those OSes has any suggestions?

One of the solutions that I'm thinking about is to make virtio platform-ware.

That is, the device by default supports
VIRTIO_F_LINUX,
VIRTIO_F_WINDOWS,
VIRTIO_F_BSD.

For the Linux driver, only VIRTIO_F_LINUX is supported, then we can have Linux specific driver implementations under that feature.

Best,
Wei

#4 lore raw
Quoted 13 lines · On Tue, 29 Aug 2017 20:01:53 +0800 Wei Wang <[email protected]> wrote:
Quoted 12 lines · Stefan Hajnoczi
Quoted 1 line · Tomáš Golembiovský

Hi,

I have CCed the relevant mailing lists and people most recently involved in virtio-balloon discussions. Hopefully this will help get the right people to see your questions.

Quoted 6 lines

We'd like to include information about reclaimable memory into the statistics in VirtiO Balloon driver. Namely, we'd like to include counters for bufferes and caches of Linux kernel. The patch itself is pretty trivial -- no problem there. But before we do that I'd like to get some input from the QEMU community.

Quoted 3 lines
Quoted 1 line
Quoted 1 line

1) Is there any reason not to have the stats there?

Could you please share the usages of reclaimable memory via the stats?

I'll go ahead then and start sending patches. What would be the proper course of action here? Send patch for the driver first, or send patch for QEMU first or send both patches right away?

Quoted 11 lines
Quoted 10 lines
Quoted 10 lines

2) Considering the balloon device is multiplatform (Linux, BSD, Windows), is there a problem with including buffers/caches? These seem to be specific to the Linux virtual memory subsystem. Of course, other OSes could just report zeros. Are there some internal stats on those OSes that could be filled in? I don't now if such or similar statistic are available on BSD. On Windows only SystemCache stat looks like something relevant. Anyone familiar with those OSes has any suggestions?

Quoted 2 lines

One of the solutions that I'm thinking about is to make virtio platform-ware.

This is not necessary. IIUC the driver does not need to send all the stats. We can simply treat those stats as specific to Linux driver and other drivers will not send them. Then QEMU will treat them as if zero was reported.

Quoted 8 lines

That is, the device by default supports
VIRTIO_F_LINUX,
VIRTIO_F_WINDOWS,
VIRTIO_F_BSD.

For the Linux driver, only VIRTIO_F_LINUX is supported, then we can have Linux specific driver implementations under that feature.

Since there were no suggestions for similar stats on other OSes I'd say we treat the stats for buffers and caches as Linux specific. If there is any need to send similar stats for other OSes we will add new stat fields (specific for that particular OS).

Thanks,

Tomas

Signature · 5 lines
Tomáš Golembiovský <[email protected]>
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
#5 lore raw
In reply to Wei Wang
Quoted 13 lines · On Tue, 29 Aug 2017 20:01:53 +0800 Wei Wang <[email protected]> wrote:
Quoted 12 lines · Stefan Hajnoczi
Quoted 1 line · Tomáš Golembiovský

Hi,

I have CCed the relevant mailing lists and people most recently involved in virtio-balloon discussions. Hopefully this will help get the right people to see your questions.

Quoted 6 lines

We'd like to include information about reclaimable memory into the statistics in VirtiO Balloon driver. Namely, we'd like to include counters for bufferes and caches of Linux kernel. The patch itself is pretty trivial -- no problem there. But before we do that I'd like to get some input from the QEMU community.

Quoted 3 lines
Quoted 1 line
Quoted 1 line

1) Is there any reason not to have the stats there?

Could you please share the usages of reclaimable memory via the stats?

I'll go ahead then and start sending patches. What would be the proper course of action here? Send patch for the driver first, or send patch for QEMU first or send both patches right away?

Quoted 11 lines
Quoted 10 lines
Quoted 10 lines

2) Considering the balloon device is multiplatform (Linux, BSD, Windows), is there a problem with including buffers/caches? These seem to be specific to the Linux virtual memory subsystem. Of course, other OSes could just report zeros. Are there some internal stats on those OSes that could be filled in? I don't now if such or similar statistic are available on BSD. On Windows only SystemCache stat looks like something relevant. Anyone familiar with those OSes has any suggestions?

Quoted 2 lines

One of the solutions that I'm thinking about is to make virtio platform-ware.

This is not necessary. IIUC the driver does not need to send all the stats. We can simply treat those stats as specific to Linux driver and other drivers will not send them. Then QEMU will treat them as if zero was reported.

Quoted 8 lines

That is, the device by default supports
VIRTIO_F_LINUX,
VIRTIO_F_WINDOWS,
VIRTIO_F_BSD.

For the Linux driver, only VIRTIO_F_LINUX is supported, then we can have Linux specific driver implementations under that feature.

Since there were no suggestions for similar stats on other OSes I'd say we treat the stats for buffers and caches as Linux specific. If there is any need to send similar stats for other OSes we will add new stat fields (specific for that particular OS).

Thanks,

Tomas

Signature · 1 line
Tomáš Golembiovský <[email protected]>
#6 lore raw

Resending. It did not reach virtio-dev the first time.

Quoted 66 lines · On Tue, 12 Sep 2017 16:29:47 +0200 Tomáš Golembiovský <[email protected]>…
Quoted 13 lines · On Tue, 29 Aug 2017 20:01:53 +0800 Wei Wang <[email protected]> wrote:
Quoted 12 lines · Stefan Hajnoczi
Quoted 1 line · Tomáš Golembiovský

Hi,

I have CCed the relevant mailing lists and people most recently involved in virtio-balloon discussions. Hopefully this will help get the right people to see your questions.

Quoted 6 lines

We'd like to include information about reclaimable memory into the statistics in VirtiO Balloon driver. Namely, we'd like to include counters for bufferes and caches of Linux kernel. The patch itself is pretty trivial -- no problem there. But before we do that I'd like to get some input from the QEMU community.

Quoted 3 lines
Quoted 1 line
Quoted 1 line

1) Is there any reason not to have the stats there?

Could you please share the usages of reclaimable memory via the stats?

I'll go ahead then and start sending patches. What would be the proper course of action here? Send patch for the driver first, or send patch for QEMU first or send both patches right away?

Quoted 11 lines
Quoted 10 lines
Quoted 10 lines

2) Considering the balloon device is multiplatform (Linux, BSD, Windows), is there a problem with including buffers/caches? These seem to be specific to the Linux virtual memory subsystem. Of course, other OSes could just report zeros. Are there some internal stats on those OSes that could be filled in? I don't now if such or similar statistic are available on BSD. On Windows only SystemCache stat looks like something relevant. Anyone familiar with those OSes has any suggestions?

Quoted 2 lines

One of the solutions that I'm thinking about is to make virtio platform-ware.

This is not necessary. IIUC the driver does not need to send all the stats. We can simply treat those stats as specific to Linux driver and other drivers will not send them. Then QEMU will treat them as if zero was reported.

Quoted 8 lines

That is, the device by default supports
VIRTIO_F_LINUX,
VIRTIO_F_WINDOWS,
VIRTIO_F_BSD.

For the Linux driver, only VIRTIO_F_LINUX is supported, then we can have Linux specific driver implementations under that feature.

Since there were no suggestions for similar stats on other OSes I'd say we treat the stats for buffers and caches as Linux specific. If there is any need to send similar stats for other OSes we will add new stat fields (specific for that particular OS).

Thanks,

Tomas

Signature · 1 line
Tomáš Golembiovský <[email protected]>
Signature · 1 line
Tomáš Golembiovský <[email protected]>
#7 lore raw
In reply to Tomáš Golembiovský

Resending. It did not reach virtio-dev the first time.

Quoted 66 lines · On Tue, 12 Sep 2017 16:29:47 +0200 Tomáš Golembiovský <[email protected]>…
Quoted 13 lines · On Tue, 29 Aug 2017 20:01:53 +0800 Wei Wang <[email protected]> wrote:
Quoted 12 lines · Stefan Hajnoczi
Quoted 1 line · Tomáš Golembiovský

Hi,

I have CCed the relevant mailing lists and people most recently involved in virtio-balloon discussions. Hopefully this will help get the right people to see your questions.

Quoted 6 lines

We'd like to include information about reclaimable memory into the statistics in VirtiO Balloon driver. Namely, we'd like to include counters for bufferes and caches of Linux kernel. The patch itself is pretty trivial -- no problem there. But before we do that I'd like to get some input from the QEMU community.

Quoted 3 lines
Quoted 1 line
Quoted 1 line

1) Is there any reason not to have the stats there?

Could you please share the usages of reclaimable memory via the stats?

I'll go ahead then and start sending patches. What would be the proper course of action here? Send patch for the driver first, or send patch for QEMU first or send both patches right away?

Quoted 11 lines
Quoted 10 lines
Quoted 10 lines

2) Considering the balloon device is multiplatform (Linux, BSD, Windows), is there a problem with including buffers/caches? These seem to be specific to the Linux virtual memory subsystem. Of course, other OSes could just report zeros. Are there some internal stats on those OSes that could be filled in? I don't now if such or similar statistic are available on BSD. On Windows only SystemCache stat looks like something relevant. Anyone familiar with those OSes has any suggestions?

Quoted 2 lines

One of the solutions that I'm thinking about is to make virtio platform-ware.

This is not necessary. IIUC the driver does not need to send all the stats. We can simply treat those stats as specific to Linux driver and other drivers will not send them. Then QEMU will treat them as if zero was reported.

Quoted 8 lines

That is, the device by default supports
VIRTIO_F_LINUX,
VIRTIO_F_WINDOWS,
VIRTIO_F_BSD.

For the Linux driver, only VIRTIO_F_LINUX is supported, then we can have Linux specific driver implementations under that feature.

Since there were no suggestions for similar stats on other OSes I'd say we treat the stats for buffers and caches as Linux specific. If there is any need to send similar stats for other OSes we will add new stat fields (specific for that particular OS).

Thanks,

Tomas

Signature · 1 line
Tomáš Golembiovský <[email protected]>
Signature · 5 lines
Tomáš Golembiovský <[email protected]>
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
#8 lore raw
In reply to Tomáš Golembiovský
Quoted 16 lines · Tomáš Golembiovský
Quoted 13 lines · On Tue, 29 Aug 2017 20:01:53 +0800 Wei Wang <[email protected]> wrote:
Quoted 12 lines · Stefan Hajnoczi
Quoted 1 line · Tomáš Golembiovský

Hi,

I have CCed the relevant mailing lists and people most recently involved in virtio-balloon discussions. Hopefully this will help get the right people to see your questions.

Quoted 6 lines

We'd like to include information about reclaimable memory into the statistics in VirtiO Balloon driver. Namely, we'd like to include counters for bufferes and caches of Linux kernel. The patch itself is pretty trivial -- no problem there. But before we do that I'd like to get some input from the QEMU community.

Quoted 5 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line

1) Is there any reason not to have the stats there?

Could you please share the usages of reclaimable memory via the stats?

I'll go ahead then and start sending patches. What would be the proper course of action here? Send patch for the driver first, or send patch for QEMU first or send both patches right away?

If you have both ready, I think it would be fine to send them all.

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

2) Considering the balloon device is multiplatform (Linux, BSD, Windows), is there a problem with including buffers/caches? These seem to be specific to the Linux virtual memory subsystem. Of course, other OSes could just report zeros. Are there some internal stats on those OSes that could be filled in? I don't now if such or similar statistic are available on BSD. On Windows only SystemCache stat looks like something relevant. Anyone familiar with those OSes has any suggestions?

Quoted 6 lines
Quoted 2 lines

One of the solutions that I'm thinking about is to make virtio platform-ware.

This is not necessary. IIUC the driver does not need to send all the stats. We can simply treat those stats as specific to Linux driver and other drivers will not send them. Then QEMU will treat them as if zero was reported.

Just had a quick check, I think that should function well too. QEMU will report -1 for the stats.

Best,
Wei

#9 lore raw
In reply to Tomáš Golembiovský
Quoted 16 lines · Tomáš Golembiovský
Quoted 13 lines · On Tue, 29 Aug 2017 20:01:53 +0800 Wei Wang <[email protected]> wrote:
Quoted 12 lines · Stefan Hajnoczi
Quoted 1 line · Tomáš Golembiovský

Hi,

I have CCed the relevant mailing lists and people most recently involved in virtio-balloon discussions. Hopefully this will help get the right people to see your questions.

Quoted 6 lines

We'd like to include information about reclaimable memory into the statistics in VirtiO Balloon driver. Namely, we'd like to include counters for bufferes and caches of Linux kernel. The patch itself is pretty trivial -- no problem there. But before we do that I'd like to get some input from the QEMU community.

Quoted 5 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line

1) Is there any reason not to have the stats there?

Could you please share the usages of reclaimable memory via the stats?

I'll go ahead then and start sending patches. What would be the proper course of action here? Send patch for the driver first, or send patch for QEMU first or send both patches right away?

If you have both ready, I think it would be fine to send them all.

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

2) Considering the balloon device is multiplatform (Linux, BSD, Windows), is there a problem with including buffers/caches? These seem to be specific to the Linux virtual memory subsystem. Of course, other OSes could just report zeros. Are there some internal stats on those OSes that could be filled in? I don't now if such or similar statistic are available on BSD. On Windows only SystemCache stat looks like something relevant. Anyone familiar with those OSes has any suggestions?

Quoted 6 lines
Quoted 2 lines

One of the solutions that I'm thinking about is to make virtio platform-ware.

This is not necessary. IIUC the driver does not need to send all the stats. We can simply treat those stats as specific to Linux driver and other drivers will not send them. Then QEMU will treat them as if zero was reported.

Just had a quick check, I think that should function well too. QEMU will report -1 for the stats.

Best,
Wei
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

#10 lore raw
In reply to Stefan Hajnoczi
Quoted 13 lines · Stefan Hajnoczi
Quoted 1 line · Tomáš Golembiovský

Hi,

I have CCed the relevant mailing lists and people most recently involved in virtio-balloon discussions. Hopefully this will help get the right people to see your questions.

Quoted 7 lines

We'd like to include information about reclaimable memory into the statistics in VirtiO Balloon driver. Namely, we'd like to include counters for bufferes and caches of Linux kernel. The patch itself is pretty trivial -- no problem there. But before we do that I'd like to get some input from the QEMU community.

1) Is there any reason not to have the stats there?

Could you please share the usages of reclaimable memory via the stats?

Quoted 10 lines
Quoted 10 lines

2) Considering the balloon device is multiplatform (Linux, BSD, Windows), is there a problem with including buffers/caches? These seem to be specific to the Linux virtual memory subsystem. Of course, other OSes could just report zeros. Are there some internal stats on those OSes that could be filled in? I don't now if such or similar statistic are available on BSD. On Windows only SystemCache stat looks like something relevant. Anyone familiar with those OSes has any suggestions?

One of the solutions that I'm thinking about is to make virtio platform-ware.

That is, the device by default supports
VIRTIO_F_LINUX,
VIRTIO_F_WINDOWS,
VIRTIO_F_BSD.

For the Linux driver, only VIRTIO_F_LINUX is supported, then we can have Linux specific driver implementations under that feature.

Best,
Wei

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization