Commit graph

10703 commits

Author SHA1 Message Date
sl
91916b6896 /sys/games/lib/fortunes: redaction day 2024-08-02 03:06:08 +00:00
aap
d6d02abde5 libframe: always draw tick with current TEXT color. 2024-08-01 14:51:00 +00:00
Jacob Moody
9c0f4aa0e5 9p(2): typos
The changes from british to american spelling here follows
what spell(1) thinks, and seems to be more common based on
other manual pages.
2024-08-01 14:33:32 +00:00
qwx
f00a88b509 /sys/lib/dist/ndb/common: add hjgit port, remove unused 2024-08-01 14:31:59 +00:00
sl
030feef162 /lib/1oct1993: add troff files. 2024-08-01 00:15:51 +00:00
sl
dc959fbc94 /lib/1oct1993: replace text file with directory of troff source files. 2024-08-01 00:07:45 +00:00
Ori Bernstein
462464ff4a ape/patch: also kill ape/patch 2024-07-30 17:36:02 +00:00
Ori Bernstein
76fe6e9693 ape/diff: one more ancient, unmaintained, buggy gnu utility gone 2024-07-30 17:13:21 +00:00
Ori Bernstein
2a47e4f086 hgfs: use merge3 2024-07-30 17:12:03 +00:00
Ori Bernstein
2dc68de342 git: use native merge3 program instead of ape/diff3 2024-07-30 01:55:29 +00:00
Ori Bernstein
0136b08a10 merge3: fix exit conditions -- l, r are never nil 2024-07-30 00:42:51 +00:00
Ori Bernstein
c409b9127d gefs: correct in-memory directory length for DMAPPEND files (thanks cinap)
when appending to a directory, the copy of the offset in the dent was
set to the offset that the write was supposed to happen at -- however,
for DMAPPEND files the offset is always at the end of the file. Until
the file was closed, stat would show the wrong directory info.
2024-07-29 00:37:33 +00:00
Jacob Moody
821e6690d3 2l(1): add 7l and 9l 2024-07-28 20:41:59 +00:00
Jacob Moody
f9212297bd 2c(1): add 9c 2024-07-28 20:17:16 +00:00
cinap_lenrek
67b0aeb219 ipmux: implement hangup ctl
Implement a hangup ctl command that flushes the
queues, but keeps the filter around.

This can be usefull for low-overhead traffic blocking,
as only the file-descriptor needs to be kept around
and the queues can be flushed.

No user-space process is needed to consume packets
and no buffers are wasted.

example:

aux/dial -e -o hangup 'ipmux!ver=4;src=8.8.8.8' rc -c 'echo 0 > /srv/blocked'

rm /srv/blocked
2024-07-28 19:40:54 +00:00
Ori Bernstein
460b007c35 gefs: we need an agetv for the qgen on 32 bit systems 2024-07-28 16:26:33 +00:00
cinap_lenrek
75ac2674de devip: do not raise error from ipoput*()
It seems some protocols are unprepared to
deal with ipoput*() raising an error
(thrown from ifc->m->bwrite()).

