All of lore.kernel.org
 help / color / mirror / Atom feed
* [virtio-dev] [PATCH] content: document balloon memory statistics
@ 2018-02-19 13:10 Tomáš Golembiovský
  2018-02-20 17:15 ` Stefan Hajnoczi
  0 siblings, 1 reply; 7+ messages in thread
From: Tomáš Golembiovský @ 2018-02-19 13:10 UTC (permalink / raw)
  To: virtio-dev
  Cc: Jonathan Helman, Michael S. Tsirkin, Tomáš Golembiovský

Linux kernel provides some balloon memory statistics that were not
included in the specs. Include them to avoid any ID clashes in the
future.

Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
---
 content.tex | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/content.tex b/content.tex
index c7ef7fd..74d351c 100644
--- a/content.tex
+++ b/content.tex
@@ -5028,6 +5028,8 @@ struct virtio_balloon_stat {
 #define VIRTIO_BALLOON_S_MINFLT   3
 #define VIRTIO_BALLOON_S_MEMFREE  4
 #define VIRTIO_BALLOON_S_MEMTOT   5
+#define VIRTIO_BALLOON_S_AVAIL    6
+#define VIRTIO_BALLOON_S_CACHES   7
         le16 tag;
         le64 val;
 } __attribute__((packed));
@@ -5109,6 +5111,12 @@ first buffer.
 
 \item[VIRTIO_BALLOON_S_MEMTOT (5)] The total amount of memory available
   (in bytes).
+
+\item[VIRTIO_BALLOON_S_AVAIL (6)] An estimate of how much memory is available
+  (in bytes) for starting new applications, without pushing the system to swap.
+
+\item[VIRTIO_BALLOON_S_CACHES (7)] The amount of memory currently used for
+  caching files and other data from disk (in bytes).
 \end{description}
 
 \section{SCSI Host Device}\label{sec:Device Types / SCSI Host Device}
-- 
2.16.1


---------------------------------------------------------------------
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] 7+ messages in thread

* Re: [virtio-dev] [PATCH] content: document balloon memory statistics
  2018-02-19 13:10 [virtio-dev] [PATCH] content: document balloon memory statistics Tomáš Golembiovský
@ 2018-02-20 17:15 ` Stefan Hajnoczi
  2018-02-20 23:11   ` Tomáš Golembiovský
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Hajnoczi @ 2018-02-20 17:15 UTC (permalink / raw)
  To: Tomáš Golembiovský
  Cc: virtio-dev, Jonathan Helman, Michael S. Tsirkin

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

On Mon, Feb 19, 2018 at 02:10:29PM +0100, Tomáš Golembiovský wrote:
> +\item[VIRTIO_BALLOON_S_CACHES (7)] The amount of memory currently used for
> +  caching files and other data from disk (in bytes).
>  \end{description}

This one is somewhat vague.  I'm not sure if it means guest page cache
specifically or something more general.

On the other hand, the numbers tend to be OS specific...

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

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

* Re: [virtio-dev] [PATCH] content: document balloon memory statistics
  2018-02-20 17:15 ` Stefan Hajnoczi
@ 2018-02-20 23:11   ` Tomáš Golembiovský
  2018-02-21 11:33     ` Stefan Hajnoczi
  0 siblings, 1 reply; 7+ messages in thread
From: Tomáš Golembiovský @ 2018-02-20 23:11 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: virtio-dev, Jonathan Helman, Michael S. Tsirkin

On Tue, 20 Feb 2018 17:15:44 +0000
Stefan Hajnoczi <stefanha@redhat.com> wrote:

> On Mon, Feb 19, 2018 at 02:10:29PM +0100, Tomáš Golembiovský wrote:
> > +\item[VIRTIO_BALLOON_S_CACHES (7)] The amount of memory currently used for
> > +  caching files and other data from disk (in bytes).
> >  \end{description}  
> 
> This one is somewhat vague.  I'm not sure if it means guest page cache
> specifically or something more general.
> 
> On the other hand, the numbers tend to be OS specific...

