Ori Bernstein [Sat, 23 Jan 2021 19:03:05 +0000 (11:03 -0800)]
upas/runq: support parallel queue processing, drop -a
When running a mail queue, it's useful to run it with limited
parallelism. This helps mailing lists process messages in a
reasonable time.
At the same time, we can remove the load balancing from runq,
since the kinds of systems that this matters on no longer
exist, and running multiple queues at once can be better
done through xargs.
Sigrid [Fri, 22 Jan 2021 09:15:36 +0000 (10:15 +0100)]
stats: don't query battery and temp as often when using acpi
Querying battery (or temperature) using ACPI takes quite some
resources, which makes the battery discharge faster. It doesn't make
much sense to have it queried as often either. So, when using ACPI:
1) set battery query period to 10s minimum
2) set temperature query period to 5s minimum
When _startbuf is invoked, it would crash on the second invocation
if creating a mux segment failed. This is because the first attempt
would assign the return value -1 to the global mux variable, and
the second attempt would notice that the global mux was not nil,
and would attempt to use it.
This change only assigns to the global variable if the allocation
of the segment was a success.
While we're here, we should also check the return of the rfork call.
Ori Bernstein [Mon, 18 Jan 2021 02:01:53 +0000 (18:01 -0800)]
passwd: make legacy mode explicit
Passwd used to produce a very confusing error
about DES not being enabled whenever the password
was mistyped. This happened because we attempted
to guess what authentication method to use, and
preseneted the error from the wrong one on failure.
This puts the legacy mode behind a flag, so that
we don't even try the old method unless it's
explicitly requested.
cinap_lenrek [Sun, 17 Jan 2021 20:21:12 +0000 (21:21 +0100)]
pc, pc64: add minimal HPET driver to measure LAPIC and TSC frequencies
This adds the new function pointer PCArch.clockinit(),
which is a timer dependent initialization routine.
It also takes over the job of guesscpuhz(). This way, the
architecture ident code can switch between different
timers (i8253, HPET and XEN timer).
cinap_lenrek [Sun, 10 Jan 2021 19:44:58 +0000 (20:44 +0100)]
pc, pc64: revert addition of pcireset() call to pcicfginit()
Revert the change, as it causes system lockups on bootup
on some systems with USB OHCI controllers, suspected to be
caused by BIOS/SMM accessing the device as BIOS handover
has not been executed yet.
We might bring that back when the problem has is better
understood.
Ori Bernstein [Wed, 6 Jan 2021 03:37:26 +0000 (19:37 -0800)]
acid: increase hash size (thanks jonas.amoson)
when loading large binaries such as netsurf, with many
symbols, our hash table fills up with collisions and
loading the symbol table gets very slow. Bumping it up
drops the time to lstk() in acid on netsurf from 4 minutes
to 8 seconds.
Alex Musolino [Tue, 5 Jan 2021 12:06:03 +0000 (22:36 +1030)]
qr: fix exit status
Call exits(0) instead of returning from main. Also call sysfatal if
writing of image data fails. Previously, qr(1) would exit with
default non-nil status "main" unconditionally as a result of returning
from main.
cinap_lenrek [Sun, 27 Dec 2020 22:08:59 +0000 (23:08 +0100)]
devvga: implement screen tilting, remove panning and overlays
Tilting allows using left/right rotated or invetrted display orientation.
This can be changed at runtime such as: echo tilt right > /dev/vgactl
This removes the old panning and vga overlays as they are only implemented
with some ancient vga controllers.
cinap_lenrek [Wed, 23 Dec 2020 01:31:28 +0000 (02:31 +0100)]
libc: re-implement getuser() by stating /proc/$pid/status
The idea is to avoid the magic files that contain
per process information in devcons when possible.
It will make it easier to deprecate them in the future.
cinap_lenrek [Tue, 22 Dec 2020 15:29:55 +0000 (16:29 +0100)]
kernel: avoid palloc lock during mmurelease()
Previously, mmurelease() was always called with
palloc spinlock held.
This is unneccesary for some mmurelease()
implementations as they wont release pages
to the palloc pool.
This change removes pagechainhead() and
pagechaindone() and replaces them with just
freepages() call, which aquires the palloc
lock internally as needed.
freepages() avoids holding the palloc lock
while walking the linked list of pages,
avoding some lock contention.
cinap_lenrek [Sun, 20 Dec 2020 22:08:11 +0000 (23:08 +0100)]
ndb/dns: handle dnskey RR's (thanks moody)
On 12/18/20, Jacob Moody wrote:
> Hello,
>
> I recently ran in to some issues with pointing an unbound server towards a
> 9front dns server as its upstream.
> The parsing seemed to fail when ndb/dns received a DNSKEY RR from it's own
> upstream source on behalf of unbound.
> This patch catches and stores the DNSKEY from the upstream server to prevent
> this.
cinap_lenrek [Sun, 20 Dec 2020 21:34:41 +0000 (22:34 +0100)]
kernel: handle tos and per process pcycle counters in port/
we might as well handle the per process cycle
counter in the portable part instead of duplicating the code
in every arch and have inconsistent implementations.
we now have a portable kenter() and kexit() function,
that is ment to be used in trap/syscall from user,
which updates the counters.