so catch it and return -1 (no route) instead.
2024-07-28 00:32:14 +00:00
cinap_lenrek
520d698c3e devip: same for loopbackmedium... 2024-07-27 22:22:55 +00:00
cinap_lenrek
c91d99c5de devip: dont shoot the messenger (dont unbind the interface when ipipu4/ipiput6 errors)
The medium should only self-unbind when we get a read error
from the device, not when ipiput4/8() throw an error,
which can happen for the nullmedium.
2024-07-27 22:03:48 +00:00
Ori Bernstein
439a525113 git: rewrite entcmp to be single pass, less stupid
move to single pass strcmp variant that knows about trailing '/' rule.
2024-07-27 15:36:23 +00:00
Jacob Moody
605bed312a devip: fix masks in ipmux filters
We were accidentally searching the key for '&', instead of the value.
Inferno received this exact fix at some point, but it never made it back to Plan 9.
2024-07-26 22:03:34 +00:00
Ori Bernstein
5ae675bebd libmp: sidestep git bug for now
the installed version of git has a bug; removing
this file will trigger some spurious removals of
test files, so hold off deleting it until people
have time to install a fixed git
2024-07-26 03:01:56 +00:00
Ori Bernstein
5eb5831b05 git/query: use git entry sorting when computing dir diff
directories need to sort as though they end with a '/',
when running through them for comparison, otherwise we
flag files as added and removed spuriously, leading to
them incorrectly getting deleted when merging commits.
2024-07-26 02:44:21 +00:00
Ori Bernstein
c220d0acc6 libmp: remove stale test file
we moved it to test/, so no need for the
old one.
2024-07-25 00:10:51 +00:00
cinap_lenrek
42940399b8 kernel: use flag and integer to handle affinity
Instead of Proc { Mach *mp; Mach *wired; },
track affinity by an integer representing
the mach number instead.

This simplifies the code as it avoids needing
to compare with MACHP(m->machno).

Wiering a process to a processor is now done
by just assigning affinity and then set a flag
that it should not change.

Call procpriority() when we want to change
priority of a process instead of managing
the fields directly.
2024-07-24 19:55:42 +00:00
Ori Bernstein
487c2dc215 git: provide symref extension 2024-07-23 23:42:59 +00:00
cinap_lenrek
703bcae2ed kernel: only reset processor affinity p->mp when p->wired == nil 2024-07-23 22:29:13 +00:00
cinap_lenrek
cbbce6b301 ip/ipconfig: fix logic bug (thanks cgnarne)
We must not skip conf.preflt == 0 (only conf.validlt == 0)
so that we can change the kernels preflt timeout.
2024-07-23 21:35:51 +00:00
cinap_lenrek
2076c934d0 kernel: make schedinit() _Noreturn void 2024-07-23 21:23:26 +00:00
cinap_lenrek
8a6c61c8ef kernel: remove global balancetime variable -> make function static 2024-07-23 21:03:08 +00:00
cinap_lenrek
4a7c44fee4 kernel: improve nlocks print in sleep() 2024-07-23 21:00:04 +00:00
cinap_lenrek
f1e7d6da67 kernel: sched() should not imply spllo()
The idea is:

When we call sched() with interrupts disabled,
it must not return with them re-enabled.

The code becomes easier to reason about if
we make sched() preserve interrupt status,
which lets us call sched() from an interrupt
handler (with interrupts disabled) without
risking preemption by another interrupt once
sched() returns which can pump-up the stack.

This allows removing Proc.preempted flag as
it is now impossible for interrupts to
preempt each other in preempted().

Extra cleanups:

make interrupted() _Noreturn void
and remove unused Proc.yield flag.
2024-07-23 19:50:36 +00:00
cinap_lenrek
fc859af624 etherimx: fix missing barrier for doorbell (thanks sigrid)
the symptom is that ping is apparently skipping
transmits which recover with the next send,
resulting in exactly send-period spikes in
the ping rtt.

It appears that the core seems to reorder writes
to uncached memory, which can result in the doorbell
being written before the descriptor status bits
are written.

put a coherence() barrier before writing doorbell
fixes it.

thanks sigrid for reporting the issue!
2024-07-21 17:35:18 +00:00
cinap_lenrek
3598b7cf36 kernel: hack processor affinity to allow load sharing
On a multiprocessor, the scheduler can run into
a very unfair distribution of processes to cpus
when there are more long-running processes than cpus.

Say we have a 4 cpu machine and we run 4 long-running
proesses, each cpu will pick up a single process
and each process will get 100% of its fair share.

Everything is good so far.

If we start more long-running processes, all these
processes are going to be picked up by the cpu core
that runs most sporanic / bursty work loads as it
is calling sched() more often.