We should come up with a definition that is as definite as possible
while leaving room for all systems to substitute a value that is
natively available. So if anyone has a better formulation then please
advise. The original intent was not to create a Linux specific field.

On Linux the value corresponds to Buffers + Cached + SwapCached memory
stats. Correct me if I'm wrong but that should be all clean pages that
have a counterpart on disk and can be quickly reclaimed and used for
something else (without additional IO).

On Windows this roughly corresponds to the standby list. Or maybe
standby list plus something else. I suppose there may be some
alternative on BSD too.

    Tomas


-- 
Tomáš Golembiovský <tgolembi@redhat.com>

---------------------------------------------------------------------
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] 7+ messages in thread

* Re: [virtio-dev] [PATCH] content: document balloon memory statistics
  2018-02-20 23:11   ` Tomáš Golembiovský
@ 2018-02-21 11:33     ` Stefan Hajnoczi
  2018-02-21 17:44       ` Tomáš Golembiovský
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Hajnoczi @ 2018-02-21 11:33 UTC (permalink / raw)
  To: Tomáš Golembiovský
  Cc: virtio-dev, Jonathan Helman, Michael S. Tsirkin

[-- Attachment #1: Type: text/plain, Size: 1626 bytes --]

On Wed, Feb 21, 2018 at 12:11:35AM +0100, Tomáš Golembiovský wrote:
> On Tue, 20 Feb 2018 17:15:44 +0000
> Stefan Hajnoczi <stefanha@redhat.com> wrote:
> 
> > On Mon, Feb 19, 2018 at 02:10:29PM +0100, Tomáš Golembiovský wrote:
> > > +\item[VIRTIO_BALLOON_S_CACHES (7)] The amount of memory currently used for
> > > +  caching files and other data from disk (in bytes).
> > >  \end{description}  
> > 
> > This one is somewhat vague.  I'm not sure if it means guest page cache
> > specifically or something more general.
> > 
> > On the other hand, the numbers tend to be OS specific...
> 
> We should come up with a definition that is as definite as possible
> while leaving room for all systems to substitute a value that is
> natively available. So if anyone has a better formulation then please
> advise. The original intent was not to create a Linux specific field.
> 
> On Linux the value corresponds to Buffers + Cached + SwapCached memory
> stats. Correct me if I'm wrong but that should be all clean pages that
> have a counterpart on disk and can be quickly reclaimed and used for
> something else (without additional IO).

Thanks for clarifying.  Based on what you posted, how about:

"The amount of memory, in bytes, that can be quickly reclaimed without
additional I/O.  Typically these pages are used for caching files from
disk."

?

> On Windows this roughly corresponds to the standby list. Or maybe
> standby list plus something else. I suppose there may be some
> alternative on BSD too.
> 
>     Tomas
> 
> 
> -- 
> Tomáš Golembiovský <tgolembi@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

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

* Re: [virtio-dev] [PATCH] content: document balloon memory statistics
  2018-02-21 11:33     ` Stefan Hajnoczi
@ 2018-02-21 17:44       ` Tomáš Golembiovský
  2018-02-27 19:56         ` Michael S. Tsirkin
  0 siblings, 1 reply; 7+ messages in thread
From: Tomáš Golembiovský @ 2018-02-21 17:44 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: virtio-dev, Jonathan Helman, Michael S. Tsirkin

On Wed, 21 Feb 2018 11:33:28 +0000
Stefan Hajnoczi <stefanha@redhat.com> wrote:

