All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] docs/man: add shutdown reasons to xl (list) man page
@ 2024-03-05 22:45 zithro / Cyril Rébert
  2024-03-06 15:43 ` Anthony PERARD
  2024-03-06 17:02 ` Roger Pau Monné
  0 siblings, 2 replies; 4+ messages in thread
From: zithro / Cyril Rébert @ 2024-03-05 22:45 UTC (permalink / raw)
  To: xen-devel
  Cc: zithro / Cyril Rébert, Roger Pau Monné,
	Wei Liu, Anthony PERARD

Add the shutdown reasons to the paragraph of "xl list" concerning the
shutdown status.
I have copy/pasted the explanations from the source code :

 - tools/xl/xl_info.c (L379)
 - xen/include/public/sched.h (starting L158)

Suggested-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Cyril Rébert / zithro <slack@rabbit.lu>
---
 docs/man/xl.1.pod.in | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/docs/man/xl.1.pod.in b/docs/man/xl.1.pod.in
index bed8393473..2b046f97f1 100644
--- a/docs/man/xl.1.pod.in
+++ b/docs/man/xl.1.pod.in
@@ -370,6 +370,40 @@ scheduling by the Xen hypervisor.
 The guest OS has shut down (SCHEDOP_shutdown has been called) but the
 domain is not dying yet.
 
+There are six shutdown reasons, which will be displayed after the "s" : B<-rscwS>.
+
+=over 4
+
+=over 4
+
+=item s- : poweroff
+
+Domain exited normally. Clean up and kill.
+
+=item sr : reboot
+
+Clean up, kill, and then restart.
+
+=item ss : suspend
+
+The domain is suspended. Clean up, save suspend info, kill.
+
+=item sc : crash
+
+Tell controller we've crashed.
+
+=item sw : watchdog
+
+Restart because watchdog time expired.
+
+=item sS : soft_reset
+
+Domain asked to perform 'soft reset' for it. The expected behavior is to reset internal Xen state for the domain returning it to the point where it was created but leaving the domain's memory contents and vCPU contexts intact. This will allow the domain to start over and set up all Xen specific interfaces again.
+
+=back
+
+=back
+
 =item B<c - crashed>
 
 The domain has crashed, which is always a violent ending.  Usually
-- 
2.39.2



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

* Re: [PATCH] docs/man: add shutdown reasons to xl (list) man page
  2024-03-05 22:45 [PATCH] docs/man: add shutdown reasons to xl (list) man page zithro / Cyril Rébert
@ 2024-03-06 15:43 ` Anthony PERARD
  2024-03-08 14:13   ` zithro
  2024-03-06 17:02 ` Roger Pau Monné
  1 sibling, 1 reply; 4+ messages in thread
From: Anthony PERARD @ 2024-03-06 15:43 UTC (permalink / raw)
  To: zithro / Cyril Rébert; +Cc: xen-devel, Roger Pau Monné, Wei Liu

On Tue, Mar 05, 2024 at 11:45:13PM +0100, zithro / Cyril Rébert wrote:
> Add the shutdown reasons to the paragraph of "xl list" concerning the
> shutdown status.
> I have copy/pasted the explanations from the source code :
> 
>  - tools/xl/xl_info.c (L379)

Instead of a line number, how about the function name?
 - tools/xl/xl_info.c (list_domains())

>  - xen/include/public/sched.h (starting L158)

And here, I think that would be "sched_shutdown_reason".

Line number tend to change as we add more code, which mean that the line
number is only valid at the time it is written into the patch
description. But functions and struct name are less likely to be
renamed.

> 
> Suggested-by: Roger Pau Monné <roger.pau@citrix.com>
> Signed-off-by: Cyril Rébert / zithro <slack@rabbit.lu>
> ---
>  docs/man/xl.1.pod.in | 34 ++++++++++++++++++++++++++++++++++
>  1 file changed, 34 insertions(+)
> 
> diff --git a/docs/man/xl.1.pod.in b/docs/man/xl.1.pod.in
> index bed8393473..2b046f97f1 100644
> --- a/docs/man/xl.1.pod.in
> +++ b/docs/man/xl.1.pod.in
> @@ -370,6 +370,40 @@ scheduling by the Xen hypervisor.
>  The guest OS has shut down (SCHEDOP_shutdown has been called) but the
>  domain is not dying yet.
>  
> +There are six shutdown reasons, which will be displayed after the "s" : B<-rscwS>.
> +
> +=over 4
> +
> +=over 4
> +
> +=item s- : poweroff

It might look nicer to keep using B<> like the other states, that is
B<s- : poweroff>.

> +
> +Domain exited normally. Clean up and kill.

I don't think we should copy the explanation from "sched.h", they seems
mostly been written for someone writing a toolstack.

A user of `xl` isn't expected to "clean up" an domain in that state,
beside maybe running `xl destroy` because they've added
"on_poweroff=preserve".

> +
> +=item sr : reboot
> +
> +Clean up, kill, and then restart.

Same thing here as an other example, the only action a user can do I
think is `xl destroy`. The "restart" bit is definitely targeted at the
toolstack. There's no way to restart a vm, beside `xl destroy; xl
create`.

> +=item ss : suspend
> +
> +The domain is suspended. Clean up, save suspend info, kill.
> +
> +=item sc : crash
> +
> +Tell controller we've crashed.
> +
> +=item sw : watchdog
> +
> +Restart because watchdog time expired.
> +
> +=item sS : soft_reset
> +
> +Domain asked to perform 'soft reset' for it. The expected behavior is to reset internal Xen state for the domain returning it to the point where it was created but leaving the domain's memory contents and vCPU contexts intact. This will allow the domain to start over and set up all Xen specific interfaces again.
> +
> +=back
> +
> +=back
> +
>  =item B<c - crashed>

This entry is now a duplicate of "sc", I think we can remove it. And
probably keep the explanation.

>  The domain has crashed, which is always a violent ending.  Usually

Thanks,

-- 
Anthony PERARD


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

* Re: [PATCH] docs/man: add shutdown reasons to xl (list) man page
  2024-03-05 22:45 [PATCH] docs/man: add shutdown reasons to xl (list) man page zithro / Cyril Rébert
  2024-03-06 15:43 ` Anthony PERARD
