Age | Commit message (Collapse) | Author |
|
ok millert mpi
|
|
Change distance sensor type to be displayed as meters with 3 decimals
instead of millimeters.
ok mpi@ kettenis@
|
|
Because of hw.smt we need a way to determine whether a given CPU is "online"
or "offline" from userspace. KERN_CPTIME2 is an array, and so cannot be
cleanly extended for this purpose, so add a new sysctl(2) KERN_CPUSTATS
with an extensible struct. At the moment it's just KERN_CPTIME2 with a
flags member, but it can grow as needed.
KERN_CPUSTATS appears to have been defined by BSDi long ago, but there are
few (if any) packages in the wild still using the symbol so breakage in ports
should be near zero. No other system inherited the symbol from BSDi, either.
Then, use the new sysctl(2) in systat(1) and top(1):
- systat(1) draws placeholder marks ('-') instead of percentages for
offline CPUs in the cpu view.
- systat(1) omits offline CPU ticks when drawing the "big bar" in
the vmstat view. The upshot is that the bar isn't half idle when
half your logical CPUs are disabled.
- top(1) does not draw lines for offline CPUs; if CPUs toggle on or
offline in interactive mode we redraw the display to expand/reduce
space for the new/missing CPUs. This is consistent with what some
top(1) implementations do on Linux.
- top(1) omits offline CPUs from the totals when CPU totals are
combined into a single line (the '-1' flag).
Originally prompted by deraadt@. Discussed endlessly with deraadt@,
ketennis@, and sthen@. Tested by jmc@ and jca@. Earlier versions also
discussed with jca@. Earlier versions tested by jmc@, tb@, and many
others.
docs ok jmc@, kernel bits ok ketennis@, everything ok sthen@,
"Is your stuff in yet?" deraadt@
|
|
ok kettenis deraadt
|
|
This lets userspace distinguish between idle CPUs and those that are
not schedulable because hw.smt=0.
A subsequent commit probably needs to add documentation for this
to sysctl.2 (and perhaps elsewhere) after the dust settles.
Also included here are changes to systat(1) and top(1) that account
for the ENODEV case and adjust behavior accordingly:
- systat(1)'s cpu view prints placeholder marks ('-') instead of
percentages for each state if the given CPU is offline.
- systat(1)'s vmstat view checks for offline CPUs when computing the
machine state total and excludes them, so the CPU usage graph
only represents the states for online CPUs.
- top(1) does not draw CPU rows for offline CPUs when the view is
redrawn. If CPUs "go offline", percentages for each state are
replaced by placeholder marks ('-'); the view will need to be
redrawn to remove these rows. If CPUs "go online" the view will
need to be redrawn to show these new CPUs. In "combined CPU" mode,
the count and the state totals only represent online CPUs.
Ports using KERN_CPTIME2 will need to be updated. The changes
described above to make systat(1) and top(1) aware of the ENODEV
case *and* gracefully handle a changing HW_NCPUONLINE while the
application is running are not necessarily appropriate for each
and every port.
The changes described above are so extensive in part to demonstrate
one way a program *might* be made robust to changing CPU availability.
In particular, changing hw.smt after boot is an extremely rare event,
and this needs to be weighed when updating ports.
The logic needed to account for the KERN_CPTIME2 ENODEV case is
very roughly:
if (sysctl(...) == -1) {
if (errno != ENODEV) {
/* Actual error occurred. */
} else {
/* CPU is offline. */
}
} else {
/* CPU is online and CPU states were set by sysctl(2). */
}
Prompted by deraadt@. Basic idea for ENODEV from kettenis@. Discussed at
length with kettenis@. Additional testing by tb@.
No complaints from hackers@ after a week.
ok kettenis@, "I think you should commit [now]" deraadt@
|
|
returning const char *.
|
|
Noted by jca, thanks.
OK jca claudio
|
|
from Marcus MERIGHI; OK deraadt@ jmc@
|
|
from marcus merighi
ok benno
|
|
displayed lines. Makes vmstat view in tall windows easier to read.
ok sthen@
|
|
removing unused uvmexp fields. Reduces number of lines as well.
|
|
|
|
unusedNN.
Missing man page bits pointed out by
jmc@. Ports source scan by sthen@.
ok deraadt@ guenther@
|
|
OK krw@
|
|
|
|
Feedbacks, tweaks, ok bluhm@
|
|
a busy machine would look idle. As %Nic does not fit in the columns,
add it to %Usr. Introduce @ for spinning time to keep the characters
people are used to. Put %Spn between %Int and %Sys like in top.
OK visa@ mpi@
|
|
system time.
Introduce a new CP_SPIN "scheduler state" and modify userland tools
to display the % of timer a CPU spents spinning.
Based on a diff from jmatthew@, ok pirofti@, bluhm@, visa@, deraadt@
|
|
ok tb@
|
|
shown columns. There's still parts that could do with a good polishing,
but it's an improvement.
OK tedu@
|
|
Prompted by and OK otto@
|
|
This command shows the available orderings for the current view, which
ordering is active, their shortcuts, and if they're in reverse order.
manpage nits jmc@
OK tedu@
|
|
this makes a large number of GCs appear as something like "26K"
instead of "*".
|
|
OK deraadt
|
|
The FQ-CoDel related configuration (flows, quantum) becomes available
for the regular bandwidth queue. Internally the kernel will pick the
FQ-CoDel for use as a queue manager for the specified class instead of
the FIFO.
Discussed with and OK henning@ at d2k17 as a part of a larger diff.
|
|
previously it would figure out if there's enough items overall for
all the cpus to have full active an inactive free lists. this
included currently allocated items, which pools wont actually hold
on a free list and cannot predict when they will come back.
instead, see if there's enough items in the idle lists in the depot
that could instead go on all the free lists on the cpus. if there's
enough idle items, then we can grow.
tested by hrvoje popovski and amit kulkarni
ok visa@
|
|
ok mikeb@ millert@
|
|
time_second. Since time_second changes depending on the wall-
clock time, time_second is not a reliable source for the status.
We can even end up with a negative time delta. Thus, use the
monotonically growing time_uptime and export it to userland.
ok bluhm@ mikeb@
|
|
This (ab)uses the fact that node->qstats.data.period field in
hfsc_class_stats structure is at the same offset as the 'flows'
field in fqcodel_stats.
While here make use of a presently empty field "SCH" to display
the queue management policy (flow or fifo) which is not strictly
a scheduler, but it will hopefully become descriptive and useful
later. This distinguishes flow queues from the regular HFSC ones.
OK sthen, visa
|
|
Carl Mascott has reported the issue and helped with the fix. OK tb
|
|
|
|
Since only leaf queues can have packets assigned to them,
H-FSC requires the user specified root queue to have a
parent. To simplify userland tools and the configuration
interface, the kernel can be leveraged to set it up.
ok henning
|
|
nits from deraadt@
ok krw@ guenther@ kettenis@
|
|
w/ millert
|
|
|
|
ok deraadt@
|
|
incoming socket, so userspace doesn't need to set it unless it has its
own reasons for tracking the size along with the sockaddr.
ok phessler@ deraadt@ florian@
|
|
Leftovers from the re-engining of systat eight years ago. Makes gcc
quieter.
ok otto@ deraadt@
|
|
'vetherXY' fits
ok deraadt@ mpi@
|
|
in case line numbers and/or PAUSED is shown; ok tedu@
|
|
|
|
ok deraadt@
|
|
Convert bzero() to memset() and bcopy() to memcpy()
ok natano@ millert@
|
|
in systat
ok canacar@
|
|
removal from mbuf.h. ok mpi@
|
|
|
|
1. peak and rate computations were using uint32 size which caused
the fields from working for states that transferred more than 4GB
also fix an unnecessary cast to double found while looking for the bug.
2. When creating new cache entries for existing states, start time from
0 rather than the current time to prevent a "spike" in rate and peak.
|
|
loglevel_to_string() uses "unknown" as well)
ok kettenis@ florian@
|
|
ok kettenis@ florian@
|
|
remove useless decleration of variable change.
ok kettenis@ florian@
|