> Date: Wed, 4 Nov 2020 21:36:17 +0100
> From: Klemens Nanni <[email protected]>
>
> On Mon, Sep 14, 2020 at 07:52:34PM +0200, Klemens Nanni wrote:
> > On Wed, Sep 02, 2020 at 04:58:39PM +0200, Stefan Sperling wrote:
> > > I would like to suggest an example for the EXAMPLES section which
> > > illustrates how a suitable stride factor can be determined (divide the
> > > number of desired "unused" cpus by the number of desired "used" cpus):
> > We can do with an example, but to me yours does not read obvious enough.
> >
> > Also, `vcpu' denotes *virtual* CPUs inside domains, not CPUs on the
> > machine, so "CPU" (without "V") reads off in your example and conflicts
> > with the otherwise consistent mentions of "virtual CPUs" in this manual.
> >
> > Here's my last diff incl. an example which reads a tad clearer to me and
> > is placed in the EXAMPLES section instead.
> >
> > Feedback? OK?
> Ping. Diff reattached.
stride is not a factor, so your description makes no sense to me.
a stride of 4 means we allocate VCPUs 4-at-a-time but only assign 1 of
those to the domain. It is a step size.
> Index: ldom.conf.5
> ===================================================================
> RCS file: /cvs/src/usr.sbin/ldomctl/ldom.conf.5,v
> retrieving revision 1.13
> diff -u -p -r1.13 ldom.conf.5
> --- ldom.conf.5 21 Feb 2020 19:39:28 -0000 1.13
> +++ ldom.conf.5 14 Sep 2020 17:51:39 -0000
> @@ -38,8 +38,13 @@ If no configuration for the primary doma
> all CPU and memory resources not used by any guest domains.
> .It Ic vcpu Ar number Ns Op : Ns Ar stride
> Declare the number of virtual CPUs assigned to a domain.
> -Optionally a stride can be specified to allocate additional virtual CPUs
> -but not assign them to a domain.
> +Optionally a stride factor can be specified to allocate
> +.Ar number
> +virtual CPUs
> +.Ar stride
> +times but not assign more than
> +.Ar number
> +virtual CPUs to a domain, leaving the rest unassigned.
> This can be used to distribute virtual CPUs over the available CPU cores.
> .It Ic memory Ar bytes
> Declare the amount of memory assigned to a domain, in bytes.
> @@ -112,6 +117,20 @@ domain "salmah" {
> .Pp
> On a machine with 32 cores and 64GB physical memory, this leaves 12 cores and
> 58GB memory to the primary domain.
> +.Pp
> +Use
> +.Ar stride
> +factors to distribute virtual CPUs:
> +.Bd -literal -offset indent
> +domain "sun" {
> + vcpu 2:4
> + memory 4G
> + vdisk "/home/sun/vdisk0"
> +}
> +.Ed
> +On a machine with eight threads per physical core, this allocates four
> strides
> +of two virtual CPUs to the guest domain but only assigns one stride to it,
> i.e.
> +make it occupy an entire physical core while running on only two threads.
> .Sh SEE ALSO
> .Xr eeprom 8 ,
> .Xr ldomctl 8 ,
>
>