tools/libxl: include scheduler parameters in the output of xl list -l
PATCH 1/1 tools/libxl: include scheduler parameters in the output of xl list -l
---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
---
This should be backported to all supported stable branches (4.6, 4.7, 4.8).
--- tools/libxl/libxl.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
tools/libxl/libxl.c +10 -0
@@ -6925,6 +6925,16 @@ int libxl_retrieve_domain_configuration(libxl_ctx *ctx, uint32_t domid, } } +/* Scheduler params */ + { + rc =libxl_domain_sched_params_get (ctx, domid, + &d_config->b_info.sched_params); +if (rc) { +LOGD (ERROR , domid,"Fail to get scheduler parameters" ); + goto out; + } + } + out:if (lock)libxl__unlock_domain_userdata (lock);CTX_UNLOCK ;
Signature · 7 lines
2.10.1 (Apple Git-78) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 16 lines · Roger Pau Monne
Signed-off-by Roger Pau Monné <[email protected]>Reported-by Fatih Acar <[email protected]>---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
---
This should be backported to all supported stable branches (4.6, 4.7, 4.8).--- tools/libxl/libxl.c | 10 ++++++++++ 1 file changed, 10 insertions(+)tools/libxl/libxl.c +0
-0
tools/libxl/libxl.c int libxl_retrieve_domain_configuration(libxl_ctx *ctx, uint32_t domid, · line 6929
Quoted 5 lines
tools/libxl/libxl.c +2
-0@@ -6925,6 +6925,16 @@ int libxl_retrieve_domain_configuration(libxl_ctx *ctx, uint32_t domid, } } +/* Scheduler params */ + {
Please add the following:
libxl_sched_params_dispose(&d_config->b_info.sched_params); libxl_sched_params_init(&d_config->b_info.sched_params);
Also I would like to move this block before device handling.
Quoted 14 lines
tools/libxl/libxl.c +8
-0+ rc =libxl_domain_sched_params_get (ctx, domid, + &d_config->b_info.sched_params); +if (rc) { +LOGD (ERROR , domid,"Fail to get scheduler parameters" ); + goto out; + } + } + out:if (lock)libxl__unlock_domain_userdata (lock);CTX_UNLOCK ;Signature · 1 line
2.10.1 (Apple Git-78)
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 20 lines · Wei Liu
Quoted 19 lines · Roger Pau Monne
Signed-off-by Roger Pau Monné <[email protected]>Reported-by Fatih Acar <[email protected]>---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
---
This should be backported to all supported stable branches (4.6, 4.7, 4.8).--- tools/libxl/libxl.c | 10 ++++++++++ 1 file changed, 10 insertions(+)tools/libxl/libxl.c +0
-0@@ -6925,6 +6925,16 @@ int libxl_retrieve_domain_configuration(libxl_ctx *ctx, uint32_t domid, } }
Quoted 7 lines
tools/libxl/libxl.c int libxl_retrieve_domain_configuration(libxl_ctx *ctx, uint32_t domid, · line 6929
Quoted 2 lines
tools/libxl/libxl.c +2
-0+/* Scheduler params */ + {Please add the following:
libxl_sched_params_dispose(&d_config->b_info.sched_params);libxl_sched_params_init(&d_config->b_info.sched_params);
libxl_domain_sched_params_get already calls libxl_sched_params_init which performs a memset plus sets the default values, so I don't see the need to call _dispose and _init from libxl_retrieve_domain_configuration.
Quoted 1 line
Also I would like to move this block before device handling.
I can certainly do that.
Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 26 lines · Roger Pau Monne
Quoted 25 lines · Wei Liu
Quoted 16 lines · Roger Pau Monne
Signed-off-by Roger Pau Monné <[email protected]>Reported-by Fatih Acar <[email protected]>---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
---
This should be backported to all supported stable branches (4.6, 4.7, 4.8).--- tools/libxl/libxl.c | 10 ++++++++++ 1 file changed, 10 insertions(+)tools/libxl/libxl.c +0
-0tools/libxl/libxl.c int libxl_retrieve_domain_configuration(libxl_ctx *ctx, uint32_t domid, · line 6929
Quoted 5 lines
tools/libxl/libxl.c +2
-0@@ -6925,6 +6925,16 @@ int libxl_retrieve_domain_configuration(libxl_ctx *ctx, uint32_t domid, } } +/* Scheduler params */ + {Please add the following:
Quoted 7 lines
Quoted 2 lines
libxl_sched_params_dispose(&d_config->b_info.sched_params);libxl_sched_params_init(&d_config->b_info.sched_params);
libxl_domain_sched_params_getalready callslibxl_sched_params_initwhich performs a memset plus sets the default values, so I don't see the need to call_disposeand_initfromlibxl_retrieve_domain_configuration.
At the very least please call _dispose. The _init call can be dropped.
Quoted 6 lines
Quoted 1 line
Also I would like to move this block before device handling.
I can certainly do that.
Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 30 lines · Wei Liu
Quoted 29 lines · Roger Pau Monne
Quoted 27 lines · Wei Liu
Quoted 16 lines · Roger Pau Monne
Signed-off-by Roger Pau Monné <[email protected]>Reported-by Fatih Acar <[email protected]>---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
---
This should be backported to all supported stable branches (4.6, 4.7, 4.8).--- tools/libxl/libxl.c | 10 ++++++++++ 1 file changed, 10 insertions(+)tools/libxl/libxl.c +0
-0tools/libxl/libxl.c int libxl_retrieve_domain_configuration(libxl_ctx *ctx, uint32_t domid, · line 6929
Quoted 5 lines
tools/libxl/libxl.c +2
-0@@ -6925,6 +6925,16 @@ int libxl_retrieve_domain_configuration(libxl_ctx *ctx, uint32_t domid, } } +/* Scheduler params */ + {Please add the following:
libxl_sched_params_dispose(&d_config->b_info.sched_params);libxl_sched_params_init(&d_config->b_info.sched_params);
Quoted 6 lines
Quoted 4 lines
libxl_domain_sched_params_getalready callslibxl_sched_params_initwhich performs a memset plus sets the default values, so I don't see the need to call_disposeand_initfromlibxl_retrieve_domain_configuration.At the very least please call
_dispose. The_initcall can be dropped.
If the _dispose call is really needed, shouldn't it be added to libxl_domain_sched_params_get? It seems asymmetric IMHO to do the _init call inside of libxl_domain_sched_params_get but not the _dispose one (which I still think it's unneeded).
Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 36 lines · Roger Pau Monne
Quoted 35 lines · Wei Liu
Quoted 33 lines · Roger Pau Monne
Quoted 20 lines · Wei Liu
Quoted 19 lines · Roger Pau Monne
Signed-off-by Roger Pau Monné <[email protected]>Reported-by Fatih Acar <[email protected]>---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
---
This should be backported to all supported stable branches (4.6, 4.7, 4.8).--- tools/libxl/libxl.c | 10 ++++++++++ 1 file changed, 10 insertions(+)tools/libxl/libxl.c +0
-0@@ -6925,6 +6925,16 @@ int libxl_retrieve_domain_configuration(libxl_ctx *ctx, uint32_t domid, } }Quoted 7 lines
tools/libxl/libxl.c int libxl_retrieve_domain_configuration(libxl_ctx *ctx, uint32_t domid, · line 6929
Quoted 2 lines
tools/libxl/libxl.c +2
-0+/* Scheduler params */ + {Please add the following:
libxl_sched_params_dispose(&d_config->b_info.sched_params);libxl_sched_params_init(&d_config->b_info.sched_params);
libxl_domain_sched_params_getalready callslibxl_sched_params_initwhich performs a memset plus sets the default values, so I don't see the need to call_disposeand_initfromlibxl_retrieve_domain_configuration.
Quoted 7 lines
Quoted 1 line
At the very least please call
_dispose. The_initcall can be dropped.If the
_disposecall is really needed, shouldn't it be added tolibxl_domain_sched_params_get? It seems asymmetric IMHO to do the_initcall inside oflibxl_domain_sched_params_getbut not the_disposeone (which I still think it's unneeded).
Missed this email yesterday, sorry.
libxl_domain_sched_params_get was written before we codified how libxl types should be used, so it is not exactly in line with newer code. It is too late to change that now.
So yes, _dispose is needed, and it shouldn't be added to _sched_params_get.
Wei.
Quoted 1 line
Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel