Project

General

Profile

Actions

Bug #16079

closed

rsrvrctl could be consistent with memory size units

Added by Jordan Hendricks 3 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Category:
bhyve
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:

Description

The userland tool rsrvrctl can be used to query and manipulate the VMM reservoir. The -q option reports output in KiB, but all other commands take MiB units.

e.g., for querying:

$ pfexec /usr/lib/rsrvrctl -q
Free KiB:       1024
Allocated KiB:  0
Transient Allocated KiB:        0
Size limit KiB: 31882370

but for removing memory:

$ pfexec /usr/lib/rsrvrctl -a 1
$ pfexec /usr/lib/rsrvrctl -q
Free KiB:       1024
Allocated KiB:  0
Transient Allocated KiB:        0
Size limit KiB: 31882370

It would be nice for the -q option to report the same unit size as the other arguments.

Actions #1

Updated by Jordan Hendricks 3 months ago

  • Category set to bhyve
Actions #2

Updated by Electric Monk 3 months ago

  • Gerrit CR set to 3151
Actions #3

Updated by Jordan Hendricks 3 months ago

I changed the -q option to report MiB instead of KiB.

Testing notes
An example of me querying the reservoir, adding 1 MiB to it, querying it, removing all memory in it then querying again:

jordan@rodman:~/src/helios/projects/illumos/proto$ pfexec root_i386/usr/lib/rsrvrctl -q
Free MiB:       6
Allocated MiB:  0
Transient Allocated MiB:        0
Size limit MiB: 31135
jordan@rodman:~/src/helios/projects/illumos/proto$ pfexec root_i386/usr/lib/rsrvrctl -a 1
jordan@rodman:~/src/helios/projects/illumos/proto$ pfexec root_i386/usr/lib/rsrvrctl -q  
Free MiB:       7
Allocated MiB:  0
Transient Allocated MiB:        0
Size limit MiB: 31135
jordan@rodman:~/src/helios/projects/illumos/proto$ pfexec root_i386/usr/lib/rsrvrctl -r 7
jordan@rodman:~/src/helios/projects/illumos/proto$ pfexec root_i386/usr/lib/rsrvrctl -q                                                                                                                                                                      
Free MiB:       0
Allocated MiB:  0
Transient Allocated MiB:        0
Size limit MiB: 31135
Actions #4

Updated by Electric Monk 3 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 40fc84a2910bb99408fbe8d10a06d5d5f1eaf953

commit  40fc84a2910bb99408fbe8d10a06d5d5f1eaf953
Author: Jordan Paige Hendricks <jordan@oxide.computer>
Date:   2023-11-22T18:49:33.000Z

    16079 rsrvrctl could be consistent with memory size units
    15561 VMM reservoir block comment is misleading about total reservoir limit
    Reviewed by: Patrick Mooney <pmooney@pfmooney.com>
    Approved by: Dan McDonald <danmcd@mnx.io>

Actions

Also available in: Atom PDF