@ 2024-03-06 17:02 ` Roger Pau Monné
  1 sibling, 0 replies; 4+ messages in thread
From: Roger Pau Monné @ 2024-03-06 17:02 UTC (permalink / raw)
  To: zithro / Cyril Rébert; +Cc: xen-devel, Wei Liu, Anthony PERARD

On Tue, Mar 05, 2024 at 11:45:13PM +0100, zithro / Cyril Rébert wrote:
> Add the shutdown reasons to the paragraph of "xl list" concerning the
> shutdown status.
> I have copy/pasted the explanations from the source code :
> 
>  - tools/xl/xl_info.c (L379)
>  - xen/include/public/sched.h (starting L158)
> 
> Suggested-by: Roger Pau Monné <roger.pau@citrix.com>
> Signed-off-by: Cyril Rébert / zithro <slack@rabbit.lu>

Thanks for doing this, Anthony already provided some feedback.

> ---
>  docs/man/xl.1.pod.in | 34 ++++++++++++++++++++++++++++++++++
>  1 file changed, 34 insertions(+)
> 
> diff --git a/docs/man/xl.1.pod.in b/docs/man/xl.1.pod.in
> index bed8393473..2b046f97f1 100644
> --- a/docs/man/xl.1.pod.in
> +++ b/docs/man/xl.1.pod.in
> @@ -370,6 +370,40 @@ scheduling by the Xen hypervisor.
>  The guest OS has shut down (SCHEDOP_shutdown has been called) but the
>  domain is not dying yet.
>  
> +There are six shutdown reasons, which will be displayed after the "s" : B<-rscwS>.
> +
> +=over 4
> +
> +=over 4
> +
> +=item s- : poweroff
> +
> +Domain exited normally. Clean up and kill.
> +
> +=item sr : reboot
> +
> +Clean up, kill, and then restart.
> +
> +=item ss : suspend
> +
> +The domain is suspended. Clean up, save suspend info, kill.
> +
> +=item sc : crash
> +
> +Tell controller we've crashed.
> +
> +=item sw : watchdog
> +
> +Restart because watchdog time expired.
> +
> +=item sS : soft_reset
> +
> +Domain asked to perform 'soft reset' for it. The expected behavior is to reset internal Xen state for the domain returning it to the point where it was created but leaving the domain's memory contents and vCPU contexts intact. This will allow the domain to start over and set up all Xen specific interfaces again.

The man page sources are kept at 80 columns, can you please wrap this
text so it doesn't exceed the 80 col limit?

Roger.


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

* Re: [PATCH] docs/man: add shutdown reasons to xl (list) man page
  2024-03-06 15:43 ` Anthony PERARD
@ 2024-03-08 14:13   ` zithro
  0 siblings, 0 replies; 4+ messages in thread
From: zithro @ 2024-03-08 14:13 UTC (permalink / raw)
  To: Anthony PERARD; +Cc: xen-devel, Roger Pau Monné, Wei Liu

On 06 Mar 2024 16:43, Anthony PERARD wrote:
> On Tue, Mar 05, 2024 at 11:45:13PM +0100, zithro / Cyril Rébert wrote:
>> Add the shutdown reasons to the paragraph of "xl list" concerning the
>> shutdown status.
>> I have copy/pasted the explanations from the source code :
>>
>>   - tools/xl/xl_info.c (L379)
> 
> Instead of a line number, how about the function name?
>   - tools/xl/xl_info.c (list_domains())
> 
>>   - xen/include/public/sched.h (starting L158)
> 
> And here, I think that would be "sched_shutdown_reason".
> 
> Line number tend to change as we add more code, which mean that the line
> number is only valid at the time it is written into the patch
> description. But functions and struct name are less likely to be
> renamed.

Agreed, and for all other remarks too, so will send a v2.
(I'll also add Roger's remark about wrapping the long line).

> <snip>



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

end of thread, other threads:[~2024-03-08 14:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-05 22:45 [PATCH] docs/man: add shutdown reasons to xl (list) man page zithro / Cyril Rébert
2024-03-06 15:43 ` Anthony PERARD
2024-03-08 14:13   ` zithro
2024-03-06 17:02 ` Roger Pau Monné

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.