Re: [Xen-devel] How about use different "max_grant_frames" for different domains?

2016-05-27 Thread Jan Beulich
>>> On 27.05.16 at 04:54,  wrote:
> Because the boosting CPU and memory resources on server, Xen users are allowed
> and actually do create lots of vdisk and vnic, e.g., 6 vnic, 20 vdisk and 24
> vcpu (the number of vnic queue is proportional to the number of vcpu assigned
> to guest), and this requires the administrator to increase the value of
> "max_grant_frames" by changing cmdline param or DEFAULT_MAX_NR_GRANT_FRAMES in
> Xen hypervisor.  Currently, all Xen guests share the same "max_grant_frames" 
> in
> Xen hypervisor, that is, if we increase the grant frame because of one VM, all
> other VMs' grant frame limit will increase as well. 
> 
> Therefore, please let me know if using an individual "max_grant_frames" 
> instead
> of a global variable is reasonable? How about if we relocate this variable to
> "struct grant_table" or "struct domain"?

Why not? I think this being global simply was of no concern so far.

Jan


___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


[Xen-devel] How about use different "max_grant_frames" for different domains?

2016-05-26 Thread Dongli Zhang
Hi,

Because the boosting CPU and memory resources on server, Xen users are allowed
and actually do create lots of vdisk and vnic, e.g., 6 vnic, 20 vdisk and 24
vcpu (the number of vnic queue is proportional to the number of vcpu assigned
to guest), and this requires the administrator to increase the value of
"max_grant_frames" by changing cmdline param or DEFAULT_MAX_NR_GRANT_FRAMES in
Xen hypervisor.  Currently, all Xen guests share the same "max_grant_frames" in
Xen hypervisor, that is, if we increase the grant frame because of one VM, all
other VMs' grant frame limit will increase as well. 

Therefore, please let me know if using an individual "max_grant_frames" instead
of a global variable is reasonable? How about if we relocate this variable to
"struct grant_table" or "struct domain"?

This would require changes in both xen hypervisor and xen tools, e.g.,
1. A new "do_grant_table_op cmd" or "do_domctl cmd" to allow Dom0 to increase
the grant frame number for a specific domain. Dom0 would be able to use this
interface to change the grant frame number for VM initially in
"libxl__build_pre" and libxc or later via new xl command.
2. Change in xen tools "parse_config_data()" to allow administrator to add new
param to vm.cfg, e.g, "max_nr_frame=128".
3. This also requires a lot of changes in xen hypervisor so that all refers to
global "max_grant_frames" should redirect to domain specific variable (e.g.,
domain->max_grant_frames) now.

Please let me know the feedback. If this is reasonable, I will work on patches.

Thank you very much!

Dongli Zhang



___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel