On Sun, Jan 08, 2023 at 10:45:11AM -0800, Philip Guenther wrote:
> On Sun, Jan 8, 2023 at 8:50 AM Dave Voutila <d...@sisu.io> wrote:
> 
> > Now that guenther@ landed thread names, this should help users
> > understand vmd host cpu utilization better as it lets us distinguish
> > between the libevent thread and the vcpu thread.
> >
> > Example ps output:
> >
> > $ ps -AHf | grep vmd
> > 30584  502984 p2  S+p      0:00.76 | |-- obj/vmd -d
> > 46975  512305 ??  Sc       0:00.01 | | |-- vmd: priv (vmd)
> > 39911  487276 ??  Spc      0:00.76 | | |-- vmd: control (vmd)
> > 58206  418514 ??  Spc      0:00.01 | | |-- vmd: vmm (vmd)
> > 43525  215149 ??  Sp       0:00.00 | | | |-- vmd: openbsd (vmd/event)
> > 43525  316255 ??  Rp/5     0:00.77 | | | |-- vmd: openbsd (vmd/vcpu-0)
> > 43525  270611 ??  Sp       0:00.00 | | | `-- vmd: openbsd (vmd)
> > 43206  562455 ??  Spc      0:00.01 | | |-- vmd: agentx (vmd)
> > 70005  431096 p3  R+p/9    0:00.00 | |-- grep vmd
> >
> > ok?
> >
>  ...
> 
> > --- usr.sbin/vmd/vm.c
> > +++ usr.sbin/vmd/vm.c
> > ...
> > @@ -1353,6 +1355,10 @@ run_vm(int child_cdrom, int
> > child_disks[][VM_MAX_BASE_
> >                             __func__, i);
> >                         return (ret);
> >                 }
> > +
> > +               memset(tname, 0, sizeof(tname));
> >
> 
> Delete the memset(); the API requires a C string and snprintf() already
> guarantees that.
> 
> Other than that, ok guenther!

ok mlarkin also if not already taken care of

Reply via email to