> On Wed, Feb 21, 2018 at 12:11:35AM +0100, Tomáš Golembiovský wrote:
> > On Tue, 20 Feb 2018 17:15:44 +0000
> > Stefan Hajnoczi <stefanha@redhat.com> wrote:
> > 
> > > On Mon, Feb 19, 2018 at 02:10:29PM +0100, Tomáš Golembiovský wrote:
> > > > +\item[VIRTIO_BALLOON_S_CACHES (7)] The amount of memory currently used for
> > > > +  caching files and other data from disk (in bytes).
> > > >  \end{description}  
> > > 
> > > This one is somewhat vague.  I'm not sure if it means guest page cache
> > > specifically or something more general.
> > > 
> > > On the other hand, the numbers tend to be OS specific...
> > 
> > We should come up with a definition that is as definite as possible
> > while leaving room for all systems to substitute a value that is
> > natively available. So if anyone has a better formulation then please
> > advise. The original intent was not to create a Linux specific field.
> > 
> > On Linux the value corresponds to Buffers + Cached + SwapCached memory
> > stats. Correct me if I'm wrong but that should be all clean pages that
> > have a counterpart on disk and can be quickly reclaimed and used for
> > something else (without additional IO).
> 
> Thanks for clarifying.  Based on what you posted, how about:
> 
> "The amount of memory, in bytes, that can be quickly reclaimed without
> additional I/O.  Typically these pages are used for caching files from
> disk."
> 
> ?

Sounds reasonable, thanks

    Tomas


> 
> > On Windows this roughly corresponds to the standby list. Or maybe
> > standby list plus something else. I suppose there may be some
> > alternative on BSD too.
> > 
> >     Tomas
> > 
> > 
> > -- 
> > Tomáš Golembiovský <tgolembi@redhat.com>


-- 
Tomáš Golembiovský <tgolembi@redhat.com>

---------------------------------------------------------------------
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] 7+ messages in thread

* Re: [virtio-dev] [PATCH] content: document balloon memory statistics
  2018-02-21 17:44       ` Tomáš Golembiovský
@ 2018-02-27 19:56         ` Michael S. Tsirkin
  2018-02-28  9:35           ` Tomáš Golembiovský
  0 siblings, 1 reply; 7+ messages in thread
From: Michael S. Tsirkin @ 2018-02-27 19:56 UTC (permalink / raw)
  To: Tomáš Golembiovský
  Cc: Stefan Hajnoczi, virtio-dev, Jonathan Helman

On Wed, Feb 21, 2018 at 06:44:17PM +0100, Tomáš Golembiovský wrote:
> On Wed, 21 Feb 2018 11:33:28 +0000
> Stefan Hajnoczi <stefanha@redhat.com> wrote:
> 
> > On Wed, Feb 21, 2018 at 12:11:35AM +0100, Tomáš Golembiovský wrote:
> > > On Tue, 20 Feb 2018 17:15:44 +0000
> > > Stefan Hajnoczi <stefanha@redhat.com> wrote:
> > > 
> > > > On Mon, Feb 19, 2018 at 02:10:29PM +0100, Tomáš Golembiovský wrote:
> > > > > +\item[VIRTIO_BALLOON_S_CACHES (7)] The amount of memory currently used for
> > > > > +  caching files and other data from disk (in bytes).
> > > > >  \end{description}  
> > > > 
> > > > This one is somewhat vague.  I'm not sure if it means guest page cache
> > > > specifically or something more general.
> > > > 
> > > > On the other hand, the numbers tend to be OS specific...
> > > 
> > > We should come up with a definition that is as definite as possible
> > > while leaving room for all systems to substitute a value that is
> > > natively available. So if anyone has a better formulation then please
> > > advise. The original intent was not to create a Linux specific field.
> > > 
> > > On Linux the value corresponds to Buffers + Cached + SwapCached memory
> > > stats. Correct me if I'm wrong but that should be all clean pages that
> > > have a counterpart on disk and can be quickly reclaimed and used for
> > > something else (without additional IO).
> > 
> > Thanks for clarifying.  Based on what you posted, how about:
> > 
> > "The amount of memory, in bytes, that can be quickly reclaimed without
> > additional I/O.  Typically these pages are used for caching files from
> > disk."
> > 
> > ?
> 
> Sounds reasonable, thanks
> 
>     Tomas

OK - will you post v2 then?

> 
> > 
> > > On Windows this roughly corresponds to the standby list. Or maybe
> > > standby list plus something else. I suppose there may be some
> > > alternative on BSD too.
> > > 
> > >     Tomas
> > > 
> > > 
> > > -- 
> > > Tomáš Golembiovský <tgolembi@redhat.com>
> 
> 
> -- 
> Tomáš Golembiovský <tgolembi@redhat.com>

---------------------------------------------------------------------
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] 7+ messages in thread

* Re: [virtio-dev] [PATCH] content: document balloon memory statistics
  2018-02-27 19:56         ` Michael S. Tsirkin
