diff mbox series

[RFC,v2,1/4] docs: mention shared state protect for OOB

Message ID 20180531051641.8473-2-peterx@redhat.com
State New
Headers show
Series monitor: enable OOB by default | expand

Commit Message

Peter Xu May 31, 2018, 5:16 a.m. UTC
Out-Of-Band handlers need to protect shared state if there is any.
Mention it in the document.

Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
---
 docs/devel/qapi-code-gen.txt | 3 +++
 1 file changed, 3 insertions(+)

Comments

Eric Blake May 31, 2018, 2:06 p.m. UTC | #1
On 05/31/2018 12:16 AM, Peter Xu wrote:
> Out-Of-Band handlers need to protect shared state if there is any.
> Mention it in the document.
> 
> Suggested-by: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
>   docs/devel/qapi-code-gen.txt | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/docs/devel/qapi-code-gen.txt b/docs/devel/qapi-code-gen.txt
> index b9b6eabd08..aafc15f100 100644
> --- a/docs/devel/qapi-code-gen.txt
> +++ b/docs/devel/qapi-code-gen.txt
> @@ -680,6 +680,9 @@ OOB command handlers must satisfy the following conditions:
>   - It does not invoke system calls that may block,
>   - It does not access guest RAM that may block when userfaultfd is
>     enabled for postcopy live migration.
> +- It needs to protect possilbe shared states, since as long as a

s/possilbe/possible/
s/states/state/

or even 'protect any shared state'

> +  command supports Out-Of-Band it means the handler can be run in
> +  parallel with the same handler running in the other thread.
>   
>   If in doubt, do not implement OOB execution support.
>   
>
Peter Xu June 7, 2018, 8:06 a.m. UTC | #2
On Thu, May 31, 2018 at 09:06:05AM -0500, Eric Blake wrote:
> On 05/31/2018 12:16 AM, Peter Xu wrote:
> > Out-Of-Band handlers need to protect shared state if there is any.
> > Mention it in the document.
> > 
> > Suggested-by: Markus Armbruster <armbru@redhat.com>
> > Signed-off-by: Peter Xu <peterx@redhat.com>
> > ---
> >   docs/devel/qapi-code-gen.txt | 3 +++
> >   1 file changed, 3 insertions(+)
> > 
> > diff --git a/docs/devel/qapi-code-gen.txt b/docs/devel/qapi-code-gen.txt
> > index b9b6eabd08..aafc15f100 100644
> > --- a/docs/devel/qapi-code-gen.txt
> > +++ b/docs/devel/qapi-code-gen.txt
> > @@ -680,6 +680,9 @@ OOB command handlers must satisfy the following conditions:
> >   - It does not invoke system calls that may block,
> >   - It does not access guest RAM that may block when userfaultfd is
> >     enabled for postcopy live migration.
> > +- It needs to protect possilbe shared states, since as long as a
> 
> s/possilbe/possible/
> s/states/state/
> 
> or even 'protect any shared state'

Fixed.
diff mbox series

Patch

diff --git a/docs/devel/qapi-code-gen.txt b/docs/devel/qapi-code-gen.txt
index b9b6eabd08..aafc15f100 100644
--- a/docs/devel/qapi-code-gen.txt
+++ b/docs/devel/qapi-code-gen.txt
@@ -680,6 +680,9 @@  OOB command handlers must satisfy the following conditions:
 - It does not invoke system calls that may block,
 - It does not access guest RAM that may block when userfaultfd is
   enabled for postcopy live migration.
+- It needs to protect possilbe shared states, since as long as a
+  command supports Out-Of-Band it means the handler can be run in
+  parallel with the same handler running in the other thread.
 
 If in doubt, do not implement OOB execution support.