From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: virtio-comment-return-1232-cohuck=redhat.com@lists.oasis-open.org Sender: List-Post: List-Help: List-Unsubscribe: List-Subscribe: Date: Mon, 11 May 2020 17:50:36 +0200 From: Cornelia Huck Message-ID: <20200511175036.53640bfc.cohuck@redhat.com> In-Reply-To: References: <158895811782.529821.115832709184722087.stgit@ahduyck-workstation> <158895818234.529821.13300630585219085797.stgit@ahduyck-workstation> <20200511140951.2afe0cca.cohuck@redhat.com> MIME-Version: 1.0 Subject: [virtio-comment] Re: [PATCH 1/3] content: Document balloon feature free page hints Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit To: Alexander Duyck Cc: virtio-comment@lists.oasis-open.org, "Michael S. Tsirkin" , David Hildenbrand , virtio-dev@lists.oasis-open.org, "Wang, Wei W" List-ID: On Mon, 11 May 2020 08:22:02 -0700 Alexander Duyck wrote: > On Mon, May 11, 2020 at 5:10 AM Cornelia Huck wrote: > > > > On Fri, 08 May 2020 10:16:22 -0700 > > Alexander Duyck wrote: > > > > > From: Alexander Duyck > > > > > > Free page hints allow the balloon driver to provide information on what > > > pages are not currently in use so that we can avoid the cost of copying > > > them in migration scenarios. Add a feature description for free page hints > > > describing basic functioning and requirements. > > > > > > Signed-off-by: Alexander Duyck > > > --- > > > content.tex | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- > > > 1 file changed, 122 insertions(+), 6 deletions(-) > > > > > > > I've taken care of the spelling/grammar items pointed out. Will be > fixed for next version. > > > > +hinting request. > > > + > > > +The driver SHOULD return pages for use once \field{free_page_hint_cmd_id} > > > +reports a value of VIRTIO_BALLOON_CMD_ID_DONE. > > > + > > > +\devicenormative{\paragraph}{Free Page Hinting}{Device Types / Memory Balloon Device / Device Operation / Free Page Hinting} > > > + > > > +Normative statements in this section apply if the > > > +VIRTIO_BALLOON_F_FREE_PAGE_HINT feature has been negotiated. > > > + > > > +The device MUST set \field{free_page_hint_cmd_id} to > > > +VIRTIO_BALLOON_CMD_ID_STOP any time that the dirty pages for the given > > > +guest are being recorded. > > > + > > > +The device MUST NOT reuse a command ID until it has received an output > > > > What does 'reuse' mean in this context? I would expect that it is > > forbidden to do the following: > > - device sets id in config space > > - driver queues descriptor with id > > - device changes id to anything other than the current id or the > > reserved ids <== bad > > > > Maybe "The device MUST NOT change a command ID actively in use by the > > driver until..." ? > > Actually what I was referring to was something more like: > - device sets the ID in config space > - device sets the ID value to CMD_ID_STOP. > - device set the ID value to again. > > In order to be able to do that the driver has to reply indicating it > has stopped reporting hints before we can go back and reuse . The > expectation is that the device will use when it resumes. > I see. So what about "The device MUST NOT set \field{free_page_hint_cmd_id} to a previously used ID until after it has received an output descriptor containing VIRTIO_BALLOON_CMD_ID_STOP from the driver." ? (Also, is the sequence I mentioned above valid? What happens if the driver continues queuing with the old id -- does the device ignore it? Or does the device need to present STOP before presenting another id?) This publicly archived list offers a means to provide input to the OASIS Virtual I/O Device (VIRTIO) TC. In order to verify user consent to the Feedback License terms and to minimize spam in the list archive, subscription is required before posting. Subscribe: virtio-comment-subscribe@lists.oasis-open.org Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org List help: virtio-comment-help@lists.oasis-open.org List archive: https://lists.oasis-open.org/archives/virtio-comment/ Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists Committee: https://www.oasis-open.org/committees/virtio/ Join OASIS: https://www.oasis-open.org/join/