This results in all the extra long-running prcoesses
to cluster around the same core resulting in very
unfair sharing of load.

The problem is that once a process runs on a cpu,
it stays on that cpu as processor affinity
is never reset.

Process migration only happens when a cpu cannot
find any process to run, given the affinity
constrains, but this can never happen when
the system is under full load and each cpu
always has a low-priority long running
process to run.

How do we fix this?

The idea of this hack is to reset processor
affinity in ready() when its priority changes or,
when it appears to be a long-running process.

That way, we give every cpu a chance to pick
it up and share the load.

This is not a ideal solution of course. Long term,
we should probably have separate runqueues per cpu
and do the balancing explicitely.
2024-07-21 13:44:18 +00:00
cinap_lenrek
11cd33bcec kernel: make fixedpri work.
Fix and document the "fixedpri" control.
2024-07-21 13:00:48 +00:00
cinap_lenrek
706b44c15d kernel: fix wrong updatecpu() context regression
In the sched() function, the call to reprioritize()
must be done before we set up, as reprioritize()
calls updatecpu(), which determines if the process
was running or not based on p == up. So move
the call to runproc() itself.
2024-07-21 12:44:23 +00:00
Ori Bernstein
b0d33c09ff gefs: more/stricter asserts and checks 2024-07-19 20:37:11 +00:00
Ori Bernstein
108f94b25a gefs: set super dir in Qadm correctly
gefs: ream uplink for root dir in adm correctly
2024-07-19 20:13:46 +00:00
Ori Bernstein
6a049aafed history: add support for gefs dumps 2024-07-18 16:49:31 +00:00
Ori Bernstein
1ca26f9924 gefs: work around 8c bug
8c doesn't like assigning struct literals with vlongs
into array indexes, so work around it for now.
2024-07-18 16:25:46 +00:00
Ori Bernstein
0956f48633 git/commit: filter to changed files for git/save
while rehashing the same files over and over will work
just fine, it can be slow with a large number of large
files; this makes 'git/comit .' perform much better in
repos with a large number of large binary blobs.
2024-07-18 13:13:42 +00:00
Ori Bernstein
338e78a024 gefs: dump dirs are dirs too
even if they're down in the dumps
2024-07-17 21:48:15 +00:00
Ori Bernstein
48edf79c69 gefs: modifying a directory should update qid.vers 2024-07-17 15:07:11 +00:00
Ori Bernstein
201fe8de4b gefs: change log compression heuristic
compress when the log doubles in size, rather than
using a fixed size heuristic; this means that we
don't start compressing frequently as the log gets
big and the file system gets fragmented.
2024-07-08 03:29:40 +00:00
Ori Bernstein
a19d90dc8c gefs: fix allocation log compression
We could overwrite the log tail when compressing the
allocation log; this would be bad. Stop doing that.
2024-07-08 03:23:40 +00:00
rodri
1442891a3e samterm: avoid division-by-zero when $tabstop is zero or empty
this happens in libframe:

	/sys/src/libframe/frutil.c:80: 	x -= (x-f->r.min.x)%f->maxtab;

but there's no way to control when the user changes the
maxtab value, so it's samterm's responsibility to
sanitize it.
2024-07-16 11:29:49 +00:00
Ori Bernstein
51c899ca01 bio(2): fix formatting 2024-07-14 19:49:00 +00:00
Ori Bernstein
ee51c91f6f gefs: copy mode down on create, don't truncate walks with no DMEXEC
we were copying the owner and group of the parent dir into the fid
on create, but we forgot the mode; fix that, so that we don't check
perms against the wrong dir.
2024-07-13 15:55:37 +00:00
mkf
23e7a57172 rx: add ssh 2024-07-04 20:26:20 +00:00
sl
79822e96dc /sys/src/9/pc/audiohda.c: add vid/did for Intel Tiger Lake 2024-07-07 21:42:30 +00:00