#
0f9e9ec2 |
| 13-May-2024 |
jsg <jsg@openbsd.org> |
remove prototypes with no matching function ok mpi@
|
#
f191aecb |
| 19-Sep-2023 |
claudio <claudio@openbsd.org> |
Improve the output of ddb "show proc" command
Include missing fields -- like the sleep channel and message -- and show both the PID and TID of the proc. Also add '/t' as an argument that can be used
Improve the output of ddb "show proc" command
Include missing fields -- like the sleep channel and message -- and show both the PID and TID of the proc. Also add '/t' as an argument that can be used to specify a proc by TID instead of by address. OK mpi@
show more ...
|
#
b2653891 |
| 02-Jul-2023 |
cheloha <cheloha@openbsd.org> |
all platforms, kernel: remove __HAVE_CLOCKINTR symbol
Every platform made the clockintr switch at least six months ago. The __HAVE_CLOCKINTR symbol is now redundant. Remove it.
Prompted by claudio
all platforms, kernel: remove __HAVE_CLOCKINTR symbol
Every platform made the clockintr switch at least six months ago. The __HAVE_CLOCKINTR symbol is now redundant. Remove it.
Prompted by claudio@.
Link: https://marc.info/?l=openbsd-tech&m=168826181015032&w=2
"makes sense" mlarkin@
show more ...
|
#
5b133f3f |
| 08-Mar-2023 |
guenther <guenther@openbsd.org> |
Delete obsolete /* ARGSUSED */ lint comments.
ok miod@ millert@
|
#
329e3480 |
| 05-Nov-2022 |
cheloha <cheloha@openbsd.org> |
clockintr(9): initial commit
clockintr(9) is a machine-independent clock interrupt scheduler. It emulates most of what the machine-dependent clock interrupt code is doing on every platform. Every
clockintr(9): initial commit
clockintr(9) is a machine-independent clock interrupt scheduler. It emulates most of what the machine-dependent clock interrupt code is doing on every platform. Every CPU has a work schedule based on the system uptime clock. For now, every CPU has a hardclock(9) and a statclock(). If schedhz is set, every CPU has a schedclock(), too.
This commit only contains the MI pieces. All code is conditionally compiled with __HAVE_CLOCKINTR. This commit changes no behavior yet.
At a high level, clockintr(9) is configured and used as follows:
1. During boot, the primary CPU calls clockintr_init(9). Global state is initialized. 2. Primary CPU calls clockintr_cpu_init(9). Local, per-CPU state is initialized. An "intrclock" struct may be installed, too. 3. Secondary CPUs call clockintr_cpu_init(9) to initialize their local state. 4. All CPUs repeatedly call clockintr_dispatch(9) from the MD clock interrupt handler. The CPUs complete work and rearm their local interrupt clock, if any, during the dispatch. 5. Repeat step (4) until the system shuts down, suspends, or hibernates. 6. During resume, the primary CPU calls inittodr(9) and advances the system uptime. 7. Go to step (2). This time around, clockintr_cpu_init(9) also advances the work schedule on the calling CPU to skip events that expired during suspend. This prevents a "thundering herd" of useless work during the first clock interrupt.
In the long term, we need an MI clock interrupt scheduler in order to (1) provide control over the clock interrupt to MI subsystems like timeout(9) and dt(4) to improve their accuracy, (2) provide drivers like acpicpu(4) a means for slowing or stopping the clock interrupt on idle CPUs to conserve power, and (3) reduce the amount of duplicated code in the MD clock interrupt code.
Before we can do any of that, though, we need to switch every platform over to using clockintr(9) and do some cleanup.
Prompted by "the vmm(4) time bug," among other problems, and a discussion at a2k19 on the subject. Lots of design input from kettenis@. Early versions reviewed by kettenis@ and mlarkin@. Platform-specific help and testing from kettenis@, gkoehler@, mlarkin@, miod@, aoyama@, visa@, and dv@. Babysitting and spiritual guidance from mlarkin@ and kettenis@.
Link: https://marc.info/?l=openbsd-tech&m=166697497302283&w=2
ok kettenis@ mlarkin@
show more ...
|
#
02de433d |
| 29-Jul-2022 |
semarie <semarie@openbsd.org> |
Replace the swap extent(9) usage by a blist data structure.
It makes uvm_swap_free() faster: extents have a cost of O(n*n) which doesn't really scale with gigabytes of swap.
Based on initial work f
Replace the swap extent(9) usage by a blist data structure.
It makes uvm_swap_free() faster: extents have a cost of O(n*n) which doesn't really scale with gigabytes of swap.
Based on initial work from mpi@ The blist implementation comes from DragonFlyBSD.
The diff adds also a ddb(4) 'show swap' command to show the blist and help debugging, and fix some off-by-one in size printed during hibernate.
ok mpi@
show more ...
|
#
d06d27a7 |
| 28-Jul-2022 |
bluhm <bluhm@openbsd.org> |
In the kernel exist functions to print routes, but they were not accessible from ddb. Implement "show all routes" to print routing tables, and "show route 0xfffffd807e9b0000" for a single route entr
In the kernel exist functions to print routes, but they were not accessible from ddb. Implement "show all routes" to print routing tables, and "show route 0xfffffd807e9b0000" for a single route entry. Note that the rtable id is not part of a route entry, so it makes no sense to print it there. OK deraadt@
show more ...
|
#
3fe80b7f |
| 14-Apr-2022 |
naddy <naddy@openbsd.org> |
ddb: constify command tables
ok jca@
|
#
d03db17a |
| 12-Apr-2022 |
naddy <naddy@openbsd.org> |
ddb: simplify machine command handling
Define a consistently named db_machine_command_table[] across all archs that implement the MD "machine" command, and hook this into the main command table inst
ddb: simplify machine command handling
Define a consistently named db_machine_command_table[] across all archs that implement the MD "machine" command, and hook this into the main command table instead of patching it at runtime.
ok mpi@ jca@
show more ...
|
#
50eb7ec0 |
| 16-Nov-2021 |
bluhm <bluhm@openbsd.org> |
To debug IPsec and tdb refcounting it is useful to have "show tdb" and "show all tdbs" in ddb. tested by Hrvoje Popovski; OK mvs@
|
#
1a4a9ab2 |
| 02-Jun-2021 |
cheloha <cheloha@openbsd.org> |
kernel: introduce per-CPU panic(9) message buffers
Add a 512-byte buffer (ci_panicbuf) to each cpu_info struct on each platform for use by panic(9). The first panic on a given CPU writes its messag
kernel: introduce per-CPU panic(9) message buffers
Add a 512-byte buffer (ci_panicbuf) to each cpu_info struct on each platform for use by panic(9). The first panic on a given CPU writes its message to this buffer. Subsequent panics on a given CPU print the panic message to the console but do not modify the buffer. This aids debugging in two cases:
- If 2+ CPUs panic simultaneously there is no risk of garbled messages in the panic buffer.
- If a CPU panics and then the operator causes a second panic while using ddb(4), the operator can still recall the first failure on a particular CPU.
Misc. changes to support this bigger change:
- Set panicstr atomically to identify the first CPU to reach panic().
- Tweak db_show_panic_cmd() to print all panic messages across all CPUs. Prefix the first panic with an asterisk ('*').
- Prefer db_printf() to printf() during a panic if we have it. Apparently it disturbs less global state.
- On amd64, tweak fault() to write the local panic buffer. This needs more work.
Prompted by bluhm@ and deraadt@. Mostly written by deraadt@. Discussed with bluhm@, deraadt@ and kettenis@.
Borne from a discussion on tech@ about making panic(9) more MP-safe:
https://marc.info/?l=openbsd-tech&m=162086462316143&w=2
ok kettenis@, visa@, bluhm@, deraadt@
show more ...
|
#
a108f33e |
| 26-Oct-2020 |
deraadt <deraadt@openbsd.org> |
add a top-level "reboot" command, for people who keep forgetting "boot reboot" ok kn
|
#
5abbae66 |
| 15-Oct-2020 |
deraadt <deraadt@openbsd.org> |
sick of the CMU, let's make this KNF
|
#
08f058f8 |
| 07-Nov-2019 |
mpi <mpi@openbsd.org> |
db_addr_t -> vaddr_t
ok deraadt@
|
#
8383b4f2 |
| 06-Nov-2019 |
mpi <mpi@openbsd.org> |
Substitute boolean_t/TRUE/FALSE by int/1/0.
ok dlg@, jasper@, anton@
|
#
8f50b3ef |
| 01-Apr-2019 |
tedu <tedu@openbsd.org> |
remove prototype from earlier version of reboot code. spotted by anton
|
#
3c291078 |
| 01-Apr-2019 |
tedu <tedu@openbsd.org> |
fast track ddb> reboot command to skip anything which might panic again. ok deraadt
|
#
388b1054 |
| 18-Sep-2018 |
anton <anton@openbsd.org> |
whitespace fix; no binary change
|
#
c1088d88 |
| 05-Jan-2018 |
pirofti <pirofti@openbsd.org> |
Show uvm_fault and trace when typing show panic on a page fault'd kernel
Currently there is only support for amd64, if this change settles I will add support for the rest of the architectures.
OK k
Show uvm_fault and trace when typing show panic on a page fault'd kernel
Currently there is only support for amd64, if this change settles I will add support for the rest of the architectures.
OK kettenis@.
show more ...
|
#
6f5d2abf |
| 13-Dec-2017 |
mpi <mpi@openbsd.org> |
Add 'bt' an alias for 'trace'.
ok pirofti@
|
#
7efda1a1 |
| 11-Dec-2017 |
deraadt <deraadt@openbsd.org> |
In uvm Chuck decided backing store would not be allocated proactively for blocks re-fetchable from the filesystem. However at reboot time, filesystems are unmounted, and since processes lack backing
In uvm Chuck decided backing store would not be allocated proactively for blocks re-fetchable from the filesystem. However at reboot time, filesystems are unmounted, and since processes lack backing store they are killed. Since the scheduler is still running, in some cases init is killed... which drops us to ddb [noted by bluhm]. Solution is to convert filesystems to read-only [proposed by kettenis]. The tale follows: sys_reboot() should pass proc * to MD boot() to vfs_shutdown() which completes current IO with vfs_busy VB_WRITE|VB_WAIT, then calls VFS_MOUNT() with MNT_UPDATE | MNT_RDONLY, soon teaching us that *fs_mount() calls a copyin() late... so store the sizes in vfsconflist[] and move the copyin() to sys_mount()... and notice nfs_mount copyin() is size-variant, so kill legacy struct nfs_args3. Next we learn ffs_mount()'s MNT_UPDATE code is sharp and rusty especially wrt softdep, so fix some bugs adn add ~MNT_SOFTDEP to the downgrade. Some vnodes need a little more help, so tie them to &dead_vnops.
ffs_mount calling DIOCCACHESYNC is causing a bit of grief still but this issue is seperate and will be dealt with in time. couple hundred reboots by bluhm and myself, advice from guenther and others at the hut
show more ...
|
#
4f933137 |
| 27-Nov-2017 |
mpi <mpi@openbsd.org> |
Remove MALLOC_DEBUG left overs.
From Klemens Nanni.
|
#
fc8650a2 |
| 19-Oct-2017 |
bluhm <bluhm@openbsd.org> |
ddb "show all mounts" showed everything except the address of the mount point. Print it to allow debugging through the data structures from there. OK krw@
|
#
a00d4ff8 |
| 29-Sep-2017 |
mpi <mpi@openbsd.org> |
New ddb(4) command: kill.
Send an uncatchable SIGABRT to the process specified by the pid argument. Useful in case of CPU exhaustion to kill the DoSing process and generate a core for later inspect
New ddb(4) command: kill.
Send an uncatchable SIGABRT to the process specified by the pid argument. Useful in case of CPU exhaustion to kill the DoSing process and generate a core for later inspection.
ok phessler@, visa@, kettenis@, miod@
show more ...
|
#
248a90a9 |
| 12-Sep-2017 |
mpi <mpi@openbsd.org> |
Remove option DDB_STRUCTINFO. Now that ddb(4) is CTF aware, similar functionnalities are available in GENERIC.
ok jasper@, deraadt@, guenther@, dlg@
|