@ 2018-02-28  9:35           ` Tomáš Golembiovský
  0 siblings, 0 replies; 7+ messages in thread
From: Tomáš Golembiovský @ 2018-02-28  9:35 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Stefan Hajnoczi, virtio-dev, Jonathan Helman

On Tue, 27 Feb 2018 21:56:04 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Wed, Feb 21, 2018 at 06:44:17PM +0100, Tomáš Golembiovský wrote:
> > On Wed, 21 Feb 2018 11:33:28 +0000
> > Stefan Hajnoczi <stefanha@redhat.com> wrote:
> >   
> > > On Wed, Feb 21, 2018 at 12:11:35AM +0100, Tomáš Golembiovský wrote:  
> > > > On Tue, 20 Feb 2018 17:15:44 +0000
> > > > Stefan Hajnoczi <stefanha@redhat.com> wrote:
> > > >   
> > > > > On Mon, Feb 19, 2018 at 02:10:29PM +0100, Tomáš Golembiovský wrote:  
> > > > > > +\item[VIRTIO_BALLOON_S_CACHES (7)] The amount of memory currently used for
> > > > > > +  caching files and other data from disk (in bytes).
> > > > > >  \end{description}    
> > > > > 
> > > > > This one is somewhat vague.  I'm not sure if it means guest page cache
> > > > > specifically or something more general.
> > > > > 
> > > > > On the other hand, the numbers tend to be OS specific...  
> > > > 
> > > > We should come up with a definition that is as definite as possible
> > > > while leaving room for all systems to substitute a value that is
> > > > natively available. So if anyone has a better formulation then please
> > > > advise. The original intent was not to create a Linux specific field.
> > > > 
> > > > On Linux the value corresponds to Buffers + Cached + SwapCached memory
> > > > stats. Correct me if I'm wrong but that should be all clean pages that
> > > > have a counterpart on disk and can be quickly reclaimed and used for
> > > > something else (without additional IO).  
> > > 
> > > Thanks for clarifying.  Based on what you posted, how about:
> > > 
> > > "The amount of memory, in bytes, that can be quickly reclaimed without
> > > additional I/O.  Typically these pages are used for caching files from
> > > disk."
> > > 
> > > ?  
> > 
> > Sounds reasonable, thanks
> > 
> >     Tomas  
> 
> OK - will you post v2 then?

I already have:
https://lists.oasis-open.org/archives/virtio-dev/201802/msg00141.html

> 
> >   
> > >   
> > > > On Windows this roughly corresponds to the standby list. Or maybe
> > > > standby list plus something else. I suppose there may be some
> > > > alternative on BSD too.
> > > > 
> > > >     Tomas
> > > > 
> > > > 
> > > > -- 
> > > > Tomáš Golembiovský <tgolembi@redhat.com>  
> > 
> > 
> > -- 
> > Tomáš Golembiovský <tgolembi@redhat.com>  


-- 
Tomáš Golembiovský <tgolembi@redhat.com>

---------------------------------------------------------------------
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] 7+ messages in thread

end of thread, other threads:[~2018-02-28  9:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-19 13:10 [virtio-dev] [PATCH] content: document balloon memory statistics Tomáš Golembiovský
2018-02-20 17:15 ` Stefan Hajnoczi
2018-02-20 23:11   ` Tomáš Golembiovský
2018-02-21 11:33     ` Stefan Hajnoczi
2018-02-21 17:44       ` Tomáš Golembiovský
2018-02-27 19:56         ` Michael S. Tsirkin
2018-02-28  9:35           ` Tomáš Golembiovský

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.